In my project, I use several linq queries to get a list of prices. I need to calculate values based on these prices.
Is it possible to call a user-defined method (which, ideally, can be in an entity class) directly from a linq query, for example, to do this would be ideal.
from foo in Foo
select new {
price = foo.Price,
priceclass = foo.GetClassOfPrice()
}
There will be no access to data from GetClassOfPrice, only static code based on price.
Thanks in advance!
source
share