My application is asp.net MVC using Linq-to-Sql. I am trying to use the following to filter a view.
I have already added the filter to my SQL Server view using:
WHERE (dbo.Client.Recstatus IS NULL) OR (dbo.Client.Recstatus = 0)
It works well when I run it in SQL Server Management Studio, however I still see the entries in my application.
I tried to filter it again in my repository using:
List<vw_Client_info> searchResult = new List<vw_Client_info>().Where(c=> c.Recstatus != 1);
Recstatus
is smallint
I get the following error:
Cannot implicitly convert type 'System.Collections.Generic.IEnumerable' to 'System.Collections.Generic.List'. An explicit conversion exists (are you missing a cast?)
I would appreciate your assistance, thanks in advance.