feat: complete end to end functionality

This commit is contained in:
Stevan Freeborn
2024-09-01 18:09:48 -05:00
parent 78748cc104
commit e400be31f7
19 changed files with 376 additions and 454 deletions
@@ -15,37 +15,16 @@ class EfUnitOfWork(
public async Task SaveChangesAsync()
{
try
{
await _context.SaveChangesAsync();
}
catch (DbUpdateException ex)
{
_logger.LogError(ex, "Failed to save changes to the database.");
}
await _context.SaveChangesAsync();
}
public async ValueTask DisposeAsync()
{
try
{
await _context.DisposeAsync();
}
catch (Exception ex)
{
_logger.LogError(ex, "Failed to dispose of the database context.");
}
await _context.DisposeAsync();
}
public void Dispose()
{
try
{
_context.Dispose();
}
catch (Exception ex)
{
_logger.LogError(ex, "Failed to dispose of the database context.");
}
_context.Dispose();
}
}