Skip to content

Commit e20b3c6

Browse files
authored
Merge pull request #10 from Gml-Launcher/develop
Refactor AutoMapper configuration to use profile registration in ApplicationExtensions.
2 parents 2885c83 + a98fbbb commit e20b3c6

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Gml.Web.Skin.Service/Core/Extensions/Application/ApplicationExtensions.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@ public static WebApplicationBuilder CreateService(this WebApplicationBuilder bui
1313
builder.Services.AddSwaggerGen();
1414

1515
builder.Services.AddAntiforgery();
16-
builder.Services.AddAutoMapper(typeof(TextureMapper));
16+
builder.Services.AddAutoMapper(map =>
17+
{
18+
map.AddProfile<TextureMapper>();
19+
});
1720

1821
builder.Services
1922
.AddCors(o => o.AddPolicy(_policyName, policyBuilder =>

0 commit comments

Comments
 (0)