public int CreateEmployee(EmployeeDto dto)
 {
     if (!this.db.Employees.Any(x => x.DeletedOn.HasValue == false && x.Email.Trim() == dto.Email.Trim()))
     {
         this.db.Employees.Add(new Employee
         {
             CreatedOn = DateTime.Now,
             UpdatedOn = DateTime.Now,
             UpdatedBy = 1,
             Comment = dto.Comment,
             UserId = dto.User.Id,
             Email = dto.Email,
             UserName = dto.UserName,
             PasswordHash = dto.PasswordHash,
             PrimaryPhone = dto.PrimaryPhone,
             Department = dto.Department
         });
         this.db.SaveChanges();
         return 1;
     }
     return 0;
 }
 public int CreateEmployee(EmployeeDto dto)
 {
     throw new NotImplementedException();
 }
 public bool DeleteEmployee(EmployeeDto dto)
 {
     var employee = this.db.Employees.FirstOrDefault(x => x.DeletedOn.HasValue == false && x.Email.Trim() == dto.Email.Trim());
     if (employee != null)
     {
         employee.DeletedOn = DateTime.Now;
         employee.UpdatedBy = dto.User.Id;
         this.db.SaveChanges();
         return true;
     }
     return false;
 }