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
精彩评论