New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue with resolving OData Delete calls with ETags on property type of byte array #491
Comments
Can you post the defination of entity UserPreferences? @mbryantII I'd like to know where you use ConcurrencyCheck.
|
I am currently not using that attribute on any items.
|
Hi mbryantII, For your scenario, you put a TimeStamp attribute on If you really want to use |
Thanks for your reply, in reality that is a database generated column that the user does not place in a post call. here is what that call looks like.
and the response
i just don't want to interfere from a model perspective by removing that attribute, and placing concurrency check on it if its going to cause issues on the back end with EF. Some general advice here would be great! |
@mbryantII If etag support is not needed for UserPreferences entity set in your case, then there is one workaround to remove the concurrency properties now, it is a little ugly as it need reflection call.
Let me know if this does not work for you. As to where to put these code, you will need to define your own APi class, and create a model builder, you can refer to class https://github.com/OData/RESTier/blob/master/test/ODataEndToEnd/Microsoft.OData.Service.Sample.Trippin/Api/TrippinApi.cs, create a class like TrippinModelCustomizer , and then register in ConfigureApi method. |
I close the issue now, if you have more questions or comments, let us know. |
I am unable to successfully delete an entity using If-Match header with the ETag provided. I always retrieve an 412 no matter the format I try. I am preforming a spike and the only developer hitting the end point, thus no concurrency issues. This may not be an Actual Bug, but I can not seem to find documentation to help in my use case.
Assemblies affected
Reproduce steps
On a simple EF model done from "Code First from existing database" Create an Object of
Expected result
Retrieve a 204 No Data, and the entity is removed from the target database.
Actual result
Must provide If-Match Header or a 412.
Additional details
Here is an example of the get request to a specific entity, and then the attempted delete call with the appropriate etag.
I HAVE MASKED THE URL ENDPOINTS due the public view, willing to work one on one to help resolve by unmasking
Request
RESPONSE
DELETE REQUEST
DELETE RESPONSE
The text was updated successfully, but these errors were encountered: