private void SaveEmployee_Click(object sender, RoutedEventArgs e)
        {
            Employee employee = new Employee();
            employee.Name = NameEmploye.Text;
            employee.Position = PositionComboBox.SelectedItem.ToString();
            employee.Tel = Tel.Text;

            dataSource.AddNewEmployee(employee);
            EmployeesListview.ItemsSource = dataSource.GetEmployees();
        }
Beispiel #2
0
        public void TestMethod1()
        {
            Employee[] employees = new Employee[]
            {
                new Employee { Name=  "a" },
                new Employee {Name= "b" }
            };

            Employee A = Array.Find(employees, (e) => e.Name == "a");
            employees.Where(e => e.Name == "b");
            DataFactoryContext context = new DataFactoryContext();
           // IEnumerable<Employee> query = context.Employee.Where(c => c.Name == "Esteban");
        }
Beispiel #3
0
 public void AddNewEmployee(Employee employee)
 {
     context.Employee.Add(employee);
     context.SaveChanges();
 }