namespace SharedDATA.Api { using Microsoft.EntityFrameworkCore; using System.Threading.Tasks; /// /// Defines the interface(s) for generic unit of work. /// public interface IUnitOfWork : IUnitOfWork where TContext : DbContext { /// /// Gets the db context. /// /// The instance of type . TContext DbContext { get; } /// /// Saves all changes made in this context to the database with distributed transaction. /// /// True if save changes ensure auto record the change history. /// An optional array. /// A that represents the asynchronous save operation. The task result contains the number of state entities written to database. Task SaveChangesAsync(bool ensureAutoHistory = false, params IUnitOfWork[] unitOfWorks); } }