Limiting WCF Data Members in Linq to SQL's DBML Serialization?

I understand that you can set the Serialization Mode = Unidirectional to allow data contracts to your dbml auto-generated entities. However, is there a way to only expose certain entities and ALSO limit the entities exposed to only expose certain properties of that entity as well?

Answers


I Googled and found it so I'm posting here for prosperity's sake:

Credit: http://blogs.msdn.com/b/wriju/archive/2007/11/27/linq-to-sql-enabling-dbml-file-for-wcf.aspx

Basically you just set the DBML's Serializable Mode = Unidirectional and then you set the "Access" for each entity you don't want exposed to the Service equal to Friend instead of Public. Access = Friend


Need Your Help

Converting a repeating binary number to decimal (express as a series?)

binary numerical-methods repeating

Given a binary number that repeats, for example 0.(0011) or 0.0(101), how would one go about converting it to decimal?

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.