I need to add a custom attribute on client side with WCF RIA Service. This property isn't in my Model (.edmx) but is an implementation of my interface.
The property to add:
public IEmployee MyEmployee
{
get { }
}
I try this:
[DataMemberAttribute]
public IEmployee MyEmployee开发者_运维问答
{
get { }
}
but this doesn't work.
A basic return type works:
[DataMemberAttribute]
public string MyEmployeeId
{
get { }
}
(I think) it's because I return an IEmployee and I need to implement this property.
I can't rename the file to *.shared.cs due to his dependencies.
Is it possible to do this ?
If for some reasone you just need the property on the client, keep in mind that entities created on the client-side are partial
classes, so I guess you could extend them and add the properties you need.
Hope it helps.
精彩评论