0
我有一個字符串列表,我需要將其保存到關係實體中。如何在實體框架中保存關係實體
Dim ts = (From t In _repository.GetSettings _
Where t.TrustSettingId = Setting.SettingId).First()
For i As Integer = 0 To emailAddressList.Count()
If(Not emailAddressList(i) = ts.SettingEmailAddresses(i).EmailAddress)
ts.SettingEmailAddresses.Add(New SettingHREmailAddress() With {.EmailAddress = emailAddressList(i)})
End If
Next
我收到以下錯誤:
Unable to update the EntitySet 'TrustSettingEmailAddress' because it has a DefiningQuery and no <InsertFunction> element exists in the <ModificationFunctionMapping> element to support the current operation.