public IActionResult CurtManagement() { var model = new CurtManagementModel() { Curts = _context.Curts.ToList() }; return(View(model)); }
public IActionResult CurtManagement(CurtManagementModel model) { var curt = new Curt() { Name = model.Name }; _context.Add(curt); _context.SaveChanges(); return(RedirectToAction("CurtManagement", "Admin")); }