pmizel / DevMentor.Context.FileContext

FileContext is a data access layer (DAL) Framework for rapid data driven application development (RDDAD).
https://www.nuget.org/packages/FileContext/
16 stars 4 forks source link

Consider update to adapt .net 5? #2

Open jingliancui opened 3 years ago

jingliancui commented 3 years ago

I try to use this db to instead of the inmemory db (sqlite and efcore inmemory). But got this error:

Message: 
    System.TypeLoadException : Method 'CommitTransactionAsync' in type 'FileContextCore.Storage.Internal.FileContextTransactionManager' from assembly 'FileContextCore, Version=3.4.0.0, Culture=neutral, PublicKeyToken=165cac099da39c78' does not have an implementation.
  Stack Trace: 
    FileContextServiceCollectionExtensions.AddEntityFrameworkFileContextDatabase(IServiceCollection serviceCollection)
    FileContextOptionsExtension.ApplyServices(IServiceCollection services)
    ServiceProviderCache.ApplyServices(IDbContextOptions options, ServiceCollection services)
    <>c__DisplayClass4_0.<GetOrAdd>g__BuildServiceProvider|3()
    <>c__DisplayClass4_0.<GetOrAdd>b__2(Int64 k)
    ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory)
    ServiceProviderCache.GetOrAdd(IDbContextOptions options, Boolean providerRequired)
    DbContext.ctor(DbContextOptions options)
    IdentityUserContext`5.ctor(DbContextOptions options)
    IdentityDbContext`8.ctor(DbContextOptions options)
    IdentityDbContext`3.ctor(DbContextOptions options)
    IdentityDbContext.ctor(DbContextOptions options)
    ApplicationDbContext.ctor(DbContextOptions`1 options) line 12
    RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor, Boolean wrapExceptions)
    RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
    CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, RuntimeResolverContext context)
    CallSiteVisitor`2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument)
    CallSiteRuntimeResolver.VisitCache(ServiceCallSite callSite, RuntimeResolverContext context, ServiceProviderEngineScope serviceProviderEngine, RuntimeResolverLock lockType)
    CallSiteRuntimeResolver.VisitScopeCache(ServiceCallSite singletonCallSite, RuntimeResolverContext context)
    CallSiteVisitor`2.VisitCallSite(ServiceCallSite callSite, TArgument argument)
    CallSiteRuntimeResolver.Resolve(ServiceCallSite callSite, ServiceProviderEngineScope scope)
    <>c__DisplayClass1_0.<RealizeService>b__0(ServiceProviderEngineScope scope)
    ServiceProviderEngine.GetService(Type serviceType, ServiceProviderEngineScope serviceProviderEngineScope)
    ServiceProviderEngineScope.GetService(Type serviceType)
    ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType)
    ServiceProviderServiceExtensions.GetRequiredService[T](IServiceProvider provider)
    <>c.<ConfigureWebHost>b__0_0(IServiceCollection services) line 43
    <>c__DisplayClass10_0.<ConfigureServices>b__0(WebHostBuilderContext context, IServiceCollection services)
    <>c__DisplayClass11_0.<ConfigureServices>b__0(HostBuilderContext context, IServiceCollection builder)
    HostBuilder.CreateServiceProvider()
    HostBuilder.Build()
    WebApplicationFactory`1.CreateHost(IHostBuilder builder)
    WebApplicationFactory`1.EnsureServer()
    WebApplicationFactory`1.CreateDefaultClient(DelegatingHandler[] handlers)
    WebApplicationFactory`1.CreateDefaultClient(Uri baseAddress, DelegatingHandler[] handlers)
    WebApplicationFactory`1.CreateClient(WebApplicationFactoryClientOptions options)
    WebApplicationFactory`1.CreateClient()
    RegisterTest.Register(String url) line 26
    --- End of stack trace from previous location ---
pmizel commented 3 years ago

can you share your data structure? there is something wrong with one type.

jingliancui commented 3 years ago

Sorry for the late reply , I will upload the sample at weekend . Now i could provide tip about the issue, Exceptions is shown while I use this component in the Integration Test Framework (XUnit). MSDocs here: https://docs.microsoft.com/en-us/aspnet/core/test/integration-tests?view=aspnetcore-5.0