Linq to SQL 连接有关问题
Linq to SQL 连接问题
我用 Linq to SQL 添加了一个User表
然后掉用的时候 没有 Connection
需要在Linq to SQL 里面添加点什么吗?
没分了,多多帮忙啊.
------解决思路----------------------
http://blog.****.net/chinacsharper/article/details/9246623
我用 Linq to SQL 添加了一个User表
然后掉用的时候 没有 Connection
需要在Linq to SQL 里面添加点什么吗?
没分了,多多帮忙啊.
private InfDataContext InitializeInfDataContext_old(IsolationLevel isolationLevel)
{
var infDataContext = new InfDataContext(DB_CONNECTION_STRING);
if (infDataContext.Connection == ConnectionState.Closed)
{
infDataContext.Connection.Open();
infDataContext.Transaction = infDataContext.Connection.BeginTransaction(isolationLevel);
}
return infDataContext;
}
------解决思路----------------------
http://blog.****.net/chinacsharper/article/details/9246623