思路:用ef 进行关联一张表然后生成新的数据,然后在依次进行关联,整合查询自己想要的数据代码如下
1.引入命名空间
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.IO;
using System.Xml;
using System.Configuration;
using System.Text;
using System.Data;
using System.Data.SqlClient;
using Newtonsoft.Json;
using System.Data.Entity.SqlServer;
using System.Web.SessionState; // session
2.在一般处理程序中进行编写
public void ProcessRequest(HttpContext context)
{
context.Response.Clear();
context.Response.Write(GetGroupData(context).ToString());
context.Response.End();
}
3.写逻辑
string ControllerName = context.Request.Form["ControllerName"].ToString();
string ActionName = context.Request.Form["ActionName"].ToString();
#region 开始处理