Hi I am using Predicate builder to build up my where clause. I noticed that it was doing a case sensitive comparison against the entity datasource. Some quick googling implies this is a feature of linqtoentities. so i have had to modify my code to do
whereClause = whereClause.And(x => x.county.Equals(oSearch.County, StringComparison.OrdinalIgnoreCase ));
rather than previously doing
whereClause = whereClause.And(x => x.county == oSearch.County);
The problem is now it appears to be failing building a whereclause.
incidentally i am using the code below which was working before.
var tbl = db.tbl_members.AsExpandable().Where(whereClause.Compile());
I have code which does a foreach (var item in Model) this is now failing with a "Object reference not set to an instance of an object" if i examine the model using quick view it now shows this
tblMembers = {System.Linq.Enumerable.WhereEnumerableIterator<tbl_members>}
rather than
tblMembers = {SELECT [Extent1].[id] AS [id],
[Extent1].[membership_id] AS [membership_id],
[Extent1].[membership_type] AS [membership_type],
[Extent1].[institution] AS [institution],
[Extent1].[full_name] AS [full_name],
[Extent1].[address1] AS [address1],
...
which it showed previously regardless of any results or not.