refactor: remove IRepository and DbRepository

This commit is contained in:
2025-10-22 17:34:28 +02:00
parent 1febae72c2
commit 90ce4e487c
5 changed files with 0 additions and 154 deletions

View File

@@ -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

View File

@@ -26,9 +26,6 @@ public static class DependencyInjection
options.Invoke(cfg);
cfg.RegisterAllServices(services);
// register db repository
services.AddSingleton<IRepository, DbRepository>();
return services;
}