public ActionResult ChangePassword(fifness.Models.USER userModel) { using (db) { try { db.Entry(userModel).State = EntityState.Modified; db.USERs.Add(userModel); db.SaveChanges(); } catch (Exception ex) { return(View("ChangePassword", new fifness.Models.USER())); } ModelState.Clear(); ViewBag.ThongBao = "Đăng kí thành công"; } return(View("ChangePassword", new fifness.Models.USER())); }
public long Insert(USER entity) { db.USERs.Add(entity); db.SaveChanges(); return(entity.ID); }
public ActionResult ChangePassword(int ID = 0) { fifness.Models.USER userModel = new fifness.Models.USER(); return(View(userModel)); }