Yesterday I invited Mary to dinner
I invited Mary to have dinner last night
二楼的正确,一楼的to后应有动词。
I invited Mary to dinner last night.