EF配置关系

时间:2017-05-19 10:13:19

标签: c# entity-framework

我想:

 HasMany(d => d.Categories)
           .WithRequired()
           .HasForeignKey(c => c.RelatedEntityId)
           .WillCascadeOnDelete(true);

这段代码意味着d have required at least one category

0 个答案:

没有答案