Skip to content

A practical learning repository covering key topics in Entity Framework Core — each topic is tailored through standalone console applications. Perfect for learning, and revising EF Core through tailored examples. 🕸️ Provided by SpiderX — Visit our website to explore more projects.

Notifications You must be signed in to change notification settings

MahmoudNofaal/EntityFrameworkCore

Repository files navigation

EntityFrameworkCore Learning Repository

Welcome to the EntityFrameworkCore repository!
This project is designed to help you learn and understand Entity Framework Core (EF Core) in .NET 8 through practical, standalone console applications.

Each topic in EF Core is covered in its own independent console app, complete with shared data and example code to demonstrate real-world usage.


Who is this for?

Whether you're a beginner or an experienced developer, this repository provides a hands-on way to:

  • Study EF Core topics
  • Revise key concepts
  • Test knowledge by running modular apps

Repository Structure

The repository is organized into separate folders, each containing a standalone .NET 8 console application.

Each app focuses on a specific EF Core topic, with reusable data and implementation examples.

Topics Covered

EFCoreStart

  • Introduction to setting up and getting started with EF Core.

DBContext

  • Concurrency
  • External Configuration
  • Internal Configuration
  • DbContext Lifetime
  • Using Context Factory
  • Using Context Pooling
  • Using Dependency Injection

Configuration

  • By Convention
  • Override Configuration with Data Annotations
  • Override Configuration with Fluent API
  • Using Grouping Configuration

Scaffold

  • Scaffolding database models with EF Core.

Mapping

  • Basic Setup
  • Exclude Entity
  • Include Entity
  • Mapping View

Migration

  • Code-First Approach
  • Database-First Approach

CreateAndDropAPI

  • Using EF Core APIs to create and drop databases.

SeedData

  • Seeding initial data into the database.

QueryData

  • Client vs. Server Evaluation
  • Tracking vs. No-Tracking Queries
  • Related Data (Eager, Lazy, Explicit Loading)
  • Split Queries
  • Joins (Inner, Cross, Left Join)
  • Select Many
  • Group By
  • Pagination

RawSQL

  • Executing Raw SQL Queries
  • SQL Query Parameters
  • Calling Stored Procedures
  • Calling User-Defined Functions
  • Calling Database Views
  • Calling Table-Valued Functions
  • Global Query Filters

SaveData

  • Basic Save Operations
  • Change Tracking
  • Cascade Delete
  • Efficient Updating

Interceptors

  • Implementing and using EF Core interceptors.

Prerequisites

To run the console applications in this repository, ensure the following:

  • .NET 8 SDK: Download it here
  • Database: Most applications use a local database (e.g., SQL Server or SQLite)

🕸️ Provided by SpiderX
Explore, practice, and strengthen your EF Core skills with confidence.

🔁 You're welcome to fork, clone, or contribute — your input can help others grow as well.
🤝 Let’s build something better, together.


About

A practical learning repository covering key topics in Entity Framework Core — each topic is tailored through standalone console applications. Perfect for learning, and revising EF Core through tailored examples. 🕸️ Provided by SpiderX — Visit our website to explore more projects.

Resources

Stars

Watchers

Forks

Packages

No packages published