How hocine-bec/ef-core-project works
Project type and purpose
• This is a backend-only .NET Core application (EF-Core-Project) that demonstrates a code-first Entity Framework Core data access layer.
• Its purpose is to define domain Entities (Course, Enrollment, Instructor, etc.), configure them via Fluent API, apply interceptors (soft delete), and manage database schema through migrations against a SQL database.
File structure
• Top-level files and folders:
• Program.cs – application entry point (likely seeds or runs migrations)
• appsettings.json – configuration (connection string, logging, etc.)
• db_script.sql – sample SQL or initial schema script
• EF-Core-Project.sln / .csproj – solution & project definitions
• Data/ – DbContext, EF configurations, and interceptors
• Entities/ – POCO domain model classes
• Enums/ – supporting enum types
• Interfaces/ – domain contracts (e.g., ISoftDelete)
• Migrations/ – auto-generated migration code for schema changes
• Architectural pattern: a layered monolith with a clear separation between Domain (Entities, Enums, Interfaces) and Data Access (Data folder, Migrations).
README
• .NET 6+ console or class library using EF Core
• Fluent API for entity configuration
• Soft-delete implemented via an EF Core interceptor
• Code-first migrations