public ActionResult Edit(int id, HR_Example.Models.Country country) { try { string sql = "UPDATE Country SET [country_Name] = N'{0}' WHERE country_ID = N'{1}'"; func.fireSQL(String.Format(sql, country.Country_name, id)); // TODO: Add update logic here return(RedirectToAction("Index")); } catch { return(View()); } }
public ActionResult Create(HR_Example.Models.Country country) { try { string sql = "INSERT INTO Country ([country_Name])VALUES(N'{0}')"; func.fireSQL(String.Format(sql, country.Country_name)); // TODO: Add insert logic here return(RedirectToAction("Index")); } catch { return(View()); } }