This happened when updating text area.
CodePudding user response:
If you have a valid EF model with the correct field length, this shouldn't be a problem (for example, by decorating with Length attributes)
This type of error generally occurs when you try to put characters or values more than what you have specified in your table schema.
Like in that case: you specify varchar(10)
, but you are trying to store a value that contains 19 characters.
Solution:
- Check your parameter sizes against column sizes and the field(s)
- Try updating each property one by one with a
.SaveChanges()
to find out which one is causing the error.