public ActionResult Create(ProjectSettingsAddVM model) { try { var newProjectSettings = new ProjectSettings { EstimatedSPsum = model.EstimatedSPsum, EstimatedTeamSpeed = model.EstimatedTeamSpeed, SprintAmount = model.SprintAmount, SprintLength = model.SprintLength }; if (ModelState.IsValid) { _context.Add(newProjectSettings); _context.SaveChanges(); } return(RedirectToAction("Dashboard", "Account")); } catch { return(View()); } }
public ActionResult RenderErrorIfSettingsAreEmpty() { var model = new ProjectSettingsAddVM(); return(View(model)); }