Пример #1
0
 public Employee SaveEmployee(Employee e)
 {
     SalesERPDAL salesDal = new SalesERPDAL();
     salesDal.Employees.Add(e);
     salesDal.SaveChanges();
     return e;
 }
Пример #2
0
 public void UploadEmployees(List<Employee> employees)
 {
     SalesERPDAL salesDal = new SalesERPDAL();
     salesDal.Employees.AddRange(employees);
     salesDal.SaveChanges();
 }
Пример #3
0
 public List<Employee> GetEmployees()
 {
     SalesERPDAL salesDal = new SalesERPDAL();
     return salesDal.Employees.ToList();
 }
Пример #4
0
 public Employee GetEmployeeById(int pId)
 {
     SalesERPDAL salesDal = new SalesERPDAL();
     return salesDal.Employees.Where(employee => employee.EmployeeId == pId).ToList().FirstOrDefault();
 }