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.
This commit is contained in:
Developer 02
2025-12-19 08:57:18 +01:00
parent 5c3db6886a
commit ce5c59dfc2

View File

@@ -14,7 +14,7 @@ using System.Threading.Tasks;
namespace DigitalData.Core.Infrastructure
{
public class DbRepository<TDbContext> where TDbContext : DbContext
public class DbRepository<TDbContext> where TDbContext : DbContext, IRepository
{
protected internal readonly TDbContext Context;