update DbRepository
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
namespace DigitalData.Core.Tests.Infrastructure;
|
||||
|
||||
using DigitalData.Core.Infrastructure;
|
||||
using DigitalData.Core.Tests.Mock;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
using System.Reflection;
|
||||
using DigitalData.Core.Infrastructure.AutoMapper;
|
||||
using DigitalData.Core.Application.Interfaces.Repository;
|
||||
using DigitalData.Core.Abstraction.Application.Repository;
|
||||
using Bogus.Platform;
|
||||
|
||||
public class DbRepositoryTests
|
||||
{
|
||||
@@ -22,7 +22,7 @@ public class DbRepositoryTests
|
||||
|
||||
builder.Services.AddDbContext<MockDbContext>(opt => opt.UseInMemoryDatabase("MockDB"));
|
||||
|
||||
builder.Services.AddDbRepository<MockDbContext, User>(context => context.Users).UseAutoMapper(typeof(UserCreateDto), typeof(UserReadDto), typeof(UserBase));
|
||||
builder.Services.AddDbRepository<MockDbContext>(typeof(User).GetAssembly());
|
||||
|
||||
builder.Services.AddAutoMapper(Assembly.GetExecutingAssembly());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user