public class Song
{
public int SongID { get; set; }
public string URL { get; set; }
public virtual TagLib.Tag SongInfo { get; set; }
}
我想在我的 Song 实体中使用“TagLib.Tag”数据类型。当我尝试启用迁移时,我得到:
One or more validation errors were detected during model generation:
\tSystem.Data.Entity.Edm.EdmEntityType: : EntityType 'XmpNode' has no key defined. Define the key for this EntityType.
\tSystem.Data.Entity.Edm.EdmEntitySet: : The referenced EntitySet 'Tags' for End 'CombinedImageTag_Exif_Source' could not be found in the containing EntityContainer.
\tSystem.Data.Entity.Edm.EdmEntitySet: : The referenced EntitySet 'Tags' for End 'CombinedImageTag_Exif_Target' could not be found in the containing EntityContainer.
\tSystem.Data.Entity.Edm.EdmEntitySet: : The referenced EntitySet 'Tags' for End 'XmpTag_NodeTree_Source' could not be found in the containing EntityContainer.
\tSystem.Data.Entity.Edm.EdmEntitySet: : The referenced EntitySet 'Tags' for End 'CombinedImageTag_Xmp_Source' could not be found in the containing EntityContainer.
\tSystem.Data.Entity.Edm.EdmEntitySet: : The referenced EntitySet 'Tags' for End 'CombinedImageTag_Xmp_Target' could not be found in the containing EntityContainer.
\tSystem.Data.Entity.Edm.EdmEntitySet: : The referenced EntitySet 'Tags' for End 'CombinedImageTag_OtherTags_Source' could not be found in the containing EntityContainer.
\tSystem.Data.Entity.Edm.EdmEntitySet: : The referenced EntitySet 'Tags' for End 'CombinedImageTag_OtherTags_Target' could not be found in the containing EntityContainer.
\tSystem.Data.Entity.Edm.EdmEntitySet: : The referenced EntitySet 'Tags' for End 'CombinedImageTag_AllTags_Source' could not be found in the containing EntityContainer.
\tSystem.Data.Entity.Edm.EdmEntitySet: : The referenced EntitySet 'Tags' for End 'CombinedImageTag_AllTags_Target' could not be found in the containing EntityContainer.
\tSystem.Data.Entity.Edm.EdmEntitySet: EntityType: EntitySet 'XmpNodes' is based on type 'XmpNode' that has no keys defined.
\tSystem.Data.Entity.Edm.EdmEntitySet: EntityType: EntitySet 'Tags' is based on type 'Tag' that has no keys defined.
如何在我的模型中使用外部复杂数据类型?