public ActionResult Create(NotesViewModel notesViewModel, string noteName, string description, string urgency, int projectId) { var project = _pContainer.GetProjectById(projectId); if (project == null) { ViewBag.Error = "You need to use a Project Id that exists."; return(View(notesViewModel)); } _nContainer.AddNote(noteName, description, urgency, projectId); return(RedirectToAction(nameof(Index))); }