Why is there no update equivalent to WillCascadeOnDelete?

前端 未结 3 681
独厮守ぢ
独厮守ぢ 2021-01-19 04:21

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

        
3条回答
  •  攒了一身酷
    2021-01-19 04:59

    Entity framework work with relationship through navigation properties, so ON UPDATE CASCADE allready switched on for all such relations.

    Hmm and on the other hand i'm not sure that you can directly change primary key of entity from Entity Framework.

提交回复
热议问题