Mapping the 'count' on child list property in AutoMapper

后端 未结 1 419
说谎
说谎 2021-01-26 03:24

I am working in an ASP.NET MVC 4 application, and have something similar to this for my domain.

public class Party
{
    public Cake PartyCake { get; set; }
             


        
相关标签:
1条回答
  • 2021-01-26 03:51

    AutoMapper supports Count out of the box, your destination member is just named incorrectly. If you name your PartyVM property "CakeCandlesCount" it will have the right value.

    0 讨论(0)
提交回复
热议问题