c# - MetadataType doesn't recognize IgnoreDataMemberAttribute -



c# - MetadataType doesn't recognize IgnoreDataMemberAttribute -

i have entity auto generated entity framework database

public partial class demand : entity { public string description { get; set; } public virtual icollection<demandusercomment> demandusercomments { get; set; } }

then added metadatatype add together datacontract , datamemeber attributes entity (independent of db changes).

[datacontract(isreference=true)] internal class demandmetadata { [ignoredatamember] public virtual icollection<demandusercomment> demandusercomments { get; set; } } [metadatatype(typeof (demandmetadata))] public partial class demand { }

but [ignoredatamember] doesn't apply demand how can handle it?

use [notmapped] attribute. see notmappedattribute class on msdn.

c# entity-framework wcf metadata metadatatype

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -