草庐IT

NominalRoutings

全部标签

c# - 无法更改关系,因为一个或多个外键属性不可为空

我在使用EF更新期间遇到以下错误:Theoperationfailed:Therelationshipcouldnotbechangedbecauseoneormoreoftheforeign-keypropertiesisnon-nullable.Whenachangeismadetoarelationship,therelatedforeign-keypropertyissettoanullvalue.Iftheforeign-keydoesnotsupportnullvalues,anewrelationshipmustbedefined,theforeign-keyproper

c# - 无法更改关系,因为一个或多个外键属性不可为空

我在使用EF更新期间遇到以下错误:Theoperationfailed:Therelationshipcouldnotbechangedbecauseoneormoreoftheforeign-keypropertiesisnon-nullable.Whenachangeismadetoarelationship,therelatedforeign-keypropertyissettoanullvalue.Iftheforeign-keydoesnotsupportnullvalues,anewrelationshipmustbedefined,theforeign-keyproper