我有一个属性LeadTypeID
,如果为 null,我希望 EF 获取,然后在内存中保存应用程序的生命周期。有没有内置的方法可以做到这一点,或者有人有建议?谢谢
Public Class Lead
Public Property LeadID As Integer
Public Property Name As String
Public Property LeadTypeID As Integer
Public Overridable Property LeadType As LeadType
End Class
Public Class LeadType
Public Property LeadTypeID As Integer
Public Property Name As String
Public Property LastUpdated As Date
End Class