public ActionResult Edit(int?id) { var municipality = munService.GetOneMunicipalityRecord(Convert.ToInt32(id)); if (municipality == null) { return(View()); } municipality.DistrictList = dynamicList.GetDistrictSelectList(); municipality.MunicipalityTypeList = dynamicList.GetMunicipalityTypeList(); return(View(@"~\Views\Configuration\Municipality\Edit.cshtml", municipality)); }