How can I use trimstart so entity framework will understand what to do?
Here is my query:
string number="123";
Workers.Where(x => x.CompanyId == 8).Where(x => x.Number.TrimStart('0') == number);
How can I make this query work without the AsEnumerable (there are a lot of workers in company 8)?
Try using
SqlFunctions.PatIndexfor this. I tested a query similar to the one below with the values"000123","000One","abcde"and it correctly selected rows with the values"123","One", and"abcde".