Page 1 of 1
PostgreSQL Database.Exists()
Posted: Wed 28 May 2014 14:26
by nastradamus
I'm trying to find out, if a database exist in my postgres server or not throught the EF 6, by using
. Unfortunatly, I always receive the following exception:
Code: Select all
The provider did not return a ProviderManifestToken string
A solution of a similar problem is available, but only for MYSQL (See [1]). I tried this approach:
Code: Select all
var config = Devart.Data.PostgreSql.Entity.Configuration.PgSqlEntityProviderConfig.Instance;
config.DatabaseScript.Schema.DeleteDatabaseBehaviour = Devart.Data.PostgreSql.Entity.Configuration.DeleteDatabaseBehaviour.Database;
but it could not solve my problem.
Could you please help me to fix this problem.
Thank you in advance
[1]
http://forums.devart.com/ru/viewtopic.php?f=29&t=13684
Re: POstgreSQL Database.Exists()
Posted: Thu 29 May 2014 04:23
by Shalex
Please specify the full stack trace of the error with all inner exceptions.
Re: POstgreSQL Database.Exists()
Posted: Mon 02 Jun 2014 07:53
by nastradamus
Thank you Shalex for your quick answer. here is my stacktrace:
Code: Select all
bei System.Linq.Enumerable.Single[TSource](IEnumerable`1 source, Func`2 predicate)
bei System.Data.Entity.Utilities.DbProviderManifestExtensions.GetStoreTypeFromName(DbProviderManifest providerManifest, String name)
bei System.Data.Entity.ModelConfiguration.Configuration.Properties.Primitive.PrimitivePropertyConfiguration.Configure(EdmProperty column, EntityType table, DbProviderManifest providerManifest, Boolean allowOverride, Boolean fillFromExistingConfiguration)
bei System.Data.Entity.ModelConfiguration.Configuration.Properties.Primitive.PrimitivePropertyConfiguration.<>c__DisplayClass1.<Configure>b__0(Tuple`2 pm)
bei System.Data.Entity.Utilities.IEnumerableExtensions.Each[T](IEnumerable`1 ts, Action`1 action)
bei System.Data.Entity.ModelConfiguration.Configuration.Properties.Primitive.PrimitivePropertyConfiguration.Configure(IEnumerable`1 propertyMappings, DbProviderManifest providerManifest, Boolean allowOverride, Boolean fillFromExistingConfiguration)
bei System.Data.Entity.ModelConfiguration.Configuration.Properties.Primitive.BinaryPropertyConfiguration.Configure(IEnumerable`1 propertyMappings, DbProviderManifest providerManifest, Boolean allowOverride, Boolean fillFromExistingConfiguration)
bei System.Data.Entity.ModelConfiguration.Configuration.Types.StructuralTypeConfiguration.ConfigurePropertyMappings(IList`1 propertyMappings, DbProviderManifest providerManifest, Boolean allowOverride)
bei System.Data.Entity.ModelConfiguration.Configuration.Types.EntityTypeConfiguration.ConfigurePropertyMappings(DbDatabaseMapping databaseMapping, EntityType entityType, DbProviderManifest providerManifest, Boolean allowOverride)
bei System.Data.Entity.ModelConfiguration.Configuration.Types.EntityTypeConfiguration.Configure(EntityType entityType, DbDatabaseMapping databaseMapping, DbProviderManifest providerManifest)
bei System.Data.Entity.ModelConfiguration.Configuration.ModelConfiguration.ConfigureEntityTypes(DbDatabaseMapping databaseMapping, DbProviderManifest providerManifest)
bei System.Data.Entity.ModelConfiguration.Configuration.ModelConfiguration.Configure(DbDatabaseMapping databaseMapping, DbProviderManifest providerManifest)
bei System.Data.Entity.DbModelBuilder.Build(DbProviderManifest providerManifest, DbProviderInfo providerInfo)
bei System.Data.Entity.DbModelBuilder.Build(DbConnection providerConnection)
bei System.Data.Entity.Internal.LazyInternalContext.CreateModel(LazyInternalContext internalContext)
bei System.Data.Entity.Internal.RetryLazy`2.GetValue(TInput input)
bei System.Data.Entity.Internal.LazyInternalContext.InitializeContext()
bei System.Data.Entity.Internal.InternalContext.CreateObjectContextForDdlOps()
bei System.Data.Entity.Database.Exists()
bei Program.CheckDatabaseExists(FreiZeitDatabaseContext Context) in path_to_file\program.cs:line 172.
Re: PostgreSQL Database.Exists()
Posted: Mon 02 Jun 2014 10:31
by MariiaI
We have contacted you by e-mail.