This commit is contained in:
TheXamlGuy
2024-05-24 08:21:49 +01:00
parent e82fa8d05f
commit 12d1392207
90 changed files with 146 additions and 168 deletions
+2 -4
View File
@@ -5,7 +5,7 @@ using Toolkit.Foundation;
namespace Bitvault;
public class CreateItemHandler(IDbContextFactory<ContainerDbContext> dbContextFactory) :
public class CreateItemHandler(IDbContextFactory<ContainerDbContext> dbContextFactory) :
IHandler<CreateEventArgs<(Guid, ItemConfiguration)>, bool>
{
public async Task<bool> Handle(CreateEventArgs<(Guid, ItemConfiguration)> args,
@@ -24,7 +24,6 @@ public class CreateItemHandler(IDbContextFactory<ContainerDbContext> dbContextFa
{
result = await context.AddAsync(new ItemEntry { Id = id, Name = name }, cancellationToken);
await context.SaveChangesAsync(cancellationToken);
}, cancellationToken);
if (result is not null)
@@ -34,10 +33,9 @@ public class CreateItemHandler(IDbContextFactory<ContainerDbContext> dbContextFa
}
catch
{
}
}
return false;
}
}
}