using System.Linq; using Composite.Data; namespace Demo { public class Class4 { public static IQueryable GetData(string userName) { using (DataConnection connection = new DataConnection()) { var myUsers = from d in connection.Get() where d.Name == userName select d; return myUsers; } } } }