private SelectQuery <TPoco> CreateQuery() { string selectQuery; if (_columns.Any()) { selectQuery = DbAccessLayer.CreateSelectByColumns(Cache, _columns.Aggregate((e, f) => e + ", " + f)); } else { selectQuery = DbAccessLayer.CreateSelect(Cache); } if (!string.IsNullOrWhiteSpace(CurrentIdentifier)) { selectQuery = selectQuery + " AS " + CurrentIdentifier; } return(new SelectQuery <TPoco>(this).QueryText(selectQuery)); }