using (context = new DataBaseContext())
{
#region EF6.0
var listuser =context.dbuser.ToList();
Log.Debug(context.dbuser);
var query = from p in context.dbuser select p;
Log.Debug(query.ToString());
#endregion
#region ef6.0以下
ObjectQuery<UserInfo> parents = query as ObjectQuery<UserInfo>;
if (parents != null)
{
string sql = parents.ToTraceString();
}
#endregion
return listuser;
}
}