Some Sadducees, those who deny that there is a resurrection, came forward and put this question to him, saying, "Teacher, Moses wrote for us, 'If someone's brother dies leaving a wife but no child, his brother must take the wife and raise up descendants for his brother.' Now there were seven brothers; the first married a woman but died childless…
That the dead will rise even Moses made known in the passage about the bush, when he called 'Lord' the God of Abraham, the God of Isaac, and the God of Jacob; and he is not God of the dead, but of the living, for to him all are alive." Some of the scribes said in reply, "Teacher, you have answered well." And they no longer dared to ask him anything. (Lk 20:27-40)
This present passage debates on resurrection. Jesus raised people from dead. This passage gives the views prevalent among Jews on resurrection. There were people who did not believe in resurrection (Sadducees), there were others who believed like the rule of Moses (the story of seven brothers). But the correct view is that of Jesus.
When Jews talked about resurrection they had the following view in their mind: all humans from the time of Abraham (or even from Adam) and those of the present times and those of the future would be raised from the dead by God. God would create a new world for them to live in. (This is not like what we say about the life after death). It is a future event and as a result the dead would live again in a way different from the present one. All the wrongs would be put to right. And the Sadducees did not accept this view.
Jesus presented a view that was different from the rest. He said that resurrection life will not be exactly the same as the present one. After death it is irrelevant to speak about family line of relations. After resurrection we will be like angels (deathless, immortal state) and we will have bodies appropriate to the new world which God is making. And the God whom we believe in is God of the living (Abraham, Isaac, and Jacob are alive in God’s presence.)