private StubEdmModel CreateDefinitionModel()
        {
            var model = new StubEdmModel();

            var barValueTerm = new StubValueTerm("", "bar") { Type = EdmCoreModel.Instance.GetInt32(true) };
            model.Add(barValueTerm);

            var bazValueTerm = new StubValueTerm("", "baz") { Type = EdmCoreModel.Instance.GetString(true) };
            model.Add(bazValueTerm);

            var p1 = new StubEdmStructuralProperty("p1") { Type = EdmCoreModel.Instance.GetString(true) };
            var p2 = new StubEdmStructuralProperty("p2") { Type = EdmCoreModel.Instance.GetString(true) };
            var foobazTypeTerm = new StubTypeTerm("", "foobaz") { p1, p2 };
            model.Add(foobazTypeTerm);

            var p10 = new StubEdmStructuralProperty("p10") { Type = EdmCoreModel.Instance.GetString(true) };
            var bazfooTypeTerm = new StubTypeTerm("", "bazfoo") { p10 };
            model.Add(bazfooTypeTerm);

            return model;
        }
        public static IEdmModel TypeTermWithNavigation()
        {
            StubEdmModel model = new StubEdmModel();
            var personTypeTerm = new StubTypeTerm("NS1", "Person")
            {
                new StubEdmStructuralProperty("Name") { Type = EdmCoreModel.Instance.GetString(false) },
            };
            model.Add(personTypeTerm);

            var reviewTypeTerm = new StubTypeTerm("NS1", "Review")
            {
                new StubEdmStructuralProperty("summary") { Type = EdmCoreModel.Instance.GetString(false) },
                new StubEdmStructuralProperty("itemName") { Type = EdmCoreModel.Instance.GetString(false) },
                new StubEdmStructuralProperty("dateReviewed") { Type = EdmCoreModel.Instance.GetDateTimeOffset(false) },
                new StubEdmStructuralProperty("rating") { Type = EdmCoreModel.Instance.GetInt32(false) },
            };
            model.Add(reviewTypeTerm);

            var toPerson = new StubEdmNavigationProperty("ToPerson") { Type = new EdmEntityTypeReference(personTypeTerm, false) };
            reviewTypeTerm.Add(toPerson);

            var toReviews = new StubEdmNavigationProperty("ToReviews") {Type = new EdmCollectionType(reviewTypeTerm.ToTypeReference(false)).ToTypeReference(false)};
            personTypeTerm.Add(toReviews);

            toPerson.Partner = toReviews;
            return model;
        }
        private static void CreateVocabularyDefinitions(StubEdmModel model)
        {
            var reviewTypeTerm = new StubTypeTerm("NS1", "hReview")
            {
                new StubEdmStructuralProperty("summary") { Type = EdmCoreModel.Instance.GetString(false) },
                new StubEdmStructuralProperty("itemName") { Type = EdmCoreModel.Instance.GetString(false) },
                new StubEdmStructuralProperty("dateReviewed") { Type = EdmCoreModel.Instance.GetDateTimeOffset(false) },
                new StubEdmStructuralProperty("rating") { Type = EdmCoreModel.Instance.GetInt32(false) },
            };
            model.Add(reviewTypeTerm);

            var reviewEntityType = new StubEdmEntityType("NS1", "hReviewEntity")
            {
                new StubEdmStructuralProperty("summary") { Type = EdmCoreModel.Instance.GetString(false) },
                new StubEdmStructuralProperty("itemName") { Type = EdmCoreModel.Instance.GetString(false) },
                new StubEdmStructuralProperty("dateReviewed") { Type = EdmCoreModel.Instance.GetDateTimeOffset(false) },
                new StubEdmStructuralProperty("rating") { Type = EdmCoreModel.Instance.GetInt32(false) },
            };
            model.Add(reviewEntityType);

            var titleValueTerm = new StubValueTerm("NS1", "Title") { Type = EdmCoreModel.Instance.GetString(true) };
            model.Add(titleValueTerm);

            var displaySizeValueTerm = new StubValueTerm("NS1", "DisplaySize") { Type = EdmCoreModel.Instance.GetInt32(false) };
            model.Add(displaySizeValueTerm);
        }
        public static IEdmModel TypeTermWithInheritance()
        {
            StubEdmModel model = new StubEdmModel();
            var noteTypeTerm = new StubTypeTerm("NS1", "Note")
            {
                new StubEdmStructuralProperty("text") { Type = EdmCoreModel.Instance.GetString(false) },
            };
            model.Add(noteTypeTerm);
            var reviewTypeTerm = new StubTypeTerm("NS1", "Review")
            {
                new StubEdmStructuralProperty("summary") { Type = EdmCoreModel.Instance.GetString(false) },
                new StubEdmStructuralProperty("itemName") { Type = EdmCoreModel.Instance.GetString(false) },
                new StubEdmStructuralProperty("dateReviewed") { Type = EdmCoreModel.Instance.GetDateTimeOffset(false) },
                new StubEdmStructuralProperty("rating") { Type = EdmCoreModel.Instance.GetInt32(false) },
            };
            reviewTypeTerm.BaseType = noteTypeTerm;

            model.Add(reviewTypeTerm);

            return model;
        }