public ActionResult RoomSalesList(int id = 0) { IEnumerable <RoomSales> model; if (id == 0) { model = _serviceRoomSales.GetReserveRooms().ToList(); } else { model = _serviceRoomSales.GetSaleRooms(id).ToList(); ViewBag.SaleId = id; } if (!model.Any()) { model = new List <RoomSales>(); } return(View(model.EntityToModelList(true))); }