public class TempClass
{
public int ID { get; set; }
public int CountEntries { get; set; }
}
string sql = "select ID, count(*) as CountEntries from table1;select ID, count(*) as CountEntries from table2";
var result = _dbContext.Database.SqlQuery<TempClass>(sql).ToList<TempClass>(); ???
执行几个命令,是否可以使用 EF Code First?还是你必须一次得到一个(上面会产生 2 个 SqlQueries.