Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

There is no store type corresponding to the conceptual side type 'DateTimeOffset' of primitive type 'DateTimeOffset'. #1

Closed
danesavot opened this issue Feb 26, 2014 · 3 comments

Comments

@danesavot
Copy link

PM> Add-Migration AddAuditLog
Scaffolding migration 'AddAuditLog'.
The Designer Code for this migration file includes a snapshot of your current Code First model. This snapshot is used to calculate the changes to your model when you scaffold the next migration. If you make additional changes to your model that you want to include in this migration, then you can re-scaffold it by running 'Add-Migration AddAuditLog' again.
PM> Add-Migration AddAuditLog
System.NotSupportedException: There is no store type corresponding to the conceptual side type 'DateTimeOffset' of primitive type 'DateTimeOffset'.
at System.Data.Entity.SqlServer.SqlProviderManifest.GetStorePrimitiveTypeIfPostSql9(String storeTypeName, String nameForException, PrimitiveTypeKind primitiveTypeKind)
at System.Data.Entity.SqlServer.SqlProviderManifest.GetStoreType(TypeUsage edmType)
at System.Data.Entity.ModelConfiguration.Edm.Services.StructuralTypeMappingGenerator.MapTableColumn(EdmProperty property, String columnName, Boolean isInstancePropertyOnDerivedType)
at System.Data.Entity.ModelConfiguration.Edm.Services.PropertyMappingGenerator.Generate(EntityType entityType, IEnumerable1 properties, StorageEntitySetMapping entitySetMapping, StorageMappingFragment entityTypeMappingFragment, IList1 propertyPath, Boolean createNewColumn)
at System.Data.Entity.ModelConfiguration.Edm.Services.TableMappingGenerator.Generate(EntityType entityType, DbDatabaseMapping databaseMapping)
at System.Data.Entity.ModelConfiguration.Edm.Services.DatabaseMappingGenerator.GenerateEntityTypes(DbDatabaseMapping databaseMapping)
at System.Data.Entity.ModelConfiguration.Edm.Services.DatabaseMappingGenerator.Generate(EdmModel conceptualModel)
at System.Data.Entity.DbModelBuilder.Build(DbProviderManifest providerManifest, DbProviderInfo providerInfo)
at System.Data.Entity.DbModelBuilder.Build(DbConnection providerConnection)
at System.Data.Entity.Internal.LazyInternalContext.CreateModel(LazyInternalContext internalContext)
at System.Data.Entity.Internal.RetryLazy2.GetValue(TInput input) at System.Data.Entity.Internal.LazyInternalContext.InitializeContext() at System.Data.Entity.Internal.LazyInternalContext.get_ModelBeingInitialized() at System.Data.Entity.Infrastructure.EdmxWriter.WriteEdmx(DbContext context, XmlWriter writer) at System.Data.Entity.Utilities.DbContextExtensions.<>c__DisplayClass1.<GetModel>b__0(XmlWriter w) at System.Data.Entity.Utilities.DbContextExtensions.GetModel(Action1 writeXml)
at System.Data.Entity.Utilities.DbContextExtensions.GetModel(DbContext context)
at System.Data.Entity.Migrations.DbMigrator..ctor(DbMigrationsConfiguration configuration, DbContext usersContext)
at System.Data.Entity.Migrations.DbMigrator..ctor(DbMigrationsConfiguration configuration)
at System.Data.Entity.Migrations.Design.MigrationScaffolder..ctor(DbMigrationsConfiguration migrationsConfiguration)
at System.Data.Entity.Migrations.Design.ToolingFacade.ScaffoldRunner.Run()
at System.AppDomain.DoCallBack(CrossAppDomainDelegate callBackDelegate)
at System.AppDomain.DoCallBack(CrossAppDomainDelegate callBackDelegate)
at System.Data.Entity.Migrations.Design.ToolingFacade.Run(BaseRunner runner)
at System.Data.Entity.Migrations.Design.ToolingFacade.Scaffold(String migrationName, String language, String rootNamespace, Boolean ignoreChanges)
at System.Data.Entity.Migrations.AddMigrationCommand.Execute(String name, Boolean force, Boolean ignoreChanges)
at System.Data.Entity.Migrations.AddMigrationCommand.<>c__DisplayClass2.<.ctor>b__0()
at System.Data.Entity.Migrations.MigrationsDomainCommand.Execute(Action command)
There is no store type corresponding to the conceptual side type 'DateTimeOffset' of primitive type 'DateTimeOffset'.
PM> Add-Migration AddAuditLog
System.NotSupportedException: There is no store type corresponding to the conceptual side type 'DateTimeOffset' of primitive type 'DateTimeOffset'.
at System.Data.Entity.SqlServer.SqlProviderManifest.GetStorePrimitiveTypeIfPostSql9(String storeTypeName, String nameForException, PrimitiveTypeKind primitiveTypeKind)
at System.Data.Entity.SqlServer.SqlProviderManifest.GetStoreType(TypeUsage edmType)
at System.Data.Entity.ModelConfiguration.Edm.Services.StructuralTypeMappingGenerator.MapTableColumn(EdmProperty property, String columnName, Boolean isInstancePropertyOnDerivedType)
at System.Data.Entity.ModelConfiguration.Edm.Services.PropertyMappingGenerator.Generate(EntityType entityType, IEnumerable1 properties, StorageEntitySetMapping entitySetMapping, StorageMappingFragment entityTypeMappingFragment, IList1 propertyPath, Boolean createNewColumn)
at System.Data.Entity.ModelConfiguration.Edm.Services.TableMappingGenerator.Generate(EntityType entityType, DbDatabaseMapping databaseMapping)
at System.Data.Entity.ModelConfiguration.Edm.Services.DatabaseMappingGenerator.GenerateEntityTypes(DbDatabaseMapping databaseMapping)
at System.Data.Entity.ModelConfiguration.Edm.Services.DatabaseMappingGenerator.Generate(EdmModel conceptualModel)
at System.Data.Entity.DbModelBuilder.Build(DbProviderManifest providerManifest, DbProviderInfo providerInfo)
at System.Data.Entity.DbModelBuilder.Build(DbConnection providerConnection)
at System.Data.Entity.Internal.LazyInternalContext.CreateModel(LazyInternalContext internalContext)
at System.Data.Entity.Internal.RetryLazy2.GetValue(TInput input) at System.Data.Entity.Internal.LazyInternalContext.InitializeContext() at System.Data.Entity.Internal.LazyInternalContext.get_ModelBeingInitialized() at System.Data.Entity.Infrastructure.EdmxWriter.WriteEdmx(DbContext context, XmlWriter writer) at System.Data.Entity.Utilities.DbContextExtensions.<>c__DisplayClass1.<GetModel>b__0(XmlWriter w) at System.Data.Entity.Utilities.DbContextExtensions.GetModel(Action1 writeXml)
at System.Data.Entity.Utilities.DbContextExtensions.GetModel(DbContext context)
at System.Data.Entity.Migrations.DbMigrator..ctor(DbMigrationsConfiguration configuration, DbContext usersContext)
at System.Data.Entity.Migrations.DbMigrator..ctor(DbMigrationsConfiguration configuration)
at System.Data.Entity.Migrations.Design.MigrationScaffolder..ctor(DbMigrationsConfiguration migrationsConfiguration)
at System.Data.Entity.Migrations.Design.ToolingFacade.ScaffoldRunner.Run()
at System.AppDomain.DoCallBack(CrossAppDomainDelegate callBackDelegate)
at System.AppDomain.DoCallBack(CrossAppDomainDelegate callBackDelegate)
at System.Data.Entity.Migrations.Design.ToolingFacade.Run(BaseRunner runner)
at System.Data.Entity.Migrations.Design.ToolingFacade.Scaffold(String migrationName, String language, String rootNamespace, Boolean ignoreChanges)
at System.Data.Entity.Migrations.AddMigrationCommand.Execute(String name, Boolean force, Boolean ignoreChanges)
at System.Data.Entity.Migrations.AddMigrationCommand.<>c__DisplayClass2.<.ctor>b__0()
at System.Data.Entity.Migrations.MigrationsDomainCommand.Execute(Action command)
There is no store type corresponding to the conceptual side type 'DateTimeOffset' of primitive type 'DateTimeOffset'.

@bilal-fazlani
Copy link
Owner

Hi, Which version of sql server are you using ?

@Moantonio
Copy link

Error! Help me, please
There is no store type corresponding to the conceptual side type 'DateTimeOffset' of primitive type 'DateTimeOffset'.

Descripción: Excepción no controlada al ejecutar la solicitud Web actual. Revise el seguimiento de la pila para obtener más información acerca del error y dónde se originó en el código.

Detalles de la excepción: System.NotSupportedException: There is no store type corresponding to the conceptual side type 'DateTimeOffset' of primitive type 'DateTimeOffset'.

Error de código fuente:

Línea 24: // Only run migrations for SQL server (Sql ce not supported as yet)
Línea 25: var settings = new MigrationsConfiguration();
Línea 26: var migrator = new DbMigrator(settings);
Línea 27: migrator.Update();
Línea 28: }

: There is no store type corresponding to the conceptual side type 'DateTimeOffset' of primitive type 'DateTimeOffset'.]
System.Data.Entity.SqlServer.SqlProviderManifest.GetStorePrimitiveTypeIfPostSql9(String storeTypeName, String nameForException, PrimitiveTypeKind primitiveTypeKind) +210
System.Data.Entity.SqlServer.SqlProviderManifest.GetStoreType(TypeUsage edmType) +4269
System.Data.Entity.ModelConfiguration.Edm.Services.StructuralTypeMappingGenerator.MapTableColumn(EdmProperty property, String columnName, Boolean isInstancePropertyOnDerivedType) +141
System.Data.Entity.ModelConfiguration.Edm.Services.PropertyMappingGenerator.Generate(EntityType entityType, IEnumerable1 properties, StorageEntitySetMapping entitySetMapping, StorageMappingFragment entityTypeMappingFragment, IList1 propertyPath, Boolean createNewColumn) +1396
System.Data.Entity.ModelConfiguration.Edm.Services.TableMappingGenerator.Generate(EntityType entityType, DbDatabaseMapping databaseMapping) +721
System.Data.Entity.ModelConfiguration.Edm.Services.DatabaseMappingGenerator.GenerateEntityTypes(DbDatabaseMapping databaseMapping) +189
System.Data.Entity.ModelConfiguration.Edm.Services.DatabaseMappingGenerator.Generate(EdmModel conceptualModel) +65
System.Data.Entity.ModelConfiguration.Edm.EdmModelExtensions.GenerateDatabaseMapping(EdmModel model, DbProviderInfo providerInfo, DbProviderManifest providerManifest) +73
System.Data.Entity.DbModelBuilder.Build(DbProviderManifest providerManifest, DbProviderInfo providerInfo) +425
System.Data.Entity.DbModelBuilder.Build(DbConnection providerConnection) +103
System.Data.Entity.Internal.LazyInternalContext.CreateModel(LazyInternalContext internalContext) +143
System.Data.Entity.Internal.RetryLazy2.GetValue(TInput input) +171 System.Data.Entity.Internal.LazyInternalContext.InitializeContext() +590 System.Data.Entity.Internal.LazyInternalContext.get_ModelBeingInitialized() +31 System.Data.Entity.Infrastructure.EdmxWriter.WriteEdmx(DbContext context, XmlWriter writer) +174 System.Data.Entity.Utilities.<>c__DisplayClass1.b__0(XmlWriter w) +40 System.Data.Entity.Utilities.DbContextExtensions.GetModel(Action1 writeXml) +163
System.Data.Entity.Utilities.DbContextExtensions.GetModel(DbContext context) +119
System.Data.Entity.Migrations.DbMigrator..ctor(DbMigrationsConfiguration configuration, DbContext usersContext) +882
System.Data.Entity.Migrations.DbMigrator..ctor(DbMigrationsConfiguration configuration) +50
JabbR.Startup.DoMigrations(IJabbrConfiguration config) in c:\Users\Moises\Downloads\ejemplos signalR -web\JabbR-dev\JabbR-dev\JabbR\App_Start\Startup.Migrations.cs:26
JabbR.Startup.Configuration(IAppBuilder app) in c:\Users\Moises\Downloads\ejemplos signalR -web\JabbR-dev\JabbR-dev\JabbR\App_Start\Startup.cs:44

[TargetInvocationException: Se produjo una excepción en el destino de la invocación.]
System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) +0
System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) +92
System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +108
System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters) +19
Owin.Loader.<>c__DisplayClass12.b__b(IAppBuilder builder) +118
Owin.Loader.<>c__DisplayClass1.b__0(IAppBuilder builder) +254
Microsoft.Owin.Host.SystemWeb.<>c__DisplayClass2.b__0(IAppBuilder builder) +89
Microsoft.Owin.Host.SystemWeb.OwinAppContext.Initialize(Action1 startup) +892 Microsoft.Owin.Host.SystemWeb.OwinBuilder.Build(Action1 startup) +136
Microsoft.Owin.Host.SystemWeb.OwinHttpModule.InitializeBlueprint() +159
System.Threading.LazyInitializer.EnsureInitializedCore(T& target, Boolean& initialized, Object& syncLock, Func1 valueFactory) +115 System.Threading.LazyInitializer.EnsureInitialized(T& target, Boolean& initialized, Object& syncLock, Func1 valueFactory) +72
Microsoft.Owin.Host.SystemWeb.OwinHttpModule.Init(HttpApplication context) +104
System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +418
System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +172
System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +336
System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +296

[HttpException (0x80004005): Se produjo una excepción en el destino de la invocación.]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +9915300
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +101
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +254

@GeertvanHorrik
Copy link
Collaborator

Closing issue, received no meaningful response.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants