Getting rows from one table and latest 1 row from an associated table, in LINQ?

How about: var instances = from I in ContextDB. Instances where i. CategoryInstances.

Any(categoryIDs. Contains(ci => ci. CategoryID)) select new { Instance = i, LatestPoint = i.Points.

OrderBy(i => i.Instance. Title).FirstOrDefault() } Note that I can remove a lot of redundancy by using associations instead of join.

How about: var instances = from I in ContextDB. Instances where i. CategoryInstances.

Any(categoryIDs. Contains(ci => ci. CategoryID)) select new { Instance = i, LatestPoint = i.Points.

OrderBy(i => i.Instance. Title).FirstOrDefault() }; Note that I can remove a lot of redundancy by using associations instead of join.

Sometimes I had giving suggestions knowing that they should be doing it a better way... but this is a valid one assuming a link between Instance and points. – Nix Aug 17 '10 at 13:07.

Select new latestPoint. OrderBy(i => i.Instance.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions