System.Data.Entity.Core.MetadataException: Schema specified is not valid

c# devart ef-code-first entity-framework-6

Question


To my solution, I made an attempt to implement a db-Migration. But it terminated with the following error:

System.Data.Entity.Core.MetadataException: Schema specified is not valid. Errors: 
(0,0) : error 0040: The Type NVARCHAR2 is not qualified with a namespace or alias. Only primitive types can be used without qualification.
(0,0) : error 0040: The Type TIMESTAMP is not qualified with a namespace or alias. Only primitive types can be used without qualification.
(0,0) : error 0040: The Type NCLOB is not qualified with a namespace or alias. Only primitive types can be used without qualification.
... (more errors are following)

My DbMigrationsConfiguration is as follows:

using System.Data.Entity.Migrations;
using Devart.Data.Oracle.Entity.Migrations;

namespace ProductInformation.Migrations
{
    public sealed class Configuration : DbMigrationsConfiguration<ProductInformationContext>
    {
        public Configuration()
        {
            AutomaticMigrationsEnabled = true;
            SetSqlGenerator(OracleConnectionInfo.InvariantName,
                new OracleEntityMigrationSqlGenerator());
        }

        protected override void Seed(ProductInformationContext context)
        {
        }
    }
}

my DbContext also

using System.Data.Entity;

namespace ProductInformation
{
    public sealed class ProductInformationContext : DbContext
    {
        static ProductInformationContext()
        {
            var config = Devart.Data.Oracle.Entity.Configuration.OracleEntityProviderConfig.Instance;
            config.CodeFirstOptions.RemoveSchemaFromDefaultConstraintName = true;
            config.CodeFirstOptions.TruncateLongDefaultNames = true;
            config.Workarounds.IgnoreDboSchemaName = true;
            config.DmlOptions.BatchUpdates.Enabled = true;
        }

        public ProductInformationContext()
            : base("name=ProductInformationConnectionString")
        {
        }

        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            modelBuilder.Entity<Price>().Property(p => p.Value).HasPrecision(8, 2);
        }

        // some other DbSet

        public DbSet<Price> Prices { get; set; }
    }
}

I have no idea what caused the mistake or how to fix it. The ColumnTypeCasingConventionCompatibility setting was earlier attempted, however it did not resolve the issues.

Oracle dotConnect 9.5.454.0
EF 6.2.0
.NET 4.6.1
12c Oracle

1
0
4/10/2018 3:21:24 PM

Popular Answer

ZZZ_tmp
0
4/10/2018 6:16:37 PM


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow