I use the following Linq Query:
var projectList = from p in dbContext.vw_Projektkontrolle where p.TXT_Adress1.Contains(filterTxt) orderby p.TXT_Name select p;
projectList is always null. In the debugging I can see, that
filterTxt is for example "testcompany".
Is the Contains method still in use in EF 6 or is there any work around?
I pass the
filterTxt via Form Post to the Action Method in my MVC application.
how to fix this issue.
EDIT: it works when I use just one
charf.ex: "a" as
filterTxtare both declared as strings
String.Contains method translates to:
CHARINDEX(ShowTypeDescriptio, @showTypeDescription) > 0
Might try to use lower case:
var projectList = from p in dbContext.vw_Projektkontrolle where p.TXT_Adress1.ToLower().Contains(filterTxt.ToLower()) orderby p.TXT_Name select p;
And even if it works you might face Turkey Test issue