I have created a SQL Server stored procedure which I have bound to my class property like below.
objSearchCustomerCDTO = DbContext.ExecuteStoreQuery<SearchCustomerCDTO>("exec GetSearchCustomerDetails").AsQueryable().ToList();
Please note that I have simply used the stored procedure to bind to my properties
For example : my class have below property
public string CustomerName {get;set;}
and stored procedure returns
Select c.CustomerName as CustomerName from Customer
Now I want to display only the CustomerName containing bil – for that I have used this query, but I don’t know why it is always null
var query = objSearchCustomerCDTO
.Where(c => c.CustomerName.Contains("bil")).ToList();
Please let me know what I am doing wrong in the above query.
Thanks
try this one