我的实体模型(MyModel)有 MyModel.tt。我需要修改 MyModel.tt 文件。我想要的是我的 simpleProperties 写在一个类中,而 navigationProperties 和 complexProperties 在另一个类中。我找到了这些行,但现在完全空白该怎么办。
这是(我认为)我必须编写将在不同类中编写属性的代码的代码。
<#
}
var simpleProperties = typeMapper.GetSimpleProperties(entity);
if (simpleProperties.Any())
{
foreach (var edmProperty in simpleProperties)
{
#>
// TODO: Write this in entityName.cs
<#=codeStringGenerator.Property(edmProperty)#>
<#
}
}
if (complexProperties.Any())
{
#>
<#
foreach(var complexProperty in complexProperties)
{
#>
// TODO: Write this in entityNameComplex.cs
<#=codeStringGenerator.Property(complexProperty)#>
<#
}
}