Reputation: 2423
Hi I am developing a webservice via asp.net 3.5 , I wonder if I use lintosql as ORM then different datatypes that I use to return (datatable,object,List,class members, etc) would be serializable by default ? or I need to modify linqtosql classes to make them serializable ?
Upvotes: 1
Views: 78
Reputation: 46977
It is possible by setting the Serialization Mode property to Unidirectional
. I would however recommend that you create your own DTO's and expose those in your webservice instead of auto generated linq entities. It'll give greater control over you API.
For more information on the subject: LINQ to SQL serialization capabilities
Upvotes: 3