From ce5c59dfc27048d7166d09efa40e34bbc301c8cc Mon Sep 17 00:00:00 2001 From: Developer 02 Date: Fri, 19 Dec 2025 08:57:18 +0100 Subject: [PATCH] Update DbRepository to require IRepository constraint The `DbRepository` class now enforces that the generic type parameter `TDbContext` must implement the `IRepository` interface in addition to inheriting from `DbContext`. This ensures that `DbRepository` can leverage functionality provided by the `IRepository` interface, improving type safety and consistency. --- DigitalData.Core.Infrastructure/DbRepository.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DigitalData.Core.Infrastructure/DbRepository.cs b/DigitalData.Core.Infrastructure/DbRepository.cs index 7d559ed..4e8daeb 100644 --- a/DigitalData.Core.Infrastructure/DbRepository.cs +++ b/DigitalData.Core.Infrastructure/DbRepository.cs @@ -14,7 +14,7 @@ using System.Threading.Tasks; namespace DigitalData.Core.Infrastructure { - public class DbRepository where TDbContext : DbContext + public class DbRepository where TDbContext : DbContext, IRepository { protected internal readonly TDbContext Context;