Inx
Inx

Reputation: 2384

WCF Data Service, don't expose all columns

My WCF Data Service is bound to an EDMX, which contains certain columns I don't want to expose through the Data Service. How do I hide those columns?

Upvotes: 3

Views: 181

Answers (1)

CodeCaster
CodeCaster

Reputation: 151588

You can use the [IgnoreProperties] attribute if you're using Data Services version 5:

[IgnoreProperties("Email", "Password")]
public partial class User 
{

}

Upvotes: 1

Related Questions