public IActionResult Home() { House[] list = houseService.GetAllHouseAsync(AccountModel.GetInstace().Session).Result; List <HouseModel> lists = new List <HouseModel>(); foreach (var item in list) { lists.Add(new HouseModel { City = item.Address.City, DoorNo = item.Address.DoorNo, Floor = item.Address.FloorNo, HouseNo = item.Address.HouseNo, Id = item.Id, InviteCode = item.InviteCode, Name = item.Name, Street = item.Address.Street, ZipCode = item.Address.ZipCode }); } ViewBag.list = lists; return(View("HomeView")); }