añade automapper
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
using Autofac.Extensions.DependencyInjection;
|
||||
using AutoMapper;
|
||||
using back.Domain;
|
||||
using back.Infrastructure;
|
||||
using MCVIngenieros.Healthchecks;
|
||||
using MediatR.Extensions.FluentValidation.AspNetCore;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
@@ -55,6 +57,13 @@ public class Program
|
||||
});
|
||||
|
||||
builder.Services.AddFluentValidation([typeof(Program).Assembly]);
|
||||
builder.Services.AddAutoMapper(opts =>
|
||||
{
|
||||
opts.AddProfile<AutoMapperProfile>();
|
||||
opts.AllowNullCollections = true;
|
||||
opts.AllowNullDestinationValues = true;
|
||||
opts.DestinationMemberNamingConvention = new PascalCaseNamingConvention();
|
||||
});
|
||||
|
||||
builder.Services.AddHealthChecksSupport().DiscoverHealthChecks();
|
||||
builder.Services.AddLogging();
|
||||
|
Reference in New Issue
Block a user