Today I am facing a problem of finding the most efficient query to database using Linq To Sql.
I want to get the element from db.ElementsCollection that has lowest element.SomeNumber value.
I simply managed to do it by following query:
var query = db.ElementsCollection
.First(o => o.SomeNumber == (db.ElementsCollection.Max(or => or.SomeNumber)));
Is there any more efficient query to accomplish this task?