public void Where_WhenEndsWithOperationIsUsed_QueryIsExecutedSuccessfully() { var employees = new E3SEntitySet<EmployeeEntity>(ConfigurationManager.AppSettings["user"], ConfigurationManager.AppSettings["password"]); foreach (var emp in employees.Where(e => e.workstation.EndsWith("94"))) { _outputHelper.WriteLine("{0} {1} {2}", emp.nativename, emp.startworkdate, emp.workstation); } }
public void Where_WhenOperandPrecedenceIsInversed_CompletedSuccessfully() { var employees = new E3SEntitySet<EmployeeEntity>(ConfigurationManager.AppSettings["user"], ConfigurationManager.AppSettings["password"]); foreach (var emp in employees.Where(e => "EPBYMINW3594" == e.workstation)) { _outputHelper.WriteLine("{0} {1}", emp.nativename, emp.startworkdate); } }
public void WithProvider() { var employees = new E3SEntitySet<EmployeeEntity>(ConfigurationManager.AppSettings["user"], ConfigurationManager.AppSettings["password"]); foreach (var emp in employees.Where(e => e.workstation == "EPBYMINW3594")) { _outputHelper.WriteLine("{0} {1}", emp.nativename, emp.startworkdate); } }
public void E3SEntitySet_Where_StartsWith() { //Arrange var employees = new E3SEntitySet <EmployeeEntity>(User, Password); var query = employees.Where(e => e.workStation.StartsWith("EPBYBREW016")); //Act var employee = query.ToList(); //Assert var actual = employee.FirstOrDefault(x => string.Equals("EPBYBREW0165", x.workStation)); Assert.AreEqual("Игорь Салженицин", actual?.nativeName); Assert.AreEqual("2000-08-01", actual?.shortStartWorkDate); }
public void WithProvider() { var employees = new E3SEntitySet<EmployeeEntity>(ConfigurationManager.AppSettings["user"], ConfigurationManager.AppSettings["password"]); /* foreach (var emp in employees.Where(e => e.workstation == "EPRUIZHW0060")) { Console.WriteLine("{0} {1}", emp.nativename, emp.startworkdate); } foreach (var emp in employees.Where(e => "EPRUIZHW0060" == e.workstation)) { Console.WriteLine("{0} {1}", emp.nativename, emp.startworkdate); } */ foreach (var emp in employees.Where(e => e.workstation == "EPRUIZHW0060" && e.workstation.Contains("IZHW006") && e.workstation.EndsWith("IZHW0060") && e.workstation.StartsWith("EPRUIZHW006"))) { Console.WriteLine("{0} {1}", emp.nativename, emp.startworkdate); } }
public void Where_WhenEqualsAndAndOperatorAreUsed_QueryIsExecutedSuccessfully() { var employees = new E3SEntitySet<EmployeeEntity>(ConfigurationManager.AppSettings["user"], ConfigurationManager.AppSettings["password"]); foreach (var emp in employees.Where( e => e.workstation.Contains("EPBY") && e.workstation == "EPBYMINW3594")) { _outputHelper.WriteLine("{0} {1} {2}", emp.nativename, emp.startworkdate, emp.workstation); } }
public void SetupContext() { _employees = new E3SEntitySet <EmployeeEntity>(ConfigurationManager.AppSettings["user"], ConfigurationManager.AppSettings["password"]); }