Error new Table #408
-
Hi all. Error:Response bodyDownload{ "Data": null, "Messages": [ "Missing type map configuration or unsupported mapping.\r\n\r\nMapping types:\r\nObject -> GetTipoProductoByIdResponse\r\nSystem.Object -> ProdManager.Application.Features.TipoProducto.Queries.GetById.GetTipoProductoByIdResponse" ], "Succeeded": false }The error appear in GetAllTipoProductoQuery.cs at the line: var mappedTipoProducto = _mapper.Map<List>(tipoProductoList); public async Task<Result<List>> Handle(GetAllTipoProductoQuery request, CancellationToken cancellationToken) Cheers! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
adding, i was create the Response: namespace ProdManager.Application.Features.TipoProducto.Queries.GetAll |
Beta Was this translation helpful? Give feedback.
-
Have you created a mapping profile? This is needed for automapper to know how to map it. public class PriceProfile : Profile
{
public PriceProfile()
{
CreateMap<AddEditPriceCommand, Price>().ReverseMap();
CreateMap<GetPriceByIdResponse, Price>().ReverseMap();
CreateMap<GetAllPricesResponse, Price>().ReverseMap();
}
} Not the inheritance from Profile, when the app is started, all the classes with this inheritance will be setup as a automapper profile. |
Beta Was this translation helpful? Give feedback.
Have you created a mapping profile? This is needed for automapper to know how to map it.
If not navigate to Core/Application/Mappings and add a new class.
For example:
Not the inheritance from Profile, when the app is started, all the classes with this inheritance will be setup as a automapper profile.
Hope this helped!