Created
October 20, 2020 05:00
-
-
Save PradeepLoganathan/1ad89b44de7adc7e92f98bb401e33085 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 async Task<Customer> GetCustomer(string customerId) | |
| { | |
| try | |
| { | |
| var customerResponse = await this._container.ReadItemAsync<Customer>(customerId, new PartitionKey(customerId)); | |
| return customerResponse; | |
| } | |
| catch (CosmosException ex) | |
| { | |
| Console.WriteLine("Exception occured in GetCustomer: {0} Message body is {1}.\n", ex.Message,ex.ResponseBody); | |
| throw ; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment