所以這就是我迄今爲止。我做錯了什麼或在3.0.0.3中有錯誤嗎?Subsonic 3簡單的倉庫和交易
var Repository = new SimpleRepository("DBConnectionName");
using (TransactionScope ts = new TransactionScope())
{
using (SharedDbConnectionScope scs = new SharedDbConnectionScope("connstring", "providerName"))
{
try
{
for (int i = 0; i < 5; i++)
{
Supplier s = new Supplier();
s.SupplierCode = i.ToString();
s.SupplierName = i.ToString();
Repository.Add<Supplier>(s);
}
ts.Complete();
}
catch
{
}
}
}
我越來越亞音速DbDataProvider 公衆的DbConnection CurrentSharedConnection { {返回__sharedConnection錯誤; }
protected set
{
if(value == null)
{
__sharedConnection.Dispose();
等。 __sharedConnection == NULL :(對象空引用異常:(