Open Closed

switching tenant #3422


User avatar
0
shobhit created
  • ABP Framework version: v4.2.2
  • UI type: Angular
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): yes
  • Exception message and stack trace:
  • Steps to reproduce the issue:"

Hi Team, I have moved 1 table from tenant unaware to tenant aware by adding "IMultiTenant" interface in domain class. i am facing 2 challenges: 1- tenantid in db is setting as null 2- as i have configured seperate db for tenant but data is getting saved in host db only.

please help what i am missing

public class Disease : FullAuditedAggregateRoot<Guid>, IMultiTenant { public virtual Guid? TenantId { get; set; }

    [NotNull]
    public virtual string Code { get; set; }

    [NotNull]
    public virtual string Name { get; set; }

}


1 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    data is getting saved in host db only.

    What's your insert code?

Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
Do you need assistance from an ABP expert?
Schedule a Meeting
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v9.2.0-preview. Updated on March 20, 2025, 18:00