标签: linq linq-to-entities
如果我写一个查询例如:
var query = (from a in this.Context.Addresses where a.Active select a.Name);
然后说
if(query.Any()) return query.ToList(); return null;
请注意,查询没有FirstOrDefault()或ToList(),所以我想知道.Any()是否运行查询?
FirstOrDefault()
ToList()
.Any()