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

One Response to Primary Keys and Entity Framework

  1. odetocode's avatar odetocode says:

    Finally a schema that looks like fun….

Leave a reply to odetocode Cancel reply