If you are asking about foreign work experience:
I believe that this depends very much on the details and I believe that IRCC cares more about what you actually did and how you did it than the legal framework of your country.
If what you did was practically an employment, meaning that you regularly did the same type of work for the same company and received regular payments, and the company you worked for can confirm that in a reference letter, it might get approved.
If you are asking about Canadian work experience:
(b) a period of self-employment or unauthorized work is not to be included in calculating a period of work experience;
But don't take my word for it. This is something I would discuss with a consultant or a lawyer.