Beispiel #1
0
        public void String_FK_unicode_is_preferred_if_specified()
        {
            var model  = CreateModel();
            var mapper = new OracleTypeMapper(new RelationalTypeMapperDependencies());

            Assert.Equal(
                "VARCHAR2(900)",
                mapper.FindMapping(model.FindEntityType(typeof(MyRelatedType3)).FindProperty("Id")).StoreType);

            Assert.Equal(
                "NVARCHAR2(450)",
                mapper.FindMapping(model.FindEntityType(typeof(MyRelatedType4)).FindProperty("Relationship2Id")).StoreType);
        }
Beispiel #2
0
        public void Binary_FK_max_length_is_preferred_if_specified()
        {
            var model  = CreateModel();
            var mapper = new OracleTypeMapper(new RelationalTypeMapperDependencies());

            Assert.Equal(
                "varbinary(100)",
                mapper.FindMapping(model.FindEntityType(typeof(MyRelatedType2)).FindProperty("Id")).StoreType);

            Assert.Equal(
                "varbinary(767)",
                mapper.FindMapping(model.FindEntityType(typeof(MyRelatedType3)).FindProperty("Relationship2Id")).StoreType);
        }
Beispiel #3
0
        public void Key_store_type_if_preferred_if_specified()
        {
            var model  = CreateModel();
            var mapper = new OracleTypeMapper(new RelationalTypeMapperDependencies());

            Assert.Equal(
                "DECIMAL(29,4)",
                mapper.FindMapping(model.FindEntityType(typeof(MyType)).FindProperty("Id")).StoreType);

            Assert.Equal(
                "DECIMAL(29,4)",
                mapper.FindMapping(model.FindEntityType(typeof(MyRelatedType1)).FindProperty("Relationship2Id")).StoreType);
        }
Beispiel #4
0
        public void String_key_with_unicode_is_picked_up_by_FK()
        {
            var model  = CreateModel();
            var mapper = new OracleTypeMapper(new RelationalTypeMapperDependencies());

            Assert.Equal(
                "VARCHAR2(900)",
                mapper.FindMapping(model.FindEntityType(typeof(MyRelatedType3)).FindProperty("Id")).StoreType);

            Assert.Equal(
                "VARCHAR2(900)",
                mapper.FindMapping(model.FindEntityType(typeof(MyRelatedType4)).FindProperty("Relationship1Id")).StoreType);
        }
Beispiel #5
0
        public void Binary_key_with_max_length_is_picked_up_by_FK()
        {
            var model  = CreateModel();
            var mapper = new OracleTypeMapper(new RelationalTypeMapperDependencies());

            Assert.Equal(
                "varbinary(100)",
                mapper.FindMapping(model.FindEntityType(typeof(MyRelatedType2)).FindProperty("Id")).StoreType);

            Assert.Equal(
                "varbinary(100)",
                mapper.FindMapping(model.FindEntityType(typeof(MyRelatedType3)).FindProperty("Relationship1Id")).StoreType);
        }
Beispiel #6
0
        public void Key_with_store_type_is_picked_up_by_FK()
        {
            var model  = CreateModel();
            var mapper = new OracleTypeMapper(new RelationalTypeMapperDependencies());

            Assert.Equal(
                "DECIMAL(29,4)",
                mapper.FindMapping(model.FindEntityType(typeof(MyType)).FindProperty("Id")).StoreType);

            Assert.Equal(
                "DECIMAL(29,4)",
                mapper.FindMapping(model.FindEntityType(typeof(MyRelatedType1)).FindProperty("Relationship1Id")).StoreType);
        }