IQueryable from raw SQL

2019-09-14 19:21发布

问题:

In Entity Framework 7, there is DbSet.FromSql, which seems to me that allows to create IQueryable<> from raw SQL. According to the doc:

Raw SQL queries provides the DbSet.FromSql method to use raw SQL queries to fetch data. These queries can also be composed on using LINQ.

How to implement something similar in old LINQ to SQL?