public void ChangesTest() { ProductCategory category = Changes.Create(); Changes.Update(category.ProductCategoryID, category.ProductSubcategories.Single().ProductSubcategoryID); Changes.SaveNoChanges(1); Changes.UpdateWithoutRead(category.ProductCategoryID); Changes.Delete(category.ProductSubcategories.Single().ProductSubcategoryID); Changes.DeleteWithoutRead(category.ProductCategoryID); try { Changes.DeleteWithRelationship(1); Assert.Fail(); } catch (DbUpdateException exception) { Trace.WriteLine(exception); } category = Changes.Create(); Changes.DeleteCascade(category.ProductCategoryID); try { Changes.UntrackedChanges(); Assert.Fail(); } catch (DbUpdateException exception) { Trace.WriteLine(exception); } }