public List<string> Add(EmployeeLeaveEntity employeeLeave)
 {
     DbContext.EmployeeLeaveRepository.Add(employeeLeave);
     return DbContext.Commit();
 }
 public List<string> Edit(EmployeeLeaveEntity employeeLeave)
 {
     DbContext.Entry(employeeLeave).State = EntityState.Modified;
     return DbContext.Commit();
 }
        public List<string> Remove(EmployeeLeaveEntity employee_leave, bool notPurging = true)
        {
            EmployeeLeaveEntity employeeLeave = DbContext.EmployeeLeaveRepository.GetAll().FirstOrDefault(u => u.EmployeeLeaveId == employee_leave.EmployeeLeaveId);

            var errors = new List<string>();
            if (employeeLeave != null)
            {
                if (notPurging)
                {
                    employeeLeave.RecordState.RecordStateType = RecordStateType.Inactive;
                    employeeLeave.RecordState.ModfiedByUserId = employeeLeave.RecordState.ModfiedByUserId;
                    DbContext.Entry(employeeLeave).State = EntityState.Modified;
                }
                else
                    DbContext.Entry(employeeLeave).State = EntityState.Deleted;
            }
            else
            {
                errors.Add("Custom : No such leave instance matches the id");
            }
            return errors;
        }