开发者

Entity Framework 4 and generating POCO classes using Poco entity generator

I generate my poco classes by updating my edmx file from the database and run the standard POCO entity generator template.

I wonder if any of you has written a T4 template that generate Poco classes that contain a max field length for each string field?

For example, if I have a table with a column named Title that is a varchar(100) column, I would like to generate 2 fields. One That is the standard "string Title" property and the related max length field prope开发者_如何转开发rty like "int? TitleMaxLength"

Do any of you have an example on how to do this?


Checkout Entity Framework Power Tools

http://visualstudiogallery.msdn.microsoft.com/72a60b14-1581-4b9b-89f2-846072eff19d

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜