// Получить определённого клиента public IActionResult EditClient(int?ClientID) { if (ClientID.HasValue) { var Model = WebActions.GetClient(ClientID); IEnumerable <City> CitiesList = WebActions.GetCities().Result; ViewData["Cities"] = new SelectList(CitiesList, "Id", "Name"); return(View("ClientView", Model.Result)); } else { IEnumerable <City> CitiesList = WebActions.GetCities().Result; ViewData["Cities"] = new SelectList(CitiesList, "Id", "Name"); ClientView NewClient = new ClientView(); return(View("ClientView", NewClient)); } }