public ActionResult CreateDrawing(DashboardViewModel vm) { if (vm.CreateDrawingName != null && vm.CreateDrawingPassword != null) { DrawingDTO newDrawing = new DrawingDTO(); newDrawing.Name = vm.CreateDrawingName; newDrawing.Password = vm.CreateDrawingPassword; drawingRepository.CreateDrawing(newDrawing); vm.JoinDrawingName = newDrawing.Name; vm.JoinDrawingPassword = newDrawing.Password; return(RedirectToAction("JoinDrawing", vm)); } else { ModelState.AddModelError("MissingParameters", "Please enter the room name and password,"); return(View("~/Views/Home/Dashboard.cshtml", vm)); } }