Refactor Repository and update project dependencies
Added `SaveChangesAsync` to `IRepository` for async persistence. Introduced AutoMapper and DbContext dependencies in `Repository`. Simplified EF Core operations by removing `#if NET48` logic. Replaced `Task.Run` with direct EF Core calls for .NET Framework. Updated AutoMapper version for .NET 8 and added EF Core testing. Suppressed AutoMapper vulnerability warning in project file. Performed general cleanup and improved maintainability.
This commit is contained in:
@@ -90,5 +90,10 @@ namespace ECMJobRunner.Domain.Interfaces
|
||||
/// <param name="cancellationToken">Cancellation token</param>
|
||||
/// <returns>True if entity was found and deleted, false otherwise</returns>
|
||||
Task<bool> DeleteSingleAsync(Expression<Func<TEntity, bool>> predicate, CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// Save all changes asynchronously
|
||||
/// </summary>
|
||||
Task<int> SaveChangesAsync(CancellationToken cancellationToken = default);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user