我有两个有关系的表:
modelBuilder.Entity<User>()
.HasOptional(u => u.Subscription)
.WithMany();
我怎样才能删除关系?我想删除订阅但保留所有用户。如果我删除订阅 EF 抛出异常:
"The DELETE statement conflicted with the REFERENCE constraint
\"FK_Users_Subscriptions_Subscription_Id\".
The conflict occurred in database \"db\",table \"dbo.Users\",
column 'Subscription_Id'.\r\nThe statement has been terminated.
我想从用户访问订阅。