// GET: Suggeset public ActionResult Index() { var model = new SuggesetModel(); model.suggeset = new Database.Suggeste(); return(View(model)); }
public ActionResult SaveSuggeset(SuggesetModel model) { using (var db = new DalilakDatabaseEntities1()) { model.suggeset.FK_UserID = long.Parse(User.Identity.Name); db.Suggestes.Add(model.suggeset); db.SaveChanges(); } return(RedirectToAction("Index", "Home")); }