Dbcontext umbenannt. DIExtention für modelBuilder hinzugefügt, um OnModelCreating zu verwenden.
This commit is contained in:
@@ -3,6 +3,7 @@ using DigitalData.UserManager.Application.MappingProfiles;
|
||||
using DigitalData.UserManager.Application.Services;
|
||||
using DigitalData.UserManager.Infrastructure.Contracts;
|
||||
using DigitalData.UserManager.Infrastructure.Repositories;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
namespace DigitalData.UserManager.Application
|
||||
@@ -17,7 +18,8 @@ namespace DigitalData.UserManager.Application
|
||||
/// </remarks>
|
||||
/// <param name="services">The IServiceCollection to add services to.</param>
|
||||
/// <returns>The updated IServiceCollection.</returns>
|
||||
public static IServiceCollection AddUserManager(this IServiceCollection services) => services
|
||||
public static IServiceCollection AddUserManager(this IServiceCollection services, Action<DbContextOptionsBuilder>? optionsAction) => services
|
||||
.AddDbContext<UserManagerDbContext>(optionsAction: optionsAction)
|
||||
.AddAutoMapper(typeof(UserMappingProfile).Assembly)
|
||||
.AddAutoMapper(typeof(GroupMappingProfile).Assembly)
|
||||
.AddAutoMapper(typeof(GroupOfUserMappingProfile).Assembly)
|
||||
|
||||
Reference in New Issue
Block a user