I've been cleaning up some old code and came accross a few queries of the following structure:
var attribute = DbSet.Where(<condition>).Select(a => a.Attribute).SingleOrDefault();
and as I'm trying to make the code more readable I would change that to:
var attribute = DbSet.SingleOrDefault(<condition>).Attribute;
therefore shortening the statement.
But now I'm wondering which of the two is better for performance, and which is better for memory management.