I\'m working on an application where one can get information on movies from a database as well as add, update and delete the movies. In the database I have three tables (Movie,
Today I've faced this issue. But mine has been fixed in another way. If someday anyone stumbled the answer is for them.
As this is a generic C# .NET CLI exception
I've added a new foreign key to one of my DB table with no default value. Thus the value was set to NULL
as that column was set to allow null.
And I've been getting this exception while querying on that table.
As solution, I replaced the NULL
values with appropriate values (as they are foreign key' they should be appropriate).
That's all.
Thank you.