Infrastructure: Improve Exception message: Unable to create or track an entity of type 'abc' because it has a null primary or alternate key value. #7001
Labels
closed-fixed
The issue has been fixed and is/will be included in the release indicated by the issue milestone.
type-enhancement
Milestone
I have found the difference between Unique Index and Unique constraint: the exception in case of NULL value. In case of Unique Index you have a sqlserver exception with message that contains column name "Cannot insert the value NULL into column...", when in case of Unique Constraint we get InvalidOperationException with generic message: Unable to create or track an entity of type 'TestParentRecord' because it has a null primary or alternate key value.
I propose to add filed names to exception message as sql server do.
EF Core 1.1.0-preview1-final
The text was updated successfully, but these errors were encountered: