public List<EmployeeScheduleModel> GetEmployeesScheduleByEmployeeId(string employeeId)
 {
     //unitOfWork.StartTransaction();
     EmployeeScheduleRepository repo = new EmployeeScheduleRepository(unitOfWork);
     List<EmployeeScheduleModel> employeeScheduleList = new List<EmployeeScheduleModel>();
     List<EmployeeSchedule> employeeSchedule = new List<EmployeeSchedule>();
     AutoMapper.Mapper.Map(employeeScheduleList, employeeSchedule);
     employeeSchedule = repo.GetAll().Where(x=>x.EmployeeId== employeeId).ToList();
     //unitOfWork.Commit();
     AutoMapper.Mapper.Map(employeeSchedule, employeeScheduleList);
     return employeeScheduleList;
 }
 public EmployeeScheduleModel GetEmployeesScheduleByJobId(int jobid)
 {
     //unitOfWork.StartTransaction();
     EmployeeScheduleRepository repo = new EmployeeScheduleRepository(unitOfWork);
     EmployeeScheduleModel employeeScheduleList = new EmployeeScheduleModel();
        EmployeeSchedule employeeSchedule = new EmployeeSchedule();
     AutoMapper.Mapper.Map(employeeScheduleList, employeeSchedule);
     employeeSchedule = repo.GetAll().Where(x => x.JobId == jobid).FirstOrDefault();
     //unitOfWork.Commit();
     AutoMapper.Mapper.Map(employeeSchedule, employeeScheduleList);
     return employeeScheduleList;
 }
 public EmployeeScheduleModel UpdateEmployeeSchedule(EmployeeScheduleModel model)
 {
     //unitOfWork.StartTransaction();
     EmployeeScheduleRepository repo = new EmployeeScheduleRepository(unitOfWork);
     EmployeeSchedule employeeSchedule = new EmployeeSchedule();
     employeeSchedule = repo.GetAll().Where(x => x.Id == model.Id).FirstOrDefault();
     AutoMapper.Mapper.Map(model, employeeSchedule);
     repo.Update(employeeSchedule);
     //unitOfWork.Commit();
     AutoMapper.Mapper.Map(employeeSchedule, model);
     return model;
 }