If the employer doe snot provide a reference letter, one can be obtained for a colleague, supervisor (former or current), or anyone who knows about the work. The work reference letter should have everything required as per IRCC format, including the job duties.
Also you will provide a LoE explaining why the work reference could not be provided.
You can also supplement it with other supporting documents such as IT returns, appointment letter, pay slips etc.
No need for any affidavit.