By design is it a good idea to expose the domain model entities as data contracts? May be the question is too basic. In my case I saw that I can wrap the entites in request and reponse objects and use them as data contracts. I just wanted to know whether its good idea to do the same?
Share
Assuming that your entities are being loaded from a database and if you are looking for loose coupling and interoperability you may not want to send the entities to your client.
However if the client is well known (internal application), and you want rich functionality offered by these entities (validation etc..) you can send entities directly.