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
|
Hey guys - Here's the scenario. I am adding a new Parent entity to the database, and that Parent has a Child entity that I know exists already (the client/user selected it form a list of entities read from the database earlier - master data). public void SaveParent(Parent incoming) { Parent newrec = new Parent(); // copy fields from incoming newrec.Child = incoming.Child; // is this better? newrec.ChildId = incoming.ChildId; // or is this better? // rest of stuff not included } If the Id works just as well, and I am implementing a client - server solution, do I even need to ship the Child entity over the wire, or can I just populate the ChildId field in the Parent entity?
Thanks, Dave |
|
|
Setting the ChildId would be cheaper in terms of bandwidth, but functionally its the same result in either case. I would set the ChildId personally to avoid the extra data on the return call.
Jeremy |
|
|
Thanks! I figured that was the case, but thought I should ask someone who knew how things worked under the covers. |
|