Skip to content

Nullable<Guid> into Guid.Empty #348

@manuelfsixtour

Description

@manuelfsixtour

Hi everybody,
given the following class:

public class Contact
{
    public Contact()
    {
        ContactId = Guid.NewGuid();
    }
    public Guid ContactId { get; set; }
    public string FirstName { get; set; }
    public string LastName { get; set; }
    public Guid? CategoryId { get; set; }
}

When I try to call Db.Contacts.All(), every NULL CategoryId in the database is set to Guid.Empty. Is it possible to have that property set to null?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions