EF7 逆向工程工具不会自动添加 StringLength DataAnnotation

EF7 Reverse Engineering Tool Does Not Add the StringLength DataAnnotation Automatically

我正在使用 EF7 (Beta8) 逆向工程工具从现有数据库生成 POCO 类(使用 DataAnnotations),但生成的 POCO 没有字符串属性的 StringLength 注释,因此当我将迁移应用到一个空数据库,所有字符串字段都在表中生成为 Nvarchar(MAX)。

我是不是遗漏了什么或者是逆向工程工具中的错误?

这是一项尚未实现的功能。它在夜间构建中,将在 EF 的下一个版本中。

https://github.com/aspnet/EntityFramework/commit/6857728ad5691906d859e2835a9ac4917854ce8a