Open Closed

Two DBContext UserId FK #4938


User avatar
0
Leonardo.Willrich created
  • ABP Framework version: v7.1.0
  • UI type: Blazor WASM
  • DB provider: EF Core

Hi, I have two DBContext in my application, one is for ABP tables, like AbpUsers, and the other one I have the tables for my application. In one table, I need to create a Foreign Key to Users (UserId), is that possible? If so, how I can implement that?

Kind regards, Leonardo Willrich.


2 Answer(s)
  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    Unfortunately, it's not possible.

    Here is a good explanation: https://stackoverflow.com/questions/36018140/custom-aspnet-identity-one-to-many-relationship-using-multiple-context-applicati

  • User Avatar
    0
    Leonardo.Willrich created

    Ok, thank you.

Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.0.0-preview. Updated on September 01, 2025, 08:37