EfCore.Boost is designed to make Entity Framework Core development faster, more consistent, and multi-provider by default. Instead of a simple library, it provides a comprehensive workflow for building data models, managing migrations, and deploying databases.
This guide is structured as a step-by-step journey where we build a simple "MyPets" application from scratch. We recommend following the steps in order:
-
Step 1: Download & Apply Template
Learn how to install the EfCore.Boost templates and create your first solution namedMyPets. -
Step 2: Project Structure Overview
Understand the purpose of the.Model,.Migrate, and.Testprojects. -
Step 3: Modeling the Domain
Define your entities (AnimalTypeandPet) using Boost attributes like[DbAutoUid]and[Name]. -
Step 4: Creating Views
Learn how to create read-only views, place them in the correct SQL files, and use AI to convert them for PostgreSQL and MySQL. -
Step 5: Running Migrations
Use the PowerShell scripts in thePsfolder to generate provider-specific SQL deployment scripts. -
Step 6: Seed Data
Populate your database using simple CSV files without cluttering your C# code. -
Step 7: Smoke Testing
Verify your model, views, and data using the built-in test project. -
Step 8: Local Deployment
Deploy your database to a local server using the migration command-line tool. -
Step 9: Business Logic and Unit of Work
Integrate the database model and Unit of Work into your API and business logic layer.
If you are already familiar with the basics and want to dive deeper into specific topics, check out these resources:
- Model Building Guide: A comprehensive list of all attributes and fluent API options.
- Why EfCore.Boost?: The philosophy and advantages of using this library.
- Unit of Work Patterns: How to use the generated UoW and repositories in your application.
- Migrate Project Details: Deep dive into the migration tool and PowerShell scripts.
Go to Step 1: Download & Apply Template to begin!