UnitOfWork
UnitOfWork copied to clipboard
A plugin for Microsoft.EntityFrameworkCore to support repository, unit of work patterns, multiple database with distributed transaction supported, and MySQL multiple databases/tables sharding supporte...
当我们用unitOfwork时, 怎么避免不同的线程操作?
It would be nice to also include GroupBy
Added optional CancellationToken to every method. It is always recommended by linters to use the CancellationToken where available. EF fully supports CancellationToken for every async method. This implementation has no...
Hi, how I can add a custom method to the custom repository, now when I get the repository using ` _unitOfWork.GetRepository(hasCustomRepository: true) ` its impossible to get the custom methods...
My database table Plan has a column called SortBy that I want to use to order the request... the below code is giving me the error: 'IQueryable' does not contain...
Improves performance by eliminating unnecessary queries, when there are no items to return.
第一次修改表名,就会报异常,第2次以后就不会报异常了,是哪里少写东西了? 代码如下: ` public HomeController(IUnitOfWork unitOfWork, ILogger logger) { _logger = logger; _unitOfWork = unitOfWork; var blogRepo = _unitOfWork.GetRepository(); var ym = DateTime.Now.ToString("yyyyMM"); blogRepo.ChangeTable($"blogs{ym}"); } `
张帅,把范型仓储直接注入到core的DI容器吧,别用TContext.GetService和new了,你可以做到的;) 类似 services.AddScoped(typeof(IRepository), typeof(Repository));
public async Task SaveChangesAsync(bool ensureAutoHistory = false) public async Task SaveChangesAsync(bool ensureAutoHistory = false, params IUnitOfWork[] unitOfWorks)