refactor: remove IRepository and DbRepository
This commit is contained in:
@@ -129,19 +129,6 @@ public class DbRepository<TDbContext, TEntity> : IRepository<TEntity> where TDbC
|
||||
public virtual IQueryable<TEntity> ReadOnly() => Entities.AsNoTracking();
|
||||
#endregion
|
||||
}
|
||||
|
||||
public class DbRepository : IRepository
|
||||
{
|
||||
private readonly IServiceProvider _provider;
|
||||
|
||||
public DbRepository(IServiceProvider provider)
|
||||
{
|
||||
_provider = provider;
|
||||
}
|
||||
|
||||
public IRepository<TEntity> Entity<TEntity>() where TEntity : IEntity => _provider.GetRequiredService<IRepository<TEntity>>();
|
||||
}
|
||||
|
||||
#if NETFRAMEWORK
|
||||
}
|
||||
#endif
|
||||
Reference in New Issue
Block a user