public ActionResult Create([Bind(Include = "CategoryId,CategoryTitle,UserId")] Category category) { if (ModelState.IsValid) { db.Category.Add(category); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(category)); }
public ActionResult Create([Bind(Include = "Id,Email,Password")] AppUser appUser) { if (ModelState.IsValid) { db.AppUser.Add(appUser); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(appUser)); }
public void AddTask(UserTask userTask) { db.UserTask.Add(userTask); db.SaveChanges(); }
public void AddCategory(Category category) { db.Category.Add(category); db.SaveChanges(); }