public static IEdmModel InterfaceCriticalPropertyValueMustNotBeNullOnlyModel()
        {
            var model = new EdmModel();
            var valueTerm = new EdmTerm("DefaultNamespace", "Note", EdmCoreModel.Instance.GetString(true));
            model.AddElement(valueTerm);

            var valueAnnotation = new MutableValueAnnotation()
            {
                Target = valueTerm
            };
            model.AddVocabularyAnnotation(valueAnnotation);

            return model;
        }
        public static IEdmModel InterfaceCriticalPropertyValueMustNotBeNullOnlyModel()
        {
            var model     = new EdmModel();
            var valueTerm = new EdmTerm("DefaultNamespace", "Note", EdmCoreModel.Instance.GetString(true));

            model.AddElement(valueTerm);

            var valueAnnotation = new MutableValueAnnotation()
            {
                Target = valueTerm
            };

            model.AddVocabularyAnnotation(valueAnnotation);

            return(model);
        }
        public static IEdmModel AllInterfaceCriticalModel()
        {
            var model     = new EdmModel();
            var valueTerm = new EdmTerm("DefaultNamespace", "Note", EdmCoreModel.Instance.GetString(true));

            model.AddElement(valueTerm);

            var badString = new CustomStringConstant("foo", EdmExpressionKind.None, EdmValueKind.Integer);

            var valueAnnotation = new EdmAnnotation(
                valueTerm,
                valueTerm,
                badString);

            model.AddVocabularyAnnotation(valueAnnotation);

            var mutableValueAnnotationueAnnotation = new MutableValueAnnotation()
            {
                Target = valueTerm
            };

            model.AddVocabularyAnnotation(mutableValueAnnotationueAnnotation);

            var customEntity = new CustomEntityType(new List <IEdmProperty>()
            {
                null
            });

            model.AddElement(customEntity);

            var entity      = new EdmEntityType("DefaultNamespace", "bar");
            var entity2     = new EdmEntityType("DefaultNamespace", "bar2");
            var navProperty = new StubEdmNavigationProperty("Nav")
            {
                DeclaringType = entity,
                Type          = new EdmEntityTypeReference(entity2, false)
            };

            navProperty.Partner = navProperty;
            entity.AddProperty(navProperty);
            model.AddElement(entity);
            model.AddElement(entity2);

            return(model);
        }
        public static IEdmModel AllInterfaceCriticalModel()
        {
            var model = new EdmModel();
            var valueTerm = new EdmTerm("DefaultNamespace", "Note", EdmCoreModel.Instance.GetString(true));
            model.AddElement(valueTerm);

            var badString = new CustomStringConstant("foo", EdmExpressionKind.None, EdmValueKind.Integer);

            var valueAnnotation = new EdmAnnotation(
                valueTerm,
                valueTerm,
                badString);
            model.AddVocabularyAnnotation(valueAnnotation);

            var mutableValueAnnotationueAnnotation = new MutableValueAnnotation()
            {
                Target = valueTerm
            };

            model.AddVocabularyAnnotation(mutableValueAnnotationueAnnotation);
            
            var customEntity = new CustomEntityType(new List<IEdmProperty>() { null });
            model.AddElement(customEntity);

            var entity = new EdmEntityType("DefaultNamespace", "bar");
            var entity2 = new EdmEntityType("DefaultNamespace", "bar2");
            var navProperty = new StubEdmNavigationProperty("Nav")
            {
                DeclaringType = entity,
                Type = new EdmEntityTypeReference(entity2, false)
            };

            navProperty.Partner = navProperty;
            entity.AddProperty(navProperty);
            model.AddElement(entity);
            model.AddElement(entity2);

            return model;
        }