1
asp.net web proyectおよびSQL Server 2012標準版のEntity Framework 4で分離レベルスナップショットを使用してTransactionScopeを使用しようとしています。このエラーが発生しますTransactions with IsolationLevel Snapshot cannot be promoted.
分離レベルのスナップショットエンティティフレームワーク4を使用
using (var scope = new TransactionScope(TransactionScopeOption.RequiresNew,
new TransactionOptions { IsolationLevel = IsolationLevel.Snapshot })) {
using (var db = new Datos.TestDBDataContext(System.Configuration
.ConfigurationManager.ConnectionStrings["ApplicationServices"].ConnectionString))
{
Datos.Contacto newUser = new Datos.Contacto
{
name = user.name,
lastName = user.lastName,
type = user.type,
userId = user.userId,
email = user.Email,
password = Password(),
jobCode = user.JobCode,
DateCreated = user.DateCreated,
cityCode = user.cityCode,
numberPass = user.numberPass,
place = user.place,
estate = false
};
db.Contacts.InsertOnSubmit(newUser);
db.SubmitChanges();
}
scope.Complete();
}
私は間違っていますか?
あなたは、この場合には何をするか、シリアライズより多くのあなたの答えを、説明できますか? – Marztres
更新を参照してください。 – Sampath
重複IsolationLevel、ビジュアルスタジオエラー "Duplicate initialitaon of IsolationLevel"を追加できません – Marztres