> Public class UserModel {.... [ScaffoldColumn] [DisplayName ("fødselsdag")] [Data Type (DataType.Date)] [NotMapped] Public Date Time extensionAttribute1_date {{Try to get {Return Return DateTime.Parse ( ExtensionAttribute1); } Hold (exception e) {new date time back (); }} Set {}}} My Controller: When I present in the Action Action, I get the result in an error: The requested feature is not present. If I remove the extension extension 1_date, I update the model correctly How do I exclude my calculation attributes from the update? I have such other qualities in the model as if it is calculated! Is this a wrong process? / Michael
Edit the public ActionResult (string sAMAccountName, FormCollection archive, UserModel data) {if (ModelState.IsValid) {var config = New LdapConfiguration (); . Config.ConfigureFactory ("domain.local") AuthenticateAs (New NetworkCredential ("xxxx", "xxxxx")); (Use the above reference = new DirectoryContext (config)) {var user = context.Query (New UserModel (), "OU = Users, OU = xxx, DC = xxx, DC = dk", "Users"). FirstOrDefault (d = & gt; D. SAMACCountName == SAMACCountName); If (user == tap) return direct reactions ("index"); User.title = data.title; User.mobile = data.mobile; User.homePhone = DataHomephone; User.streetAddress = data.streetAddress; User.postalCode = data.postalCode; User.l = data.l; User.department = data.department; User.physicalDeliveryOfficeName = data.physicalDeliveryOfficeName; User.extensionAttribute1 = data.extensionAttribute1_date.ToLongDateString (); Context.Update (user); } Redirect return action ("index"); } See Return (); }