mardi 2 juin 2015

Entity Framework + SQlite not supporting 'DateTimeOffset'

I am using EF 6 and SQLite for unit testing. i got not supported error for DateTimeOffset. how to map DataTimeOffset to SQlite. here is the stack trace Test Name: CanAddPaymentEvent

Result Message: Initialization method CapitalGroup.Apollo.Domain.Test.EntityFramework.PaymentStreamCollectionHistoryEntityFrameworkTest.Initialize threw exception. System.NotSupportedException: System.NotSupportedException: There is no store type corresponding to the EDM type 'Edm.DateTimeOffset' of primitive type 'DateTimeOffset'.. Result StackTrace:
at System.Data.SQLite.EF6.SQLiteProviderManifest.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, EntitySetMapping entitySetMapping, MappingFragment 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.ModelConfiguration.Edm.EdmModelExtensions.GenerateDatabaseMapping(EdmModel model, DbProviderInfo providerInfo, DbProviderManifest providerManifest) 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.InternalContext.Initialize() at System.Data.Entity.Internal.InternalContext.GetEntitySetAndBaseTypeForType(Type entityType) at System.Data.Entity.Internal.Linq.InternalSet1.Initialize() at System.Data.Entity.Internal.Linq.InternalSet1.get_InternalContext() at System.Data.Entity.Infrastructure.DbQuery1.System.Linq.IQueryable.get_Provider() at System.Linq.Queryable.Any[TSource](IQueryable1 source, Expression1 predicate)

Aucun commentaire:

Enregistrer un commentaire