gpt4 book ai didi

c# - Entity Framework 文件未嵌套在 EDMX 文件下

转载 作者:行者123 更新时间:2023-11-30 20:43:37 24 4
gpt4 key购买 nike

我知道这是从 Here 复制的但我还有一个问题,即 TT 文件未嵌套在 edmx 文件下。重复问题的解决方案只是将实体类放在 TT 下,而不是将 TT 放在 edmx 下。提前致谢。

最佳答案

编辑您的 .csproj 并确保您有 "DependentUpon>Model.edmx</DependentUpon>"<Content Include="Model.tt"> 下.如果找不到,请添加 DependentUpon 标记并保存您的 .csproj 文件。

<Content Include="Model.tt">
<Generator>TextTemplatingFileGenerator</Generator>
<DependentUpon>Model.edmx</DependentUpon>
<LastGenOutput>Model.cs</LastGenOutput>
</Content>

关于c# - Entity Framework 文件未嵌套在 EDMX 文件下,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30378707/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com