When you\'re setting up a one:many relationship in EF code-first, you can choose whether it should cascade on delete like so:
modelBuilder.Entity
You can't change the primary key.
That is a bad practice in general, but particularly when working with an ORM.