This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
I noticed that generated DTOs do not contain any collection property to their associated entities. Will that be supported in future releases of the product? Thanks
|
|
|
We do not expect to add this to the default generated DTOs. This could lead to a very unwieldy graph of serialised objects if there was a long chain of associations or if an entity had lots of associated entities. It would also be inefficient to load those associations if they were lazy. Although we could possibly try to infer what objects should be serialised together by considering the Eager Load setting, there are also complexity issues to do with removing cycles in the object graph, and eager load at the database side is not necessarily a good indicator of what any given business service may require. Therefore, a Web service operation that wants to receive or return an object graph must explicitly include the related entities. This can be done on a per-operation basis, where the operation signature specifies the kinds of objects and provides information for reconstructing the associations, or you can do it at the data contract level (if all operations are going to require the same set of associations) by extending the generated DTOs using the partial classes and partial copy methods. |
|