Linq to sql convert IQueryable to Dataset

前端 未结 4 503
谎友^
谎友^ 2021-01-06 11:48

What is the easiest way to convert an IQueryable object to a dataset?

4条回答
  •  长发绾君心
    2021-01-06 12:06

    (yourDatacontext).GetCommand(yourIQueryableHere), pass command text to a DbCommand object, call ExecuteReader, pass reader to dataset's .Load method.

提交回复
热议问题