Solution 1:[1]
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.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Mohi |

