public ActionResult Create([Bind(Include = "Id,Name,Telephone,Email,Age,Gender,Reason,FavoriteAnimals,StaffNumber,Password")] Staff staff) { if (ModelState.IsValid) { db.Staffs.Add(staff); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(staff)); }
public ActionResult Create([Bind(Include = "Staff_ID,Staff_Name,DoB,Bank_Acc,Street_Add,Block_No,Postal_Code,Country,Phone_No")] Staff staff) { if (ModelState.IsValid) { db.Staffs.Add(staff); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(staff)); }