diff --git a/DigitalData.Core.Infrastructure/DIExtensions.cs b/DigitalData.Core.Infrastructure/DIExtensions.cs
deleted file mode 100644
index 3a2b7cd..0000000
--- a/DigitalData.Core.Infrastructure/DIExtensions.cs
+++ /dev/null
@@ -1,28 +0,0 @@
-using DigitalData.Core.Abstractions;
-using DigitalData.Core.Abstractions.Infrastructure;
-using Microsoft.EntityFrameworkCore;
-using Microsoft.Extensions.DependencyInjection;
-using System.DirectoryServices;
-
-namespace DigitalData.Core.Infrastructure
-{
- public static class DIExtensions
- {
- ///
- /// Adds a CRUD repository for a specific entity type to the service collection.
- ///
- /// The entity type for which the repository is registered.
- /// The type of the entity's identifier.
- /// The DbContext type used by the repository.
- /// The to add the repository to.
- /// An optional action to configure additional services for the repository.
- /// The original instance, allowing further configuration.
- public static IServiceCollection AddCleanCRUDRepository(this IServiceCollection services, Action? configureRepository = null)
- where TCRUDRepository : CRUDRepository where TEntity : class, IUnique where TDbContext : DbContext
- {
- services.AddScoped, TCRUDRepository>();
- configureRepository?.Invoke(services);
- return services;
- }
- }
-}
\ No newline at end of file
diff --git a/DigitalData.Core.Infrastructure/DbRepository.cs b/DigitalData.Core.Infrastructure/DbRepository.cs
new file mode 100644
index 0000000..c5be39b
--- /dev/null
+++ b/DigitalData.Core.Infrastructure/DbRepository.cs
@@ -0,0 +1,43 @@
+using DigitalData.Core.Abstractions.Infrastructure;
+using Microsoft.EntityFrameworkCore;
+using System.Linq.Expressions;
+
+namespace DigitalData.Core.Infrastructure;
+
+public class DbRepository : IRepository where TDbContext : DbContext where TEntity : class
+{
+ protected TDbContext Context;
+
+ protected DbSet Entities;
+
+ public DbRepository(TDbContext context, Func> queryFactory)
+ {
+ Context = context;
+ Entities = queryFactory(context);
+ }
+
+ public Task CreateAsync(TDto dto)
+ {
+ throw new NotImplementedException();
+ }
+
+ public Task CreateAsync(IEnumerable dtos)
+ {
+ throw new NotImplementedException();
+ }
+
+ public Task> DeleteAsync(Expression expression)
+ {
+ throw new NotImplementedException();
+ }
+
+ public Task> ReadAsync(Expression? expression = null)
+ {
+ throw new NotImplementedException();
+ }
+
+ public Task> UpdateAsync(TDto dto, Expression expression)
+ {
+ throw new NotImplementedException();
+ }
+}
diff --git a/DigitalData.Core.Infrastructure/DependencyInjection.cs b/DigitalData.Core.Infrastructure/DependencyInjection.cs
new file mode 100644
index 0000000..0ffdd02
--- /dev/null
+++ b/DigitalData.Core.Infrastructure/DependencyInjection.cs
@@ -0,0 +1,17 @@
+using DigitalData.Core.Abstractions.Infrastructure;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.Extensions.DependencyInjection;
+
+namespace DigitalData.Core.Infrastructure;
+
+public static class DependencyInjection
+{
+ public static IServiceCollection AddDbRepository(this IServiceCollection services, Func> queryFactory)
+ where TDbContext : DbContext
+ where TEntity : DbContext
+ {
+ return services
+ .AddScoped, DbRepository>()
+ .AddSingleton(queryFactory);
+ }
+}
\ No newline at end of file