You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
691 B
19 lines
691 B
using AutoMapper;
|
|
using Microsoft.eShopWeb.ApplicationCore.Entities;
|
|
using Microsoft.eShopWeb.PublicApi.CatalogBrandEndpoints;
|
|
using Microsoft.eShopWeb.PublicApi.CatalogItemEndpoints;
|
|
using Microsoft.eShopWeb.PublicApi.CatalogTypeEndpoints;
|
|
|
|
namespace Microsoft.eShopWeb.PublicApi;
|
|
|
|
public class MappingProfile : Profile
|
|
{
|
|
public MappingProfile()
|
|
{
|
|
CreateMap<CatalogItem, CatalogItemDto>();
|
|
CreateMap<CatalogType, CatalogTypeDto>()
|
|
.ForMember(dto => dto.Name, options => options.MapFrom(src => src.Type));
|
|
CreateMap<CatalogBrand, CatalogBrandDto>()
|
|
.ForMember(dto => dto.Name, options => options.MapFrom(src => src.Brand));
|
|
}
|
|
}
|
|
|