我已尝试按照here
的说明使用t4文件来搭建现有数据库。现在我发现这种命名方式看起来很难看,考虑这种情况
published
我已尝试按照建议放
/// <summary>
/// FK_XX_CONVENZIONI_XX_COMPAGNIE_BackReference
/// </summary>
[Association(ThisKey="IdCompagnia", OtherKey="IdCompagnia", CanBeNull=true, Relationship=Relationship.OneToMany, IsBackReference=true)]
public IEnumerable<BenefitConvenzioni> XXCONVENZIONIXXCOMPAGNIEs { get; set; }
但这不会改变行为……有什么建议吗?
答案 0 :(得分:2)
您必须将此代码放在之前 LoadMetadata
GetSchemaOptions.GetAssociationMemberName = key => "Association_" + key.MemberName;
// other tweaks
LoadMetadata(....)
中也提到了