We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
If execute Linq2DB method
public async Task<T> GetAsync(CancellationToken cancellationToken) { Memory? memory = await context.Memories.FirstOrDefaultAsync(v => v.Key == key, cancellationToken); <-- if (memory is null) return defaultValue; return JsonSerializer.Deserialize<T>(memory.Value) ?? defaultValue; }
throw error
System.MissingMethodException: Method not found: 'Void LinqToDB.Mapping.MappingSchema.SetConvertExpression(System.Type, System.Type, System.Linq.Expressions.LambdaExpression, Boolean)'. at LinqToDB.EntityFrameworkCore.LinqToDBForEFToolsImplDefault.<>c__DisplayClass14_0.<DefineConvertors>g__MapEFCoreType|1(Type modelType) at LinqToDB.EntityFrameworkCore.LinqToDBForEFToolsImplDefault.DefineConvertors(MappingSchema mappingSchema, IModel model, IValueConverterSelector convertorSelector, DataOptions dataOptions) at LinqToDB.EntityFrameworkCore.LinqToDBForEFToolsImplDefault.CreateMappingSchema(IModel model, IMetadataReader metadataReader, IValueConverterSelector convertorSelector, DataOptions dataOptions) at LinqToDB.EntityFrameworkCore.LinqToDBForEFToolsImplDefault.<>c__DisplayClass17_0.<GetMappingSchema>b__0(ICacheEntry e) at Microsoft.Extensions.Caching.Memory.CacheExtensions.GetOrCreate[TItem](IMemoryCache cache, Object key, Func`2 factory) at LinqToDB.EntityFrameworkCore.LinqToDBForEFToolsImplDefault.GetMappingSchema(IModel model, IMetadataReader metadataReader, IValueConverterSelector convertorSelector, DataOptions dataOptions) at LinqToDB.EntityFrameworkCore.LinqToDBForEFTools.GetMappingSchema(IModel model, IInfrastructure`1 accessor, DataOptions dataOptions) at LinqToDB.EntityFrameworkCore.LinqToDBForEFTools.CreateLinqToDBContext(DbContext context, IDbContextTransaction transaction) at LinqToDB.EntityFrameworkCore.LinqToDBForEFTools.ToLinqToDBTable[T](DbSet`1 dbSet) at A2Core.Infrastructure.DataBase.ApplicationDbContext.A2Core.Application.Common.Interfaces.IContext.get_Memories() in C:\GitHub\StudiaA2\a2-core\src\a2\A2Core.Infrastructure\DataBase\ApplicationDbContext.cs:line 30 at A2Core.Infrastructure.DataBase.MemoryRepository.MemoryProperty`1.GetAsync(CancellationToken cancellationToken) in C:\GitHub\StudiaA2\a2-core\src\a2\A2Core.Infrastructure\DataBase\MemoryRepository.cs:line 20 at A2Core.Infrastructure.Listeners.BePaidPaymentListener.DoScopeTickAsync(IServiceProvider provider, Boolean isHandle, CancellationToken cancellationToken) in C:\GitHub\StudiaA2\a2-core\src\a2\A2Core.Infrastructure\Listeners\BePaidPaymentListener.cs:line 43 at A2Core.Infrastructure.Listeners.BaseScopeLoopSerivce.DoTickAsync(Boolean isHandle, CancellationToken cancellationToken) in C:\GitHub\StudiaA2\a2-core\src\a2\A2Core.Infrastructure\Listeners\BaseScopeLoopSerivce.cs:line 15 at A2Core.Infrastructure.Listeners.BaseScopeLoopSerivce.DoTickAsync(Boolean isHandle, CancellationToken cancellationToken) in C:\GitHub\StudiaA2\a2-core\src\a2\A2Core.Infrastructure\Listeners\BaseScopeLoopSerivce.cs:line 15 at A2Core.Infrastructure.Listeners.BaseLoopSerivce.DoLoopAsync(CancellationToken cancellationToken) in C:\GitHub\StudiaA2\a2-core\src\a2\A2Core.Infrastructure\Listeners\BaseLoopSerivce.cs:line 36
DbContext:
public partial class ApplicationDbContext : DbContext, IContext { public ApplicationDbContext() { } public ApplicationDbContext(DbContextOptions<ApplicationDbContext> options) : base(options) { } // -- ANY CODE -- public DbSet<Memory> Memories { get; set; } // -- ANY CODE -- ITable<Memory> IContext.Memories => Memories.ToLinqToDBTable(); <-- ERROR // -- ANY CODE -- protected override void OnModelCreating(ModelBuilder modelBuilder) { // -- ANY CODE -- modelBuilder .Entity<Memory>(entity => { entity.ToTable("memories"); entity.HasKey(e => e.Key); entity.Property(e => e.Key); entity.Property(e => e.Value); }); // -- ANY CODE -- } // -- ANY CODE -- }
Method LinqToDBForEFTools.Initialize(); executed before setup DB
LinqToDBForEFTools.Initialize();
Relevant Nuget Packages:
The text was updated successfully, but these errors were encountered:
As workaround downgrade linq2db to 5.3.2
Sorry, something went wrong.
MaceWindu
Successfully merging a pull request may close this issue.
If execute Linq2DB method
throw error
DbContext:
Method
LinqToDBForEFTools.Initialize();
executed before setup DBRelevant Nuget Packages:
The text was updated successfully, but these errors were encountered: