Open Closed

Secondary DbContext and foreign key to IdentityUser (AbpUser?) #3619


User avatar
0
mel@quadsoftpa.com created
  • **ABP Framework version: 6.0rc2
  • UI type: Blazor
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): no

I need some assistance with the error in the attached message. I burnt two days on it and I can't get it figured out. So I have two databases, one for the basic ABP tables and the second one for module tables. Everything is working fine but now I'm trying to link an entity in the secondary database with dbo.AbpUsers in the primary database. I've seen this question asked before, I've seen kind of half answers and redirections to a sample project or to, but I just cannot get this to work.

dbo.AbpUsers does have an extra column (ExtraProperty), "Title" that may be the root of the problem. I really need very specific help here, a redirection to projects DocumentationSamples or EfCoreMigrationDemo isn't going to help me because I've already pulled my hair out reviewing those projects. thank you very much!

open


2 Answer(s)
  • User Avatar
    0
    mel@quadsoftpa.com created

    I can provide access to the entire solution if you would like. Thank you

  • User Avatar
    0
    mel@quadsoftpa.com created

    Solution is:

    public static void ConfigureDataManagement(this ModelBuilder builder) { Check.NotNull(builder, nameof(builder));

     *  * builder.ConfigureIdentityPro();**
    
        if (builder.IsHostDatabase())
    
Made with ❤️ on ABP v9.1.0-preview. Updated on December 13, 2024, 06:09