public async Task <KeyValuePair <string, string> > BookFlight([ActivityTrigger] BookFlightMessage content, ILogger log) { log.LogInformation($"Starting BookFlight Activity"); var result = await _bookFlightService.BookFlights(content); return(new KeyValuePair <string, string>("flight", result)); }
public async Task Run([ServiceBusTrigger("booking", "booking-flight", Connection = "ServicebusConnectionString")] string mySbMsg, ILogger log) { log.LogInformation($"C# ServiceBus topic trigger function processed message: {mySbMsg}"); var bookFlightModel = JsonConvert.DeserializeObject <BookFlightMessage>(mySbMsg); var bookFlightResult = await _bookFlightService.BookFlights(bookFlightModel); await _sendGridService.SendEmailWithInformation(bookFlightModel.Email, bookFlightResult, null); }