Hi, recently i encountered runtime error when i try to insert values using Entity Framework
"OriginalValues cannot be used for entities in the Added state"
This could arise because missing column or inserting null value or column width exceeding in insert statement.
You can find the error message in Exception object
$exception.EntityValidationErrors[n].ValidationErrors[n].ErrorMessage
$exception.EntityValidationErrors[n].ValidationErrors[n].PropertyName
Based on your Error Message you can take corrective action to rectify this.
Thanks.
No comments:
Post a Comment
Please Give your Valuable Suggestions,Questions and Comments to improve my blog.