Skip to content

Nullable reverse navigation properties #854

@mjolnerbkl

Description

@mjolnerbkl

I have a table B with a primary key which is also a foreign key to table A.

When running my T4 file I get a class A with a reverse navigation property of type B. But it is not nullable, although B might not exist for all A's.

Is it possible to have these created as nullables?

Eg.

class A {
    public B? {get; set;)
}

Now it's created without the questionmark, so when I create an instance of A without a B I get a warning about the B property not being nullable.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions