XDocument and MobileFormatter

XDocument and MobileFormatter

Old forum URL: forums.lhotka.net/forums/t/8980.aspx

Larry posted on Monday, May 24, 2010

Our team is working on app and recently made the move to VS2010, .Net 4, Csla 4.  We're using SL 4 and thus the MobileFormatter.  There are some use cases where we need to pull some XML config info out of the db ( use an XDocument possibly,  property of BO ) and pass it to the SL client for display.  In a previous post ( http://forums.lhotka.net/forums/p/8297/39753.aspx#39753) Rocky mentions that the MobileFormatter is designed for primitive types, but I was wondering how others may have handled this.  The  amount of XML for each chunk of config info  is not large and one solution might be to put the data into a dictionary for travel across the wire.  But we may need to do this in various BOs and I'm wondering if there is a better way.

Thanks for any input.

RockfordLhotka replied on Monday, May 24, 2010

The simplest way to handle XML data is often to just convert it into a string, and let the string go across the wire. You can easily convert the string back into an XML type (like XDocument or XElement) on the other side.

Larry replied on Monday, May 24, 2010

Thanks Rocky!

Copyright (c) Marimer LLC