C# OData GetKeyFromUri - Resource not found for the segment 'odata'
0
I've updated from Microsoft.AspNet.OData version 6.0.0 to OData version 7.0.1. The upgrade has broken my ability to get the Id from a path when linking one object to another. Here is my Web API call to add a role to a specific user using the OData standard: POST: http://localhost:61506/odata/users('bob')/roles/$ref Request body: {"@odata.id":"http://localhost:61506/odata/roles(1)"} The Web API method verifies the user and then makes a call to Helpers.GetKeyFromUri to get the role Id value from the request body. [HttpPost, HttpPut] public IHttpActionResult CreateRef([FromODataUri] string key, string navigationProperty, [FromBody] Uri link) { // Ensure the User exists User user = new User().GetById(key); if (user == null) { return NotFound(); }...