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

后端 未结 4 466
鱼传尺愫
鱼传尺愫 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:46

    Use AutoMapper or similar framework directly in your controller.

    Here is an introduction

提交回复
热议问题