Monthly Archive: December 2016

Foreign key constraint violation for tblPropertyDefintion causing SqlException while automatically restoring EPiServer database for UI tests

Previously I wrote an article about Keeping reliable test data in EPiServer content database for automated UI tests, but recently ran into some issues in regards to new EPiServer properties. A call to the IContentRepository method Save as below. Causes the following error. Cause of SqlException foreign key constraint tblWorkContentProperty tblPropertyDefinition in EPiServer database After adding new EPiServer properties to a page type class, the …