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; }
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); }
public void Add(EmployeeModel employee) { dbAccessor.GetEmployeeSet().Add(employee); }