entityframework-dotnet-custom-di

Register custom tenant ID and connection string resolvers for Jarvis Entity Framework.

12|2|Updated May 4, 2020
One-click install
npx skills add https://github.com/hoangnh2412/jarvis --skill entityframework-dotnet-custom-di
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: entityframework-dotnet-custom-di
Source: https://github.com/hoangnh2412/jarvis/tree/main/.opencode/skills/entityframework-dotnet/patterns/custom-di
Command: npx skills add https://github.com/hoangnh2412/jarvis --skill entityframework-dotnet-custom-di

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

When building multi-tenant applications with the Jarvis .NET framework, the default Entity Framework tenant resolution logic may not fit specific business requirements, and modifying the core Jarvis library is prohibited as it breaks update compatibility and long-term maintainability. This Skill provides a supported, non-invasive way to customize tenant ID and connection string resolution without altering Jarvis core code.

Core Features & Use Cases

  • Custom Tenant ID Resolution: Implement custom logic to map incoming tenant identifiers (such as tax codes) to valid tenant GUIDs using the ITenantIdResolverFactory and keyed ITenantIdResolver interfaces.
  • Custom Connection String Resolution: Override default connection string selection for tenants, for example to route storage operations to MinIO object storage, using keyed ITenantConnectionStringResolver.
  • Use Case: A multi-tenant SaaS application that identifies tenants by tax code instead of subdomain, and stores tenant files in MinIO, can use this Skill to implement both custom resolution logic without modifying Jarvis core packages.

Quick Start

Implement custom tenant ID and connection string resolution for your Jarvis Entity Framework multi-tenant application by registering the required resolver services after the core EF setup in your Program.cs file.

Frequently Asked Questions about entityframework-dotnet-custom-di

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I customize tenant resolution in Entity Framework without modifying the core Jarvis library?

Customize Entity Framework tenant resolution in Jarvis by registering custom dependency injection implementations for ITenantIdResolverFactory, keyed ITenantIdResolver, and ITenantConnectionStringResolver after the core EF setup in your Program.cs file.

Can I map a custom tenant identifier like a tax code to a tenant GUID in a .NET 9 multi-tenant application?

Map custom tenant identifiers like tax codes to valid tenant GUIDs in .NET 9 multi-tenant applications by implementing custom logic within the keyed ITenantIdResolver and ITenantIdResolverFactory interfaces provided by the Jarvis framework.

How do I override default connection string selection for multi-tenant EF Core to route files to MinIO?

Override default multi-tenant EF Core connection string selection to route storage operations to MinIO by implementing a custom keyed ITenantConnectionStringResolver and registering it to replace the default Jarvis Entity Framework tenant behavior.

Does customizing Jarvis EF tenant behavior break update compatibility with the core framework?

Customizing Jarvis EF tenant behavior does not break update compatibility because it uses non-invasive custom dependency injection registrations rather than modifying the prohibited core Jarvis library code, ensuring long-term framework maintainability.

What is the best way to implement custom dependency injection for tenant ID and connection string resolution in Jarvis?

The best way to implement custom dependency injection for tenant ID and connection string resolution in Jarvis is to apply custom DI registrations for the required resolver interfaces after the core Entity Framework setup is initialized in Program.cs.

When do I need custom tenant resolution logic in a Jarvis Clean Architecture backend application?

You need custom tenant resolution logic in a Jarvis Clean Architecture backend application when the default Entity Framework tenant behavior does not fit specific business requirements like dynamic connection string selection or custom tenant ID mapping.