开发者

Entity Framework 4 and generating POCO classes using Poco entity generator

开发者 https://www.devze.com 2023-04-04 23:47 出处:网络
I generate my poco classes by updating my edmx file from the database and run the standard POCO entity generator template.

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

精彩评论

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