public int QueryCount(string query) { var qb = db.PeopleQuery2(query); if (qb == null) return 0; var start = DateTime.Now; var count = qb.Count(); ElapsedTime = Math.Round(DateTime.Now.Subtract(start).TotalSeconds).ToInt(); return count; }