Where is the best place to map from view model to domain model?

后端 未结 4 527
鱼传尺愫
鱼传尺愫 2021-02-01 07:41

Where is the best place to do mappings from view model to domain model? By mappings I mean from my EditGrantApplicationViewModel to a GrantApplication

4条回答
  •  暗喜
    暗喜 (楼主)
    2021-02-01 08:29

    do it in your WebUI layer but don't do it the controller instead call your custom mapper/builder interface/class in there

    sample: http://prodinner.codeplex.com

提交回复
热议问题