我找到了指向IQueryable的链接 DataSet
但正如我实施的那样:
public IQueryable<ORDRE> Get_Ordre_ParDate_Iquery(string sql_SelectAll, DateTime dateDeb, DateTime dateFin)
{
try
{
using (var connectionWrapper = new Connexion())
{
var connectedConnection = connectionWrapper.GetConnected();
SqlCommand comm_SelectAll = new SqlCommand(sql_SelectAll, connectionWrapper.conn);
comm_SelectAll.Parameters.AddWithValue("@DATE_CREE_DEB", dateDeb);
comm_SelectAll.Parameters.AddWithValue("@DATE_CREE_FIN", dateFin);
SqlDataAdapter adapt_SelectAll = new SqlDataAdapter();
adapt_SelectAll.SelectCommand = comm_SelectAll;
DataSet dSet_SelectAll = new DataSet();
adapt_SelectAll.Fill(dSet_SelectAll, "LeOrdre");
dSet_SelectAll.Dispose();
adapt_SelectAll.Dispose();
return dSet_SelectAll.Tables["LeOrdre"].AsEnumerable().AsQueryable<ORDRE>();
}
}
catch (Exception excThrown)
{
throw new Exception(excThrown.Message);
}
}
dSet_SelectAll.Tables["LeOrdre"].AsEnumerable().AsQueryable(); 这条线不正确