Пример #1
0
 public void Edit(EmployeeModel employee)
 {
     var editableEmployee = DatabaseModelContainer.Current.EmployeeSet.FirstOrDefault(x => x.Id == employee.Id);
     editableEmployee.Name = employee.Name;
     editableEmployee.Surname = employee.Surname;
     editableEmployee.Position = employee.Position;
     editableEmployee.Email = employee.Email;
 }
Пример #2
0
 public bool Exists(EmployeeModel employee)
 {
     return DatabaseModelContainer.Current.EmployeeSet.Any(x =>
                        x.Name.Equals(employee.Name) &&
                        x.Surname.Equals(employee.Surname) &&
                        x.Position.Equals(employee.Position)) ||
                        (employee.Name == null ||
                        employee.Surname == null);
 }
Пример #3
0
 public void Add(EmployeeModel employee)
 {
     dbAccessor.GetEmployeeSet().Add(employee);
 }