views:

267

answers:

0

Hi, I'm using the ADO.Net Data Model and would like to truncate any string that are over the database field's max length.

I can see the info in the .edmx xml but I can't find it in C#.

On save I'd like to truncate string so I don't get sql errors. I found this post but it uses Linq and I could not find the CustomAttributes in my code (http://stackoverflow.com/questions/748939/field-max-length-in-entity-framwork)

Anyone know how to solve this?