Welcome to David Sandor Sign in | Join | Help
in Search

Professional Software Architecture

LINQ to SQL Visual Object Designer O/R Mapper

Building data objects in Visual Studio 2008 is really nice.  Having been a .netTiers veteran (and contributor) I have appreciated O/R Mapping tools for some time now.  I must say that the new Visual Designer is pretty neat.  I am working on a quick WPF / WCF application to manage a customer's orders from a simple database.  This tool worked out great for a quick 45 minute application.

l2s-orders

My next step in this little app is to see how I can modify the O/R code template to write these classes as WCF serializable objects fully decorated with the DataContract and DataMember attributes.

EDIT:  I figured this out pretty quickly.  By clicking on the white space of the dbml designer and examining the properties pane you will find a serialization property.  Setting this to unidirectional is the same thing as using the /serialization switch on SQLMetal.  The result is a data class decorated with WCF compatible serialization attributes.

Spiffy!

datacontextclassproperties

Published Thursday, August 07, 2008 2:33 AM by david

Comments

No Comments
Anonymous comments are disabled

This Blog

Syndication

Powered by Community Server (Personal Edition), by Telligent Systems