public IList <FloorModel> Get() { var floors = _floorRepository.AllList().OrderByDescending(f => f.CurrentFloor); var elevators = _elevatorRepository.AllList(); var floorModels = new List <FloorModel>(); foreach (var floor in floors) { floorModels.Add(new FloorModel(floor.CurrentFloor, floor.TotalPeople, floor.DestinationFloor, elevators)); } return(floorModels); }