public ActionResult CreateF(int? ufollow) { Follow follow = new Follow(); //follow.UFollowID = Convert.ToInt32(ufollow); follow.UserID = int.Parse(@Session["ID"].ToString()); follow.UFollowID = Convert.ToInt32(ufollow); db.Follow.Add(follow); db.SaveChanges(); return RedirectToAction("Index"); // return View(follow); }
public ActionResult Edit(Follow follow) { if (ModelState.IsValid) { db.Entry(follow).State = EntityState.Modified; db.SaveChanges(); return RedirectToAction("Index"); } return View(follow); }