public ActionResult New(Simcha simcha) { var mgr = new SimchaFundManager(Properties.Settings.Default.ConStr); mgr.AddSimcha(simcha); TempData["Message"] = $"New Simcha Created! Id: {simcha.Id}"; return(RedirectToAction("index")); }
public IActionResult New(Simcha simcha) { var mgr = new SimchaFundManager(_connectionString); mgr.AddSimcha(simcha); TempData["Message"] = $"New Simcha Created! Id: {simcha.Id}"; return(RedirectToAction("index")); }
public ActionResult New(string name, DateTime date) { var mgr = new SimchaFundManager(Properties.Settings.Default.ConStr); Simcha simcha = new Simcha { Name = name, Date = date }; mgr.AddSimcha(simcha); TempData["Message"] = "New Simcha Created! Id: " + simcha.Id; return(RedirectToAction("index")); }