I have 2 tables, one named Products and another named Samples, with a foreign key to a product. A sample simply consist of a decimal value and a timestamp. A product have a name and that's it. But a I want a price (decimal) to be associated with a product. The price should be the latest sample in Samples.
I am interested in using Entity Framework, but how can I achieve a Product Entity with a price value, when it is not directly in the table and some "calculations" need to be performed beforehand?