开发者

Object reference not set to an instance of an object in dynamic Linq-to-Sql where clause

开发者 https://www.devze.com 2023-03-16 11:32 出处:网络
Well i am using Dynamic Linq Extension library for IQueryable type of collection. My collection is of IQueryable. And I apply where cluase on it but when it enumberate it throws the exception of null

Well i am using Dynamic Linq Extension library for IQueryable type of collection. My collection is of IQueryable. And I apply where cluase on it but when it enumberate it throws the exception of null reference. Please look at the below stack trace.

IQueryable开发者_开发问答<T> returnData = source.Where(advanceSearchParameter.AdvanceSearchText, advanceSearchParameter.AdvanceSearchValue);

Where is the extension method come from Dynamic extention library.

Here Source is the object of type IQueryable<T> and i am getting error when returnData gets executed(enumerate).


Have you tried setting Visual Studio to break when an Exception is thrown? Go to Debug > Exceptions... and check the bow under "Thrown" next to "Common Language Runtime Exceptions".

Hopefully it will break somewhere where you can see what is null.

0

精彩评论

暂无评论...
验证码 换一张
取 消