public ActionResult Delete(int Id)
 {
     var obj = dataManager.Municipalities.Get(Id);
     var model = new MunicipalityViewModel
     {
         Municipality = obj,
         District = dataManager.Districts.Get((int?)obj.DistrictId ?? 0)
     };
     return View(model);
 }
        public ActionResult Show(int Id)
        {
            var obj = dataManager.Municipalities.Get(Id);
            var model = new MunicipalityViewModel
            {
                Municipality = obj,
                District = dataManager.Districts.Get((int?)obj.DistrictId ?? 0),
                Manager = dataManager.Persons.Get((int?)obj.ManagerId ?? 0)
            };

            var relationHouses = dataManager.MunicipalityHouseRelations.GetAll().Where(x => x.MunicipalityId == Id);
            if (relationHouses.Count() > 0)
            {
                Street streetObj;
                var houses = from h in dataManager.Houses.GetAll().Where(x => relationHouses.Select(a => a.HouseId.Value).Contains(x.Id))
                             select new
                             {
                                 House = h,
                                 Street = streetObj = dataManager.Streets.Get(h.StreetId.HasValue ? h.StreetId.Value : 0),
                                 District = streetObj != null ? dataManager.Districts.Get(streetObj.DistrictId.HasValue ? streetObj.DistrictId.Value : 0) : null
                             }.ToSafeDynamic();
                ViewBag.Houses = houses;
            }

            return View(model);
        }