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'm evaluating Lightspeed as a replacement to LLBLGen and am having trouble figuring out how to handle IDs between a client and web service using the DTO classes, since they don't have the ID. It's very common for the client to display a set of records to the user, the user selects one to edit, edits it, and the client then passes the changes back to the server (via a web service call) to update the record. The server needs the ID so it can work with the correct record. The client only deals with DTO's, but it does need the ID of the record to send back to the web service for the update of the record fields (not the ID of course). How can I get the ID to the client when it's not included in the DTO? |
|
|
Hello Damon, There's some discussion of this here: http://www.mindscape.co.nz/forums/Post.aspx?ThreadID=2409&PostID=7000 and in the comments to http://www.mindscape.co.nz/blog/index.php/2009/01/20/lightspeed-wcf-and-serialization/ It is also possible to extend the generated DTOs (via a partial class and partial methods) to include IDs if that is your preferred style. See http://www.mindscape.co.nz/forums/Post.aspx?ThreadID=1760&PostID=4658 in this case (the surrounding thread also provides some context on why we don't include the ID automatically in the DTOs). Let us know if you need more info. |
|
|
Thanks for pointing me to this thread: http://www.mindscape.co.nz/forums/Thread.aspx?ThreadID=1760 marko's code sample was exactly what I needed to get the id in the dto class. |
|