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
Entity framework work with relationship through navigation properties, so ON UPDATE CASCADE allready switched on for all such relations.
ON UPDATE CASCADE
Hmm and on the other hand i'm not sure that you can directly change primary key of entity from Entity Framework.