replace IEntityMapper<TEntity> with IMapper

This commit is contained in:
2025-09-10 17:33:26 +02:00
parent 0809d1215b
commit 453a0ccdf0
3 changed files with 9 additions and 7 deletions

View File

@@ -1,4 +1,5 @@
using DigitalData.Core.Abstraction.Application.Repository;
using AutoMapper;
using DigitalData.Core.Abstraction.Application.Repository;
using Microsoft.EntityFrameworkCore;
using System.Linq.Expressions;
@@ -10,9 +11,9 @@ public class DbRepository<TDbContext, TEntity> : IRepository<TEntity> where TDbC
protected internal readonly DbSet<TEntity> Entities;
public IEntityMapper<TEntity> Mapper { get; }
public IMapper Mapper { get; }
public DbRepository(TDbContext context, Func<TDbContext, DbSet<TEntity>> queryFactory, IEntityMapper<TEntity> mapper)
public DbRepository(TDbContext context, Func<TDbContext, DbSet<TEntity>> queryFactory, IMapper mapper)
{
Context = context;
Entities = queryFactory(context);