Activities of "liangshiwei"

Hi,

Can you provide steps to reproduce? thanks.

After my test, the following code is ok.

Configure<AbpDbContextOptions>(options =>
{

    options.Configure(c =>
    {
        c.UseSqlServer();
        c.DbContextOptions.UseTriggers(t =>
        {
            t.UseApplicationScopedServiceProviderAccessor(_ => _.CreateScope().ServiceProvider);
        });

    });
});

Hi,

Open EntityFrameworkCoreModule class and remove Configure<AbpDbContextOptions>... code block.

Open EntityFrameworkCoreDbMigrationsModule clsss and add following code:


context.Services.AddEFSecondLevelCache(options =>
    options.UseMemoryCacheProvider().DisableLogging(true).UseCacheKeyPrefix("EF_"));
    
Configure<AbpDbContextOptions>(options =>
{
    options.Configure(c =>
    {
        c.UseSqlServer(builder =>
        {
            builder.CommandTimeout((int) TimeSpan.FromMinutes(3).TotalSeconds)
                .MigrationsAssembly(typeof(QaEntityFrameworkCoreDbMigrationsModule).Assembly.FullName);
        }).AddInterceptors(c.ServiceProvider.GetRequiredService<SecondLevelCacheInterceptor>());
    });
});

Hi,

It looks like a problem, can you provide steps to reproduce? thanks. if there is a problem, we will fix it.

hi,

This way will be better

c.DbContextOptions.UseTriggers(t =>
{
    t.UseApplicationScopedServiceProviderAccessor(_ => _.GetRequiredService<IHttpContextAccessor>().HttpContext?.RequestServices);
});

Current directory is not wwwroot.

May be you can try .WriteTo.Async(c => c.File("logs.txt"))

Hi,

You can try :

services.AddAbpSwaggerGenWithOAuth(...,options =>
{
    ......
    
    options.CustomSchemaIds(type => type.ToString());
});

ABP uses a naming convention to register DI.

Your repository name is CompanyBRRepository and it should be CompanyBranchRepository

Also, see: https://docs.abp.io/en/abp/latest/Dependency-Injection

Hi,

Try:

public class AppUser : ...
{
  public ExistProfile ExistProfile {get;set}
}

public class ExistProfile : ...
{
   public Guid AppUserId {get;set;}
   public AppUser AppUser {get;set;}
}

MigrationsDbContext

builder.Entity<ExistProfile>(b =>
{
    b.Ignore(x => x.AppUser);
    b.HasOne<IdentityUser>().WithOne().HasForeignKey<ExistProfile>(x => x.AppUserId);
});

DbContext

builder.Entity<ExistProfile>(b =>
{
    b.HasOne(x => x.AppUser).WithOne(x => x.ExistProfile).HasForeignKey<ExistProfile>(x => x.AppUserId);
});

Hi,

Maybe I can check it remotely. shiwei.liang@volosoft.com

Showing 5101 to 5110 of 5968 entries
Made with ❤️ on ABP v9.1.0-preview. Updated on November 11, 2024, 11:11