Let's say that I have a class called Stock and that has ICollection virtual prices, which are a historical price set.
If you receive stock and after stocks are materialized, you request Prices, but apply a filter, for example, mystock.Prices.OrderByDescending (px => px.Date) .First (), EF internally loads all prices, and then applies the used filters, since prices can be a large collection, I would really like EF to load a price that matches my criteria. Mostly filtering is applied on the server side, and not on the client side.
Can this be done?
thanks
source share