SqlNullValueException: Data is Null. This method or property cannot be called on Null values

Question: How do you solve this Error, "

SqlNullValueException: Data is Null. This method or property cannot be called on Null values"


Write an Article
If you log in, you will be notified when someone leaves a comment.

Other users would like to know if this solution helped you.

Jim said:

The issue is because the data you are trying to retreive from the database has null values hence you are calling .ToList() on it. This will throw an error.


© 2022 - ErnesTech - Privacy