Lint to Sql
查询包含对不同数据上下文上所定义项的引用 static CapacityUnitDataContext db = new CapacityUnitDataContext(con);
CommandDAL<B_Area> dal = new CommandDAL<B_Area>(db);
static RainStationDataContext rdb = new RainStationDataContext(con);
CommandDAL<B_RainStation> Rdal = new CommandDAL<B_RainStation>(rdb);
public List<RainStation> getRain(int AreaId)
{
var query = from rain in rdb.B_RainStation
join area in db.B_Area on rain.ADID equals area.ID
select new RainStation
{
Id = rain.RainID,
Area = area.AreaName,
Name = rain.RainName
};
return query.ToList();
}
------解决方案--------------------使用 DataContext.GetTable()方法
http://topic.csdn.net/u/20090626/11/52b89266-3345-4e7f-925b-d0a056846943.html
------解决方案--------------------应该需要强类型化datacontext
如:
class sets:DataContext
{
public sets(string str)
: base(str)
{ }
public string ss = "ddddd";
public Table<Customers> customers;
}
------解决方案--------------------很多新技术出来了
------解决方案--------------------学习来。
------解决方案--------------------学习来。
------解决方案--------------------弱弱的问一下,到底有多少种xxxDataContext
------解决方案--------------------我也遇到同样的问题,求解