Ejemplo n.º 1
0
 public GetRoomDto RoomToGetRoomDto(Room room)
 {
     return(new GetRoomDto
     {
         Id = room.Id,
         Number = room.Number,
         Standard = room.Standard,
         Floor = room.Floor,
         PricePerDay = room.PricePerDay,
         Building = _buildingConverter.BuildingToGetBuildingDto(room.Building),
         IsAvailable = room.IsAvailable,
         IsDamaged = room.IsDamaged,
         IsClean = room.IsClean,
         IsRent = room.IsRent,
         PhotoPath = room.PhotoPath
     });
 }
Ejemplo n.º 2
0
        public async Task <List <GetBuildingDto> > FilterBuildingsAsync(FilterBuildingDto filterBuildingDto)
        {
            var filteredBuildings = await _repository.FilterAsync(filterBuildingDto);

            return(filteredBuildings.Select(c => _converter.BuildingToGetBuildingDto(c)).ToList());
        }