static void Main(string[] args) { using (pubsEntities pubsContext = new pubsEntities()) { string fname = "Maria"; string entitySQL = "SELECT VALUE c FROM pubsEntities.employee " + "AS c WHERE c.fname = @fname"; ObjectQueryy<employee> emps = pubsContext.CreateQueryy<employee>(entitySQL,new ObjectParameter("fname", fname)); foreach (employee emp in emps) Console.WriteLine("{0} - {1}", emp.fname, emp.lname); pubsContext.Connection.Close(); } }