public IActionResult NewActivityDB(ActivityViewModel model) { if (!ModelState.IsValid) { ViewData["Message"] = "Something went wrong, please try again"; return(View("NewActivity")); } _activityFactory.AddActivity(model, (int)GetId(HttpContext)); var activity = _activityFactory.GetLastActivity(); return(Redirect($"activity/{activity.Id}")); }