json - C# IgnoreDataMember attribute sets database field to null, how do I overcome this? -
i have built web api usual rest methods. i have field in database tracking when record inserted (called insertlogtime. works fine. my classes generated automatically ef6 using database first. i don't want serialised added [ignoredatamember] attribute field using standard partial metadata classes... [metadatatype(typeof(membersmetadata))] public partial class members { } public class membersmetadata { [databasegenerated(databasegeneratedoption.none)] public int id { get; set; } [ignoredatamember] public nullable<datetime> insertlogtime { get; set; } } now when use fiddler put data other fields, insertlogtime field set null. more importantly, don't want show every field put. customer needs use id , single other field. however, need provide full dataset (without insertlogtime) when doing full post. { "id":99, "firstname":"jack spratt", "email":"someone@somewhere.com", "eligible":f...