Problem with the Automapper
See original GitHub issueTrying to return the data from server but end up in error with autoMapper but the datatype and the mapping correct and simple.
code to return the data to the angular controller call :
public ListResultDto<CapacityListDto> GetCapacity(GetCapacityInput input)
{
var capacity = new Capacity
{
City = input.City,
Center = input.Center,
Housing = input.Housing
};
return new ListResultDto<CapacityListDto>(capacity.MapTo<List<CapacityListDto>>());
}
Error :
{“\nUnmapped members were found. Review the types and members below.\nAdd a custom mapping expression, ignore, add a custom resolver, or modify the source/destination type\nFor no matching constructor, add a no-arg ctor, add optional arguments, or map all of the constructor parameters\n==========================================================================================================================================================================\r\nAutoMapper created this type map for you, but your types cannot be mapped using the current configuration.\r\nCapacity -> List1 (Destination member list)\r\nISAS.Automate.Capacity -> System.Collections.Generic.List
1[[ISAS.Automate.Dto.CapacityListDto, ISAS.Application, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]] (Destination member list)\r\n\r\nUnmapped properties:\r\nCapacity\r\n”}
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (3 by maintainers)
Top GitHub Comments
Thank you.