Skip to content
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

PostAsync entity id check fails for Guid type #53

Closed
jfhs opened this issue Mar 15, 2017 · 0 comments
Closed

PostAsync entity id check fails for Guid type #53

jfhs opened this issue Mar 15, 2017 · 0 comments

Comments

@jfhs
Copy link
Contributor

jfhs commented Mar 15, 2017

Since Guid type does not have null value, it is always initialized to Guid.Empty and this check in JsonApiController fails (string value of Guid.Empty is "000-000...").

Looking around I was not able to find any generic way to check for empty values. So I would suggest adding method IsIdEmpty or something similar to IIdentifiable with default implementation maybe as you have it right now, or simply checking for null value. Then users could implement that method with whatever logic their ids have.

If that seems reasonable for you, I might make a pull request with that change tomorrow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant