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.
在将现有数据库逆向工程到 Code First 模型时,如何让 EF Power Tools 添加数据注释属性 StringLength?
是的。你可以这样做。如果你查看映射类(那些是 Mapping 文件夹中的那些),你会看到“逆向工程师代码优先”使用 Fluent API 进行所有配置。如果你需要做这些使用 DataAnnotation 的东西,请按照下面提到的文章进行分步指南。
在 EF 电动工具中自定义“逆向工程师代码优先”