Entity Framework 4.0 Automatically Truncate/Trim String Before Insert
问题 Suppose I have a table with the column Description, varchar(100). If try to insert a string with more than 100 characters, the insert will fail. Is there a way in Entity Framework to automatically truncate or trim the string to fit into the column before inserting into the column? In my scenario, I really don't care whether the string is truncated, I just want it inserted rather than just failing and logging the rror. Since the model already knows the length limits, I was thinking there might