asp.net mvc - How to access data annotation through wcf service layer of a model -


i have created model , want access model data annotation displayname. have access model through wcf service layer. wcf service remove data annotation of model.

[displayname("student name")] public virtual string studentname {         {         return this.m_studentname;     }     set     {         this.m_studentname= value;     } } 

i want access display name in view null value in displayname method in through property

a wcf service not remove anything. however, building service reference making copy of classes have. , copy smallest set neccessary run service.

if need full classes, put classes , interfaces want shared common library both service and client reference. commonly called contract assembly. can either call service directly through code or if want keep wizard, can use checkbox says "use classes in project" when generating new types.


Comments

Popular posts from this blog

java - Plugin org.apache.maven.plugins:maven-install-plugin:2.4 or one of its dependencies could not be resolved -

Round ImageView Android -

How can I utilize Yahoo Weather API in android -