Try:
var element = context.QuestionTables.ToList()[index];
Basically, you are trying to get a specific row number in your table. There is no SQL equivalent (at least a simple way) to get this. Adding the
.ToList()
you are forcing an immediate execution of the query and bring the results into memory, specifically into a
List
object. This has a nice easy way to access the data via an index.
The issue with this is, if your table is large, you are bringing down a lot of data. Ideally, you should be querying the table based on a key or column in the source table.