
InCoding
How to get the length of a LINQ to SQL class’s attribute? The following code snippet will return the length of a DB field from a SQL to Linq class object. Pass the instance of the object and name of the DB field. public static int GetLengthLimit(object obj, string field) { int dblenint =…