Value cannot be null.
Parameter name: property
I got below error while I called orderby with IQueryable,
Error
Value cannot be null.
Parameter name: property
StackTrace:
.... OrderBy[T](IQueryable`1 query, String memberName, String direction) ....
I searched on many sites but did not get solution, then I start trial and run method on code. Finally I found that it was my silly mistake,
Solution
SQL column name and what you passing in code should be same, its case sensitive
I was passing : countryName
SQL Column name: CountryName
Hope this will help you and save your time.
Enjoy !!!
:)
No comments:
Post a Comment