Activities of "alex.maiereanu@3sstudio.com"

Hi

I understand that it's difficult for you to move forward, but you also need to understand that we can't just share customer projects :D. What I'm asking from you is for help to see how we can better catch this exception and see what is going on. Is there a way to add better error handling? Would you have a hunch from where this originates?

Thats the issue

I can't reproduce the issue consistently on my project, which has more than 100 tests and of course on a new sample project this is not appearing.

My hunch is that this is starting to be a problem after X amount of tests are added.

Hi liangshiwei,

Thanks for the quick reply.

Since we are running a new project, from template version 8.0.5, we already have all the proposed fixes implemented.

This is the EF test project module:




public class MyEntityFrameworkCoreTestModule : AbpModule
{
private SqliteConnection? \_sqliteConnection;

public override void ConfigureServices(ServiceConfigurationContext context)
{
    Configure<FeatureManagementOptions>(options =>
    {
        options.SaveStaticFeaturesToDatabase = false;
        options.IsDynamicFeatureStoreEnabled = false;
    });
    Configure<PermissionManagementOptions>(options =>
    {
        options.SaveStaticPermissionsToDatabase = false;
        options.IsDynamicPermissionStoreEnabled = false;
    });
    Configure<TextTemplateManagementOptions>(options =>
    {
        options.SaveStaticTemplatesToDatabase = false;
        options.IsDynamicTemplateStoreEnabled = false;
    });
    context.Services.AddAlwaysDisableUnitOfWorkTransaction();

    ConfigureInMemorySqlite(context.Services);

}

private void ConfigureInMemorySqlite(IServiceCollection services)
{
    _sqliteConnection = CreateDatabaseAndGetConnection();

    services.Configure<AbpDbContextOptions>(options =>
    {
        options.Configure(context =>
        {
            context.DbContextOptions.UseSqlite(_sqliteConnection);
        });
    });
}

public override void OnApplicationShutdown(ApplicationShutdownContext context)
{
    _sqliteConnection?.Dispose();
}

private static SqliteConnection CreateDatabaseAndGetConnection()
{
    var connection = new SqliteConnection("Data Source=:memory:");
    connection.Open();

    var options = new DbContextOptionsBuilder<QQDbContext>()
        .UseSqlite(connection)
        .Options;

    using (var context = new QQDbContext(options))
    {
        context.GetService<IRelationalDatabaseCreator>().CreateTables();
    }

    return connection;
}
Answer

Hi, before closing the ticket,

any news on points:

  • Why are empty “if” statements added in DbContext?
  • ABP recommendations not respected in Domain Service

Regarding your answer on: Will child entities be handled through its master entity? I understand that you want to provide more freedom and I suppose this is the 80% case, but at least in our opinion, by trying to adhere to DDD principles, the child entities should be updated over the AggregateRoot and not have customization points. In my opinion, it would be the best if ABP suite can provide both options to users in order to have freedom to implement based on the application needs. Also, if you automatically create the appservice, it's not possible to hide the api endpoints for the child entity.

Answer

Hi,

Thanks for your replies so far. I have created an ticket related to the angular questions

Zobrazeno od 1 do 5 z celkem 5 záznamů
Made with ❤️ on ABP v8.2.0-preview Updated on března 25, 2024, 15:11