<?xml version="1.0" encoding="UTF-8"?><rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
> <channel><title>Comments on: LightSpeed, WCF and Serialization</title> <atom:link href="http://www.mindscape.co.nz/blog/index.php/2009/01/20/lightspeed-wcf-and-serialization/feed/" rel="self" type="application/rss+xml" /><link>http://www.mindscape.co.nz/blog/index.php/2009/01/20/lightspeed-wcf-and-serialization/</link> <description>The official blog of Mindscape</description> <lastBuildDate>Thu, 09 Sep 2010 22:49:44 +0000</lastBuildDate> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.0.1</generator> <item><title>By: Ivan Towlson</title><link>http://www.mindscape.co.nz/blog/index.php/2009/01/20/lightspeed-wcf-and-serialization/comment-page-1/#comment-35097</link> <dc:creator>Ivan Towlson</dc:creator> <pubDate>Sun, 11 Oct 2009 22:11:28 +0000</pubDate> <guid
isPermaLink="false">http://www.mindscape.co.nz/blog/?p=445#comment-35097</guid> <description>Hi Kendall,To update an existing employee using the DTO, you would load the Employee using IUnitOfWork.FindOne(id), then perform a CopyTo from the DTO into this Employee, then save.  Regarding how you would get the ID to pass to FindOne, see http://www.mindscape.co.nz/forums/Post.aspx?ThreadID=2409&amp;PostID=7000.To create a new Employee using the DTO, you would call new Employee(), then perform a CopyTo into this Employee, then add it to the UOW, then save.  This is in fact why DTOs don&#039;t have an Id field: Id is assigned by LightSpeed when it does the add -- that is, the Id is *not* assigned by the client.Hope this clarifies things!</description> <content:encoded><![CDATA[<p>Hi Kendall,</p><p>To update an existing employee using the DTO, you would load the Employee using IUnitOfWork.FindOne(id), then perform a CopyTo from the DTO into this Employee, then save.  Regarding how you would get the ID to pass to FindOne, see <a
href="http://www.mindscape.co.nz/forums/Post.aspx?ThreadID=2409&#038;PostID=7000" rel="nofollow">http://www.mindscape.co.nz/forums/Post.aspx?ThreadID=2409&#038;PostID=7000</a>.</p><p>To create a new Employee using the DTO, you would call new Employee(), then perform a CopyTo into this Employee, then add it to the UOW, then save.  This is in fact why DTOs don&#8217;t have an Id field: Id is assigned by LightSpeed when it does the add &#8212; that is, the Id is *not* assigned by the client.</p><p>Hope this clarifies things!</p> ]]></content:encoded> </item> <item><title>By: Kendall</title><link>http://www.mindscape.co.nz/blog/index.php/2009/01/20/lightspeed-wcf-and-serialization/comment-page-1/#comment-35018</link> <dc:creator>Kendall</dc:creator> <pubDate>Fri, 09 Oct 2009 02:06:05 +0000</pubDate> <guid
isPermaLink="false">http://www.mindscape.co.nz/blog/?p=445#comment-35018</guid> <description>Say I have a service called getAllEmployees and I use your code to implement my service so it returns an array of EmployeeDTOs ie.EmployeeDTO[] allEmployees = unitOfWork.Find().Select(e =&gt; e.AsDto()).ToArray() ;Then on the client side someone edits an employee and it is posted back using a service called setEmployee that has a parameter of EmployeeDTO.And I use your code to create an Employee Entity. i.eState state = stateDTO.CopyTo(new State())
state.Save() ;How can the save update the entity, as the EmployeeDTO does not have even a private Id field?How are people using these DTO objects</description> <content:encoded><![CDATA[<p>Say I have a service called getAllEmployees and I use your code to implement my service so it returns an array of EmployeeDTOs ie.</p><p>EmployeeDTO[] allEmployees = unitOfWork.Find().Select(e =&gt; e.AsDto()).ToArray() ;</p><p>Then on the client side someone edits an employee and it is posted back using a service called setEmployee that has a parameter of EmployeeDTO.</p><p>And I use your code to create an Employee Entity. i.e</p><p>State state = stateDTO.CopyTo(new State())<br
/> state.Save() ;</p><p>How can the save update the entity, as the EmployeeDTO does not have even a private Id field?</p><p>How are people using these DTO objects</p> ]]></content:encoded> </item> <item><title>By: Ivan Towlson</title><link>http://www.mindscape.co.nz/blog/index.php/2009/01/20/lightspeed-wcf-and-serialization/comment-page-1/#comment-32203</link> <dc:creator>Ivan Towlson</dc:creator> <pubDate>Wed, 13 May 2009 00:30:57 +0000</pubDate> <guid
isPermaLink="false">http://www.mindscape.co.nz/blog/?p=445#comment-32203</guid> <description>Juan - as Marko mentioned on the forums, the converter functions got renamed to AsDto, and the class they&#039;re contained in got renamed to XxxDtoExtensions, where Xxx is the name of your model.  Also note this will only get generated if your project references System.ServiceModel.dll.  Hope this helps!</description> <content:encoded><![CDATA[<p>Juan &#8211; as Marko mentioned on the forums, the converter functions got renamed to AsDto, and the class they&#8217;re contained in got renamed to XxxDtoExtensions, where Xxx is the name of your model.  Also note this will only get generated if your project references System.ServiceModel.dll.  Hope this helps!</p> ]]></content:encoded> </item> <item><title>By: Juan</title><link>http://www.mindscape.co.nz/blog/index.php/2009/01/20/lightspeed-wcf-and-serialization/comment-page-1/#comment-32199</link> <dc:creator>Juan</dc:creator> <pubDate>Tue, 12 May 2009 21:41:42 +0000</pubDate> <guid
isPermaLink="false">http://www.mindscape.co.nz/blog/?p=445#comment-32199</guid> <description>Hi Jeremy!We are very excited using LightSpeed. We went furthermore and implemented a WCF, but when I was looking for the DTOConvertor class (even in the last nightly build •Nightly Build for 13 May 2009 - LightSpeedExpress-20090513.msi) it wasn&#039;t present.Do you have any idea when it will be available, because we are very interested in using LightSpeed with WCF in our project (&#039;cause it&#039;s a must have for us).Hope to hear from you soon. Thanks in advance!</description> <content:encoded><![CDATA[<p>Hi Jeremy!</p><p>We are very excited using LightSpeed. We went furthermore and implemented a WCF, but when I was looking for the DTOConvertor class (even in the last nightly build •Nightly Build for 13 May 2009 &#8211; LightSpeedExpress-20090513.msi) it wasn&#8217;t present.</p><p>Do you have any idea when it will be available, because we are very interested in using LightSpeed with WCF in our project (&#8217;cause it&#8217;s a must have for us).</p><p>Hope to hear from you soon. Thanks in advance!</p> ]]></content:encoded> </item> <item><title>By: Mindscape Blog &#187; Blog Archive &#187; DTOs, Data Contacts and code generation</title><link>http://www.mindscape.co.nz/blog/index.php/2009/01/20/lightspeed-wcf-and-serialization/comment-page-1/#comment-29590</link> <dc:creator>Mindscape Blog &#187; Blog Archive &#187; DTOs, Data Contacts and code generation</dc:creator> <pubDate>Tue, 24 Feb 2009 21:35:50 +0000</pubDate> <guid
isPermaLink="false">http://www.mindscape.co.nz/blog/?p=445#comment-29590</guid> <description>[...] to help in sending LightSpeed entities over the wire. Further to this, Jeremy recently posted a guide to working with WCF and LightSpeed due to an increasing interest in working with LightSpeed in distributed [...]</description> <content:encoded><![CDATA[<p>[...] to help in sending LightSpeed entities over the wire. Further to this, Jeremy recently posted a guide to working with WCF and LightSpeed due to an increasing interest in working with LightSpeed in distributed [...]</p> ]]></content:encoded> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk (enhanced) (request URI is rejected)

Served from: www.mindscape.co.nz @ 2010-09-10 07:46:02 -->