Exemplo n.º 1
0
        public void WithProvider_Task2()
        {
            var employees = new E3SEntitySet <EmployeeEntity>(ConfigurationManager.AppSettings["user"], ConfigurationManager.AppSettings["password"]);

            Console.WriteLine("StartsWith (EPRUIZHW024):");
            foreach (var emp in employees.Where(e => e.workstation.StartsWith("EPRUIZHW024")))
            {
                Console.WriteLine("{0} {1}", emp.nativename, emp.startworkdate);
            }

            Console.WriteLine("\nEndsWith(PRUIZHW0249):");
            foreach (var emp in employees.Where(e => e.workstation.EndsWith("PRUIZHW0249")))
            {
                Console.WriteLine("{0} {1}", emp.nativename, emp.startworkdate);
            }

            Console.WriteLine("\nContains(PRUIZHW024):");
            foreach (var emp in employees.Where(e => e.workstation.Contains("PRUIZHW024")))
            {
                Console.WriteLine("{0} {1}", emp.nativename, emp.startworkdate);
            }
        }