Created
November 7, 2017 17:01
-
-
Save jmarmolejos/8af77504c22368f903b2483f586ef10d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public UpdateInventoryResponse UpdateInventoryProducts(UpdateInventoryProductsRequest updateRequest) { | |
var connectionString = "<your connectionstring that should not be stored like this>"; | |
var queueName = "ProductUpdates"; | |
var client = QueueClient.CreateFromConnectionString(connectionString, queueName); | |
var jsonContent = JsonConvert.SerializeObject(updateRequest); | |
var message = new BrokeredMessage(jsonContent); | |
client.Send(message) | |
return new UpdateInventoryResponse() { Success: True, Message: "Yay!" } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment