JG Vimalan's Blog

It is all about coding!

Linq to SQL with WCF

I worked in a task where I need to use linq to sql and WCF. In order to decorate linq to sql classes with WCF attributes, you need to set the “Serialization Mode’ to Unidirectional. This is a property of dbml file.

Once the property is set to Unidirectional, the classes created will have the WCF attributes (DataContract, DataMember) as shown below,

If you create custom classes, you need to add the WCF attributes manually, otherwise .NET will create for you automatically.


October 15, 2010 - Posted by | ASP.NET, C#.NET, Linq

No comments yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: