just you’d need a license to have that gun
There is no legal way to have a gun and ammunition that accessible in Canada. In the time it would take you to retrieve both and then load a legally stored gun your home invader could have had a coffee.
Also keeping some other weapon nearby, like a bat by the door, constitutes some kind of premeditation to using it as a weapon.
Self defence laws in Canada are extremely restrictive given the increase in car jacking and home invasions to steal cars.