Ejemplo n.º 1
0
 public void NestedTransactionsUniqueKey()
 {
     using (SakilaDb context = new SakilaDb())
     {
         var store = new store
         {
             manager_staff_id = 1
         };
         context.stores.Add(store);
         for (int i = 0; i < 10; i++)
         {
             Assert.Throws <DbUpdateException>(() => context.SaveChanges());
         }
     }
 }