Linq to SQL SQLMethods
Just came across this really cool Class that contains methods such as Like that allow us to issue SQL Like commands. this is interesting as the T-SQL Like lets us
write statements like select * from table where field like "%john%bill%" . these cannot easily be expressed with Contains. So instead of expressing :
from t in table where field.Contains("nnn");
we would write:
from t in table where SQLMethods.Like(field,"%john%bill%");
there are other interesting methods such as DateTime diff functions.
write statements like select * from table where field like "%john%bill%" . these cannot easily be expressed with Contains. So instead of expressing :
from t in table where field.Contains("nnn");
we would write:
from t in table where SQLMethods.Like(field,"%john%bill%");
there are other interesting methods such as DateTime diff functions.
