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:


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


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: Logo

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

Facebook photo

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

Connecting to %s

%d bloggers like this: