WCF Silverlight services & DataObjectBase

Jul 19, 2011 at 8:29 AM

Helow guys i'm sorry for such question  but 

can  i  use  contracts  based on the  DataObjectBase<T>   to transfer data from server to silverlight client  ... and how.

May be you can add example where we can see your  DAL  handling model  with the DataObjectBase. -  As i understand DataObjectBase it's only the concept that we can use on the client only to integrate data handlingt to the MVVM model.   But how about such thing  as transferring between  server DAL to client. 

For example  I'd want to do shared domain model     with the objects that we can 1 use as DAL classes  2 use as client BOject model  (my custom mapping model) types  3 use  as  wcf trasfarrable classes  4 support for other interfaces of DataObjectbase except of custom Serialization   -  Is it possible?    

I find only  one problem in transferrring with wcf  - it is your own serialization  so i can't transfer DataObjectBase contract  from server and  accept  them on  the  client  as  DataObjectBase object .   May be you can add another base object class  that will not have custom serialization,  do other thigs that DataObjectBase can  well too.     Or please add example for silverlight project that works  with DAL and WCF       

I'm sorry if i missed something . Thanks a lot for your framework guys.      

Jul 19, 2011 at 9:04 AM
Edited Jul 19, 2011 at 9:05 AM

ou i  found that   the WCF do not support serialization of the readonly propertiers , but  can you add example with  full featured Data handling Applcation where we have     [DAL]-[Wcf Service]-[DataObjectBase] -[VVM]       based on the northwind db.     thanks Geert  

Jul 19, 2011 at 8:32 PM

Hi Xidius,

Thanks for contacting us with this advanced question. Never bother to ask them, it keeps us awake as well :)

The DataObjectBase *should* be serializable (if not using complex nested types). However, it is best to use existing techniques such as RIA services to push objects to the client (they handle all the complex stuff of serialization). If you don't use a database, you can create custom objects and pass them to a server, otherwise we recommend to use RIA services (or another 3rd party Silverlight DAL generation software, such as LLBLGen Pro).

Best regards,


Jul 22, 2011 at 9:34 AM

Thanks Geert

 i   have one more question    look  i have types from one layer -   DAL or POCO layer . it's simple class that i can use to transfer data from server to silverlight client.

        i 'd want to use  your    DataObjectBase<T> on the client     and  not to define clone class of this contract  that has only one  different  readonly properties as requirements for  full DataObjectBase functionality .    So if i will use   defenition    of     DataObjectBase<MyDataContract>  - at which interfaces  I may rely?    what interfaces  will still work for such defenition for object ?

Jul 22, 2011 at 10:36 AM


oh i'm sorry i understand DataObject is a Model  associated base class,  that can serialize even Collelctions . Then i've senn an examples,  collections usually  ObservableCollections - is it  strong term to use savable and other options  on the client  .... because you sad that  i wouldn't be able to use serialization if i have nested types.  Can  you say more about nesting  types and    supporting options of DataObjectBase<T> Geert .     

Jul 22, 2011 at 10:45 AM

Nested serialization of complex types is not yet supported for Silverlight (there is a work item for that, but it has low priority). An observable collection is stored as a simple collection in a file and then restored as ObservableCollection again when being deserialized.

The DataObjectBase is indeed a base class for Model objects. So, you can use it to store, for example, settings in the isolated storage of the user.

Jul 25, 2011 at 7:27 AM

thanks Geert  when status for this work item will changed then post about it here please