Base solution for your next web application

Activities of "hussein"

I followed your steps and everything is working great, but the only problem is how to create a repository class for an entity from the second dbContext.

The repository class inherits from RepositroyBase<entity> and the constructor takes any class that inherts AbpDbContext class.

what i need now is to use Context property on my repository and see its own IDbSet<Entity>.

I want the system to decide which database to connect while running time based on some logic after user login. So, how to set the connectionstring programmatically?

Thanks

Thanks hikalkan for the reply,

what i'm doing now is multi-tenancy application but using more than database not one database and a tenant id for each record.

I have a login database and when user login i get his database name which the system should connect to, so i want from the AccountController to pass the database name to my DbContext. How can i do that ?

Thanks

Thanks hikalkan,

i already used 2 DbContexts one for the login information and tenant data and the other one for each instance data.

when user login he can access the first DbContext and get his tenant database name and then i want to pass this database name to the other DbContext to set the its connectionstring.

i want to use TenantId that in the second DbContext to pass the tenant-id throught it but i don't know how to set the TenantId inside AbpSession?

No, i'm using ASP.NET Boilerplate Framework and TenantId or UserId are always Null.

How to set values for TenantId or UserId ?

Hi,

I want to add an AppService and a Repository for Azure and this repository will not access database it just doing somethings on cloud. so, if i added something like this

public interface IBlobAppService : IApplicationService public interface IBlobRepository : IRepository

Will these open a connection to the database? if yes, so how to make the DI working without opening a connection to the database because this service and repository will not access the database.

Thanks,

Hi,

Thank you for replying.

What about IRepository, if i did an interface called IExambleRepository implements IRepositoy will this open a connection to the database?

Hi,

I want to use IdentityServer4 with abp .net core but i can't there are couple problems that i face

could you please let me know how to do this ?

i want to use this example with abp dotnetcore framework

<a class="postlink" href="http://docs.identityserver.io/en/release/quickstarts/6_aspnet_identity.html">http://docs.identityserver.io/en/releas ... ntity.html</a>

My ConfigureServices method contains return services.AddAbp<EventoTixWebModule>(options => { //Configure Log4Net logging options.IocManager.IocContainer.AddFacility<LoggingFacility>( f => f.UseAbpLog4Net().WithConfig("log4net.config") ); });

My configure method contains app.UseAbp(); app.UseAppBuilder(ConfigureOwinServices);

And that's the exception 'Microsoft.AspNetCore.Identity.UserManager`1[[EventoTix.Users.User, EventoTix.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]_b66a8aa6-a49b-47c6-a3b3-d6e943ee4c47' is waiting for the following dependencies:

  • Service 'Microsoft.AspNetCore.Identity.IUserStore`1[[EventoTix.Users.User, EventoTix.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]' which was not registered.
Question

Hi,

GetAllInculding was working perfectly and after update to version 1.3.1 it throws exception

Exception The transaction operation cannot be performed because there are pending requests working on this transaction.

I don't know why

Thanks,

Hi,

After updating ABP to latest version i'm getting this error after running the application

"Can't create component 'HelpCenter.User.UserManager' as it has dependencies to be satisfied.\r\n\r\n'HelpCenter.User.UserManager' is waiting for the following dependencies:\r\n- Service 'HelpCenter.Authorization.RoleManager' which was registered but is also waiting for dependencies.\r\n'HelpCenter.Authorization.RoleManager' is waiting for the following dependencies:\r\n- Service 'Abp.Zero.Configuration.IRoleManagementConfig' which was not registered.\r\n- Service 'Abp.Organizations.IOrganizationUnitSettings' which was not registered.\r\n- Service 'Abp.IdentityFramework.IdentityEmailMessageService' which was not registered.\r\n- Service 'Abp.Authorization.Users.IUserTokenProviderAccessor' which was not registered.\r\n"

and that's my UserManager class constructor

public UserManager( UserStore store, RoleManager roleManager, IPermissionManager permissionManager, IUnitOfWorkManager unitOfWorkManager, ISettingManager settingManager, ICacheManager cacheManager, IRepository<OrganizationUnit, long> organizationUnitRepository, IRepository<UserOrganizationUnit, long> userOrganizationUnitRepository, IOrganizationUnitSettings organizationUnitSettings, ILocalizationManager localizationManager, IdentityEmailMessageService emailService, IUserTokenProviderAccessor userTokenProviderAccessor, IRepository<User, long> userRepository, IEmailManager emailManager, IRepository<UserPermissionSetting, long> userPermissionRepository, IRepository<Tenant> tenantRepository, IRepository<ForgotPassword, long> forgotPasswordRepository, IEventBus eventBus

     )
     : base(
         store,
         roleManager,
         permissionManager,
         unitOfWorkManager,
         cacheManager,
         organizationUnitRepository,
         userOrganizationUnitRepository,
         organizationUnitSettings,
         localizationManager,
         emailService,
         settingManager,
         userTokenProviderAccessor
           )
    {
        _userRepository = userRepository;
        _userPermissionRepository = userPermissionRepository;
        _unitOfWorkManager = unitOfWorkManager;
        _tenantRepository = tenantRepository;
        _forgotPasswordRepository = forgotPasswordRepository;
        EventBus = eventBus;
    }
Showing 1 to 10 of 13 entries