Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在使用“Entity Designer Database Generation Power Pack”附加组件从 EDMX 生成 DDL 时遇到问题。即使 ProviderManifestToken 设置为 2008,它也会在 datetime2 上生成日期时间列。可以修复吗?我不想一直手动执行此操作,因为我使用的是模型优先方法......
我终于找到了如何指定 E4 来输出 datetime2 而不是 datetime。
您需要更新用于生成 DDL 的 .tt 文件。
完整的答案可以在这里找到:
http://social.msdn.microsoft.com/Forums/en-GB/adodotnetentityframework/thread/22ee46ca-9b6e-44a4-b5ed-b7e89a68a9b8