How can I use AutoMapper on properties marked Internal?

前端 未结 3 530
借酒劲吻你
借酒劲吻你 2021-01-13 06:44

I have a solution with several projects. A business components project, an MVC web app, a DTO\'s and ViewModels project, a business component unit test project, and an MVC u

3条回答
  •  旧巷少年郎
    2021-01-13 07:19

    Have you thought about mapping to interfaces instead? Have the data contract implement an interface, and then just map to that. You could then explicitly implement the interface, effectively hiding those members.

提交回复
热议问题