Primary Keys and Entity Framework

 

If you are creating EF classes from an existing database schema and one of your classes has a composite key of all of the fields like this:

image

You didn’t define a primary key in the database.  Once you go back and do that, your EF class will reflect it:

image

Advertisements

One Response to Primary Keys and Entity Framework

  1. odetocode says:

    Finally a schema that looks like fun….

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: