是否可以将组件(具有自己的组件映射)映射到私有字段?我试过了,但它需要实体的内嵌映射。
它适用于这样的公共财产:
Component(Function(t) t._ScormSettings)
但是在尝试时:
Component(Of ScormSettingsEntity)(Function(t) Reveal.Member(Of ScormPackageEntity)("_ScormSettings"))
它需要一个func(object)参数来定义映射。
ScormSettings-mapping:
Public Class ScormSettingsMapping
Inherits ComponentMap(Of ScormSettingsEntity)
Sub New()
Map(Function(t) t.SettingTrackCompleted).Column("SettingTrackCompleted").Nullable()
Map(Function(t) t.SettingTrackScore).Column("SettingTrackScore").Nullable()
Map(Function(t) t.SettingTrackCompletedScore).Column("SettingTrackCompletedScore").Nullable()
End Sub
End Class