Add IsNew() Support for PK of Type Guid #93

wants to merge 1 commit into


None yet
2 participants

tawman commented Dec 27, 2011

We had decorated our Entities with an IsNew() property, but then I saw that PetaPoco had a similar helper method on the Database class. However, the PetaPoco db.IsNew("Id", entity) did not detect an Guid.Empty as being new.

public bool IsNew()
    return Id == Guid.Empty;

This comment has been minimized.

Show comment Hide comment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment