Returning NHibernate mapping classes from WCF services

后端 未结 2 2064
抹茶落季
抹茶落季 2020-12-19 22:07

I have a server that handles the database access and a client that consumes the information. The communication from the client to the server is through a WCF service.

<
2条回答
  •  借酒劲吻你
    2020-12-19 22:34

    Use data-transfer objects to move the data from the server to the client. Your business (domain model) objects should not necessarily be exposed outside the core of the application, but should be considered a protected asset.

    You can use AutoMapper to automate the translation from business objects to data-transfer objects.

提交回复
热议问题