Returning NHibernate mapping classes from WCF services

后端 未结 2 2080
抹茶落季
抹茶落季 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:17

    Yeah, you probably want a DTO for this. It's usually considered better to not pass your data objects to the outside world, but also passing hibernate objects directly out of a service can give you some weird behavior, especially if you have lazily loaded collections.

提交回复
热议问题