Dev sir is correct.
The correct order is A>C>B>D
In A, B, C the lone pair of nitrogen is not involved in resonance and is available.
In D the lone pair is involved in resonance and is not available and is least available so D is least basic.
A will be most basic.
Comparing B and C; in B, nitrogen is sp2(33% s character) hybridised and in C it is sp3 (25% s character) hybridised. More the s character, more strongly it will hold the lone pair and hence less will be the availaibilty of lp and so less basic. Hence, C is more basic than B.
so, the order is A>C>B>D