The cause of basicity is the availability of lone pair of electrons on nitrogen for protonation. In CH3CH2NH2 the lone pair is freely available. In CH3CONH2 the lone pair is involved in resonace with C=O hence not freely available for protonation thus it is not basic, however amides are amphoteric in nature ,i.e., they show both acidic and basic properties.
The cause of basicity is the availability of lone pair of electrons on nitrogen for protonation. In CH3CH2NH2 the lone pair is freely available. In CH3CONH2 the lone pair is involved in resonace with C=O hence not freely available for protonation thus it is not basic, however amides are amphoteric in nature ,i.e., they show both acidic and basic properties.