Activities of "ishaq.alzidi"

Question

Check the docs before asking a question: https://docs.abp.io/en/commercial/latest/ Check the samples, to see the basic tasks: https://docs.abp.io/en/commercial/latest/samples/index The exact solution to your question may have been answered before, please use the search on the homepage.

  • ABP Framework version: v3.3.1
  • UI type: Angular
  • ** Identity Server Seperated (Angular)**:
  • Exception message and stack trace:
  • Cannot access a disposed object. A common cause of this error is disposing a context that was resolved from dependency injection and then later trying to use the same context instance elsewhere in your application. This may occur if you are calling Dispose() on the context, or wrapping the context in a using statement. If you are using dependency injection, you should let the dependency injection container take care of disposing context instances
  • Steps to reproduce the issue: Run Test

I'm getting an error while I'm running AsyncExecuter with any methods (FirstOrDefaultAsync, ToListAsync ... etc) in test projects or in scope dependency injection the exception message is

Cannot access a disposed object. A common cause of this error is disposing a context that was resolved from dependency injection and then later trying to use the same context instance elsewhere in your application. This may occur if you are calling Dispose() on the context, or wrapping the context in a using statement. If you are using dependency injection, you should let the dependency injection container take care of disposing context instances
Answer

Thanks that's work be use change tenant

Question

Check the docs before asking a question: https://docs.abp.io/en/commercial/latest/ Check the samples, to see the basic tasks: https://docs.abp.io/en/commercial/latest/samples/index The exact solution to your question may have been answered before, please use the search on the homepage.

  • ABP Framework version: v3.1.2
  • UI type: Angular
  • Tiered (MVC) or Identity Server Seperated (Angular): yes
  • Exception message and stack trace:
  • Steps to reproduce the issue:

Hi,

I am trying to seed some tenants by writing some code inside Tenant SaasDataSeedContributor class found under Domain. I was able to seed those tenants but I was not able to create an admin user for each tenant allthough I called SeedAsync().WithProperty() . Here is the code snippet that I did :

            await _editionDataSeeder.CreateStandardEditionsAsync();

            await _unitOfWorkManager.Current.SaveChangesAsync();


            var standardEdition = (await _editionRepository.GetListAsync())
                .FirstOrDefault(ed => ed.DisplayName == "Standard");

            if (standardEdition != null)
            {
                var tenant1 = _tenantRepository.FindByName("Tenant1", false);

                if (tenant1 == null)
                {
                    tenant1 = await _tenantManager.CreateAsync("Tenant1", standardEdition.Id);
                    tenant1.SetProperty("EnglishDescription", "Tenant1");
                    tenant1.SetProperty("ArabicDescription", "جهة 1");

                    tenant1Result = await _tenantRepository.InsertAsync(tenant1, true);

                    await DataSeeder.SeedAsync(new DataSeedContext(tenant1.Id)
                        .WithProperty("AdminEmail", "info@abp.io")
                        .WithProperty("AdminPassword", "1q2w3E*"));

                }
             }
             

Your help is most appreciated

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