Is there a way I can call a custom scalar DB function as part of my LINQ to Entities query? The only thing I can find on the web about this is this page:
However the instructions given here seem to assume you are using a DB-first approach and talk about modifying the .edmx
file. What about if you're using a code-first approach? I want to be able to write something like this:
var result = await (
from itm in _itemDataContext.Items
where
itm.QryGroup1 == "Y" &&
_itemDataContext.Dbo_MyCustomScalarIntFn(itm.QryGroup2) > 0
).ToArrayAsync();