Open Closed

Joining ABP entities /tables with user define entities/tables #1858


User avatar
0
radhikashrotre created

  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): yes / no no
  • Exception message and stack trace: no
  • Steps to reproduce the issue:" no

I am trying to join abp entities with userdefined tables e.g Abpuser and AbpOrganizationUnit


5 Answer(s)
  • User Avatar
    0
    EngincanV created
    Support Team .NET Developer

    Hi @radhikashrotre, what is your ABP Framework version?

  • User Avatar
    0
    radhikashrotre created

    Hi @radhikashrotre, what is your ABP Framework version?

    ABP FW 4.4

  • User Avatar
    0
    EngincanV created
    Support Team .NET Developer

    With version 4.4, EntityFrameworkCore.DbMigrations project has been removed and DbContexts are unified. You can check this community article to understand the circumstances under that. If you were migrated your application from 4.3 to 4.4 please apply the steps in the article to unify your db context.

    Can you examine your db context class inherit from ISaasDbContext or not?

    [ReplaceDbContext(typeof(IIdentityProDbContext))]
    [ReplaceDbContext(typeof(ISaasDbContext))] //ensure this line is exists
    [ConnectionStringName("Default")]
    public class MyDbContext : 
            AbpDbContext<MyDbContext>, 
            IIdentityProDbContext,
            ISaasDbContext //ensure this line is exists
    {
        //...
    }
    
  • User Avatar
    0
    radhikashrotre created

    With version 4.4, EntityFrameworkCore.DbMigrations project has been removed and DbContexts are unified. You can check this community article to understand the circumstances under that. If you were migrated your application from 4.3 to 4.4 please apply the steps in the article to unify your db context.

    Can you examine your db context class inherit from ISaasDbContext or not?

    [ReplaceDbContext(typeof(IIdentityProDbContext))] 
    [ReplaceDbContext(typeof(ISaasDbContext))] //ensure this line is exists 
    [ConnectionStringName("Default")] 
    public class MyDbContext :  
            AbpDbContext<MyDbContext>,  
            IIdentityProDbContext, 
            ISaasDbContext //ensure this line is exists 
    { 
        //... 
    } 
    
    1. Yes, I have these lines of code in DBContext.
    2. I have used IdentityUser and IIdentityUserRepository to gather data for Users and OrganizationUnit with these I want to join based on condition my userdefined two entities.
    3. I have constructed a class where I have called IIdentityUserRepository, IdentityUser objects using Get method. Anything I need to change here.
  • User Avatar
    0
    EngincanV created
    Support Team .NET Developer
    1. Yes, I have these lines of code in DBContext.
    2. I have used IdentityUser and IIdentityUserRepository to gather data for Users and OrganizationUnit with these I want to join based on condition my userdefined two entities.
    3. I have constructed a class where I have called IIdentityUserRepository, IdentityUser objects using Get method.
      Anything I need to change here.

    Hi @radhikashrotre, sorry for the late response. Can you share the relevant method that you've tried to join the entities?

Made with ❤️ on ABP v9.1.0-preview. Updated on December 26, 2024, 06:07