using Brizco.Repository.Repositories.UnitOfWork; namespace Brizco.Repository.Repositories.Base; public class RepositoryWrapper : IRepositoryWrapper { private readonly ApplicationContext _context; private readonly IUnitOfWork _unitOfWork; public RepositoryWrapper(ApplicationContext context) { _context = context; _unitOfWork = new UnitOfWork.UnitOfWork(_context); } public IBaseRepository SetRepository() where T : ApiEntity => new BaseRepository(_context); public async System.Threading.Tasks.Task SaveChangesAsync(CancellationToken cancellationToken = default) => await _unitOfWork.SaveChangesAsync(cancellationToken); public void Dispose() { _context?.Dispose(); } }