Skip to content

Extract core abstraction interfaces into Finbuckle.MultiTenant.Abstractions #923

@zarusz

Description

@zarusz

Feature Request: Separate NuGet Package for Abstractions in Finbuckle.MultiTenant

Problem

The current Finbuckle.MultiTenant NuGet package combines abstraction interfaces (e.g., IMultiTenantContextAccessor) with implementations for strategies and stores. This structure can be problematic for applications with layered architectures, where inner or lower layers (e.g., domain or application layers) require minimal dependencies.

Dragging the entire package, including implementations, into these layers violates the principle of limiting dependencies in lower-level layers.

Proposed Solution

Introduce a dedicated NuGet package (e.g., Finbuckle.MultiTenant.Abstractions) that contains only the abstraction interfaces. This would allow applications to reference abstractions in lower-level layers without pulling in the full set of implementations.

Benefits

  • Improved modularity: Applications can maintain cleaner architectural boundaries by separating abstractions from implementations.
  • Reduced dependencies: Only essential components are included in lower layers, reducing the risk of unintended dependencies.
  • Greater flexibility: Developers can use custom implementations of strategies and stores while still relying on standardized abstractions.

Scope

The new package should include:

  • IMultiTenantContextAccessor
  • Any other relevant abstraction interfaces

The existing Finbuckle.MultiTenant package should remain unchanged, continuing to bundle both abstractions and implementations for users who prefer the all-in-one approach.

Potential Impact

This change would be non-breaking for existing users but would provide an alternative path for those with stricter architectural requirements.

Thank you for considering this improvement!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions