multi-provider-ef

Manage EF Core migrations across SQL Server and MySQL providers.

1|Updated Feb 28, 2024
One-click install
npx skills add https://github.com/Sparkymod/Template --skill multi-provider-ef
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: multi-provider-ef
Source: https://github.com/Sparkymod/Template/tree/main/.claude/skills/multi-provider-ef
Command: npx skills add https://github.com/Sparkymod/Template --skill multi-provider-ef

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires EntityFrameworkCore, Microting.EntityFrameworkCore.MySql, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill addresses the complexities of managing Entity Framework Core migrations across different database providers, such as SQL Server and MySQL, ensuring seamless database migration and parity across providers.

Core Features & Use Cases

  • Provider Switching: Dynamically switch between database providers at runtime.
  • Migration Parity: Generate and apply migrations that are compatible across different database providers.
  • Design-Time Factory: Configure AppDbContextFactory for design-time database context creation.
  • Bootstrap Migration: Safely apply bootstrap migrations to existing databases without conflicts.
  • Use Case: When migrating an application from SQL Server to MySQL, this Skill ensures that migrations are generated and applied correctly, maintaining data integrity and application functionality.

Quick Start

Use the multi-provider-ef skill to switch the database provider to MySQL and apply the latest migrations.

Frequently Asked Questions about multi-provider-ef

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

FAQPage Schema
How do I manage EF Core migrations across both SQL Server and MySQL?

You can dynamically switch between SQL Server and MySQL database providers at runtime. This Skill manages EF Core migrations by ensuring migration parity and compatibility, allowing seamless provider switching during application execution.

Can I dynamically switch the database provider at runtime using EF Core?

Yes, you can dynamically switch between SQL Server and MySQL database providers at runtime. This Skill manages EF Core migrations by ensuring migration parity and compatibility, allowing seamless provider switching during application execution.

Do I need a design-time factory for EF Core multi-provider migrations?

Yes, a design-time factory is needed to configure AppDbContext for design-time database context creation. This Skill supports design-time configuration alongside runtime provider switching to ensure migrations apply correctly across SQL Server and MySQL.

What's the best way to apply bootstrap migrations to an existing MySQL database?

The best way is to apply idempotent migrations that safely update existing databases without conflicts. This Skill supports bootstrap migration application to existing MySQL and SQL Server databases while maintaining data integrity and application functionality.

What NuGet packages do I need to run EF Core migrations for MySQL and SQL Server?

You need EntityFrameworkCore and the Microting.EntityFrameworkCore.MySql provider packages installed. This Skill requires EF Core and applicable provider packages to manage database migrations, generate compatible schemas, and enable seamless runtime switching.