I developed a project using asp.net core MVC and cosmos db. When I try to post the form I got
HttpRequestException: An error occurred while sending the request error.
I debug it using break point.
await 'client.CreateDocumentAsync(UriFactory.CreateDocumentCollectionUri("HRDB", "EmployeesCollection"), employee);'
Above link so me the error. please help me to fix it .
code:
' [HttpPost]
public async Task<ActionResult> AddEmployee(Employee employee)
{
await client.CreateDocumentAsync(UriFactory.CreateDocumentCollectionUri("HRDB", "EmployeesCollection"), employee);
return RedirectToAction("Employees");
}'
Error :