I have a very large codebase in which in want to find all linq statements that not contain the where cause.
So, lets say I have a linq statement like this:
from t in dc.tablename where t.somefield="somevalue" select t
This statement should NOT be included into the search result, but, if the statement looks like this:
from t in dc.tablename select t
this should be included into the search result.
So far I've only managed to create a regex for matching linq statements that contain the WHERE:
from(.|\n){1,}(where)(.|\n){1,}select
But when I try this:
from(.|\n){1,}^(where)(.|\n){1,}select
it does not work.