Hello
I'm kind of new to LINQ and I'm trying to represent the following query in LINQ to Entities:
Select * from Cotations CT1
where CT1.CotationID = iCot_ID and
Revision =
(select max(revision)
from Cotations CT2
where CT1.CotationID = CT2.Cotation)
where iCot_ID
is an external parameter, and Cotations
is my entity set.
Better yet, how can I represent this as an association between two entities?
If I have the following entities:
MasterLog:
--cotationID
Cotation:
--Cotationid
--Revision key,
and for each MasterLog
I want to have an association with Cotation
based only on CotationID
where Revision
is max for that cotation
(as in above query)
Thanks.
Lukasz