public static void init(TestContext a)
        {
            cleanup();
            PropertyTemplate t1 = new PropertyTemplate()
            {
                RecordID = 1,
                TemplateName = "Default Template",
                TemplateDescription = "Default template Description"
            };

            List<PropertyTemplateItem> list = new List<PropertyTemplateItem>();
            PropertyTemplateItem d1 = new PropertyTemplateItem()
            { 
                RecordID = 1,
                Name = "Chapter 1",
                Type = "Bool",
                Enabled = 1,
                Description = "Has the member finished with the chapter 1",
                TemplateID = 1
            };

            PropertyTemplateItem d2 = new PropertyTemplateItem()
            {
                RecordID = 2,
                Name = "Chapter 2",
                Type = "Bool",
                Enabled = 1,
                Description = "Has the member finished with the chapter 2",
                TemplateID = 1
            };

            PropertyTemplateItem d3 = new PropertyTemplateItem()
            {
                RecordID = 3,
                Name = "Chapter 3",
                Type = "Bool",
                Enabled = 1,
                Description = "Has the member finished with the chapter 3",
                TemplateID = 1
            };

            list.Add(d1); list.Add(d2); list.Add(d3);
            t1.PropertyTemplateItems = list;
            inner.InsertOnSubmit(t1);
        }
        public void DeleteOnSubmitTest()
        {
            PropertyTemplate t1 = new PropertyTemplate()
            {
                RecordID = 1,
                TemplateName = "advanced template Template",
                TemplateDescription = "advanced template Description"
            };

            List<PropertyTemplateItem> list = new List<PropertyTemplateItem>();
            PropertyTemplateItem d1 = new PropertyTemplateItem()
            {
                RecordID = 1,
                Name = "Chapter 11",
                Type = "Bool",
                Enabled = 1,
                Description = "Has the member finished with the chapter 11",
                TemplateID = 1
            };

            PropertyTemplateItem d2 = new PropertyTemplateItem()
            {
                RecordID = 2,
                Name = "Chapter 12",
                Type = "Bool",
                Enabled = 1,
                Description = "Has the member finished with the chapter 12",
                TemplateID = 1
            };

            PropertyTemplateItem d3 = new PropertyTemplateItem()
            {
                RecordID = 3,
                Name = "Chapter 13",
                Type = "Bool",
                Enabled = 1,
                Description = "Has the member finished with the chapter 13",
                TemplateID = 1
            };

            list.Add(d1); list.Add(d2); list.Add(d3);
            t1.PropertyTemplateItems = list;
            inner.InsertOnSubmit(t1);

            repo.DeleteOnSubmit(2);

            var template = repo.GetById(2);
            Assert.IsNull(template);

        }