public async Task <GetHotelsResponse> GetHotelsAsync() { var response = new GetHotelsResponse(); response.Hotels = await _hotelRepository.GetHotelsAsync(); return(response); }
private static DialogFlowEntities CreateEntitiesModelFromHotelResult(GetHotelsResponse hotelsResult) { var model = new DialogFlowEntities(); foreach (var hotel in hotelsResult.Data) { var entity = new DialogFlowEntity(); entity.Value = hotel.Attributes.Name; foreach (var keyword in hotel.Attributes.KeyWords) { entity.Synonyms.Add(keyword); } model.Entities.Add(entity); } return(model); }