I have a database with a table :
User { UserId, Name, Number, DateCreated, DateEffective, DateEnd, DateReplaced }
I expose the information in the database containing the table through WCF Data Services.
1) the columns : DateCreated, DateEffective, DateEnd, DateReplaced are for keeping historical records and as such should not appear to the clients using my WCF Data Service.
2) also, Whenever a client makes the query :
var q = from u in service.Users select u;
I want it to return only the users who have the DateEnd column set to null.
Is there any way to achieve that functionality ?
1 If you’re going through WCF you’re serializing to XML, right? So mark the properties that you don’t want to be serialized as NonSerialized.
2 You’ll have to expose a method for the client to access that has already filtered the null DateEnd columns out.
Such as
}