public ActionResult Create(UserViewModel collection) { try { // TODO: Add insert logic here AspNetUser user = new AspNetUser(); user.AccessFailedCount = collection.AccessFailedCount; user.DoctorID = collection.DoctorID; user.Email = collection.Email; user.EmailConfirmed = collection.EmailConfirmed; user.LockoutEnabled = collection.LockoutEnabled; user.PasswordHash = collection.PasswordHash; user.PhoneNumber = collection.PhoneNumber; user.PhoneNumberConfirmed = collection.PhoneNumberConfirmed; user.ProfilePic = collection.ProfilePic; user.SecurityStamp = collection.SecurityStamp; user.StudentID = collection.StudentID; user.TwoFactorEnabled = collection.TwoFactorEnabled; user.UserName = collection.UserName; user.Id = collection.Id; operations.AddAspUser(user); return(RedirectToAction("Index")); } catch (Exception exc) { return(View()); } }