public static IEdmModel ModelWithEntityTypeWithComplexBaseType()
        {
            EdmModel model = new EdmModel();

            var entity1 = new StubEdmEntityType("Foo", "Bar");
            var id1 = new EdmStructuralProperty(entity1, "Id", EdmCoreModel.Instance.GetInt16(false), null, EdmConcurrencyMode.None);
            entity1.Add(id1);
            entity1.SetKey(id1);

            StubEdmComplexType complex1 = new StubEdmComplexType("Foo", "Baz");
            complex1.Add(new EdmStructuralProperty(complex1, "Data", EdmCoreModel.Instance.GetString(true)));
            entity1.BaseType = complex1;

            model.AddElement(entity1);
            model.AddElement(complex1);

            return model;
        }
        public static IEdmModel DeclaringTypeIncorrect()
        {
            var model = new EdmModel();
            var entity1 = new EdmEntityType("Foo", "Bar");
            var id = new EdmStructuralProperty(entity1, "Id", EdmCoreModel.Instance.GetInt16(false), null, EdmConcurrencyMode.None);
            entity1.AddKeys(id);
            var entity2 = new StubEdmEntityType("Foo", "Baz");
            var id2 = new EdmStructuralProperty(entity1, "badProp", EdmCoreModel.Instance.GetInt16(false), null, EdmConcurrencyMode.None);
            entity2.SetKey(id2);
            entity2.Add(id2);

            model.AddElement(entity1);
            model.AddElement(entity2);

            return model;
        }