我的实体框架中有两个过程..以及将数据作为json返回的方法..我如何在我的单一方法中调用这两个过程,我必须将这两个过程作为单个json对象返回......并且在我的 jquery 中将此数据返回到我的 .$getJson 方法...任何人都可以告诉我如何执行此操作,并且返回的数据应该绑定到 highcharts 的 Linechart 作为两条单独的行可以告诉我如何实现这一点
public ActionResult LoggedBugs()
{
return View();
}
public JsonResult CreatedBugs()
{
int year;
int month;
int projectid;
year=2012;
month=8;
projectid=16;
var loggedbugs = db.ExecuteStoreQuery<LoggedBugs>("LoggedBugs @Year,@Month,@ProjectID", new SqlParameter("@Year", year), new SqlParameter("@Month", month), new SqlParameter("@ProjectID", projectid)).ToList();
var ClosedBugs= db.ExecuteStoreQuery<ClosedBugs>("ClosedBugs @Year,@Month,@ProjectID", new SqlParameter("@Year", year), new SqlParameter("@Month", month), new SqlParameter("@ProjectID", projectid)).ToList();
return Json(loggedbugs, JsonRequestBehavior.AllowGet);
}
我想将loggedbugs和Closedbugs作为json对象返回到我的视图中,从那里我必须将此数据绑定到Linechart...这里loggedbugs应该有一行而Closedbugs应该有另一行......在这里期待帮助