public IActionResult AddBoatToDatabase(BoatPageVM model) { if (!ModelState.IsValid) { ViewBag.SaveBtnName = "Add Boat"; ViewBag.ActionName = "AddBoatToDatabase"; return(View(nameof(BoatPage), model)); } model.Uid = userManager.GetUserId(HttpContext.User); repository.InterpolateVpp(model); repository.SaveBoat(model); return(RedirectToAction(nameof(Route))); }