public IActionResult Create(MonitorViewModel monitor) { if (ModelState.IsValid) { Monitor entitiyMonitor = new Monitor { Id = Guid.NewGuid(), AppUserId = UserId, Url = monitor.Url, DisplayName = monitor.Name }; _monitorService.Add(entitiyMonitor); _monitorService.Save(); return(RedirectToAction(nameof(Index))); } ViewData["AppUserId"] = UserId; return(View(monitor)); }