0

我可能做错了什么?这是我的代码

int? employergroup_id = (int?)Session["Employergroup_id"];
// if I hover over the variable in debug I see the number 2 - so it is populating

var db = new pec_prod_on_epic();
var result = db.Page3((int?)Session["Employergroup_id"]);
// if I hover I see the number -1
Listview1.DataSource = db.Page3((int?)employergroup_id);
// db.Page3 is a stored proc that takes a single int parameter
// If I run it in SSMS I get lots of rows
Listview1.DataBind();
// No data retrieved...

因此,我从框架中得到的结果与在 SSMS 中不同。

4

0 回答 0