One-to-one relationships

Let’s start with the simplest of the two situations: modelling a one-to-one relationship between the classes.

This is the schema we want to create.

Image

And here are the classes we’ll need to do it.

Image

Image Put On Your Thinking Hat

Ready to give it a try?

Image

Create a console project (I called my project CFAnnotations), add the NuGet ...

Get Fluent Entity Framework now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.