public Task GenerateAndSend(NotificationToSend notificationToSend) { //here we'd go and get the customer //get other bits and pieces (from meta data or whatever) //generate the dictionary to send to sendgrid Console.WriteLine($"Sending portal registration notification to customer id {notificationToSend.CustomerId}"); return(Task.FromResult(0)); }
public async Task Post([FromBody] NotificationToSend notificationToSend) { var json = JsonConvert.SerializeObject(notificationToSend, new JsonSerializerSettings { ContractResolver = new CamelCasePropertyNamesContractResolver() }); var message = new Message(Encoding.ASCII.GetBytes(json)); //seems a tad slow? \500ms await _queueClient.SendAsync(message); }