Skip to content

PostAsync entity id check fails for Guid type #53

Closed
@jfhs

Description

@jfhs

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions