Entity framework 6 usetransaction databasefirst throws UnintentionalCodeFirstException
问题 I'm trying to execute the following : SqlConnection cnSql = new SqlConnection(cnstring); cnSql.Open(); SqlTransaction Transactie = default(SqlTransaction); Transactie = cnSql.BeginTransaction(); SqlCommand cmddelbonh = new SqlCommand(); cmddelbonh.Connection = Transactie.Connection; cmddelbonh.Transaction = Transactie; cmddelbonh.CommandText = "update artikelgroepen set OMSN='XXXXX' where ID = 3"; cmddelbonh.ExecuteNonQuery(); using (CXNACC_TESTFIRMA cxn = new CXNACC_TESTFIRMA(cnSql)) { cxn