EntityFrameworkCore.Generator icon indicating copy to clipboard operation
EntityFrameworkCore.Generator copied to clipboard

Generattion for One to One/Zero relationship

Open AhmedAzzabi opened this issue 4 years ago • 1 comments

I have table that exactly one or none relation with another table, usually with entity framrwork we can use WithOne in mapping and mark it optional, i'm using different FK than the primary key. i'm not able to have a custom mapping as it is always regenrated also the entoty is generated with one entiy in one side but a collection in the other side.

Is their a way to solve these issues ?

AhmedAzzabi avatar Apr 02 '20 15:04 AhmedAzzabi

If you had some examples, I could work to improve the generated mapping. Another options is to override the generated mapping outside the generated region. anything outside that region will be kept on re-generation.

pwelter34 avatar Apr 19 '20 20:04 pwelter34