AI Instructor Live Labs Included

Data Access with Microsoft Entity Framework and C#

Master Entity Framework Core for .NET — from ORM basics through advanced querying, migrations, relationships, and performance optimization with hands-on labs in VS Code.

Intermediate
23h 5m
20 Lessons
EF-CORE
Data Access with Entity Framework Core Badge

View badge details

About This Course

Master data access in .NET applications using Entity Framework Core. This comprehensive course takes you from ORM fundamentals through advanced querying, migrations, relationships, performance optimization, and real-world best practices. You'll build hands-on projects using EF Core with SQLite and PostgreSQL in a browser-based VS Code environment, learning to design efficient data layers for production applications.

Course Curriculum

20 Lessons
01
AI Lesson
AI Lesson

Introduction to EF Core & ORM Concepts

45m

Learn what Object-Relational Mapping is, why EF Core exists, and how it bridges C# objects and database tables.

02
Lab Exercise
Lab Exercise

Introduction to EF Core - Lab Exercises

1h 25m 2 Exercises

Hands-on practice setting up your first EF Core project, creating a DbContext, and running your first database operations.

Your First EF Core Project Set up a .NET console project with EF Core, create a simple model, and connect to a SQLite database. ~20 min
First Database Operations Insert, query, and display records using EF Core with your SQLite database. ~20 min
03
AI Lesson
AI Lesson

DbContext, Models & Configuration

50m

Deep dive into DbContext lifecycle, entity model design, data annotations, and Fluent API configuration.

04
Lab Exercise
Lab Exercise

DbContext & Models - Lab Exercises

1h 25m 2 Exercises

Build entity models with data annotations and Fluent API, configure DbContext options, and explore model validation.

Designing Entity Models Create Product, Category, and Supplier entity classes with proper conventions and data annotations. ~20 min
Configuring with Fluent API Configure entity mappings using Fluent API in OnModelCreating, including indexes, default values, and column mappings. ~20 min
05
AI Lesson
AI Lesson

CRUD Operations with EF Core

50m

Master Create, Read, Update, and Delete operations using EF Core's change tracking and SaveChanges patterns.

06
Lab Exercise
Lab Exercise

CRUD Operations - Lab Exercises

1h 25m 2 Exercises

Build a complete data access layer with Create, Read, Update, and Delete operations against a SQLite database.

Create and Read Operations Implement Add, AddRange, Find, FirstOrDefault, Where, and ToList operations on the product catalog. ~20 min
Update and Delete Operations Implement tracked updates, disconnected updates, Remove, RemoveRange, and explore change tracking states. ~20 min
07
AI Lesson
AI Lesson

Entity Relationships & Navigation Properties

50m

Learn one-to-many, many-to-many, and one-to-one relationships, navigation properties, foreign keys, and cascade behaviors.

08
Lab Exercise
Lab Exercise

Entity Relationships - Lab Exercises

1h 35m 2 Exercises

Implement one-to-many, many-to-many, and one-to-one relationships in a multi-entity data model.

One-to-Many and One-to-One Relationships Build Category-Product one-to-many and Product-ProductDetail one-to-one relationships with navigation properties. ~25 min
Many-to-Many and Cascade Behaviors Implement Product-Tag many-to-many relationships and configure cascade delete behaviors. ~25 min
09
AI Lesson
AI Lesson

Querying with LINQ in EF Core

50m

Master LINQ query syntax and method syntax for filtering, sorting, projecting, grouping, and joining data through EF Core.

10
Lab Exercise
Lab Exercise

LINQ Querying - Lab Exercises

1h 30m 2 Exercises

Write LINQ queries to filter, sort, project, group, and join data from a multi-table database.

Filtering, Sorting, and Paging Write LINQ queries to filter products by criteria, sort results, and implement pagination. ~20 min
Projections, Grouping, and Aggregation Create projection queries with Select, group products by category, and calculate aggregates. ~25 min
11
AI Lesson
AI Lesson

Migrations & Schema Management

45m

Learn EF Core migrations workflow — creating, applying, reverting, and managing database schema changes over time.

12
Lab Exercise
Lab Exercise

Migrations & Schema Management - Lab Exercises

1h 25m 2 Exercises

Create and apply migrations, evolve a database schema, seed data, and manage migration history.

Creating and Applying Migrations Create an initial migration, apply it, then evolve the schema with additional migrations. ~20 min
Data Seeding and Migration Management Seed initial data with HasData, generate SQL scripts, and practice reverting migrations. ~20 min
13
AI Lesson
AI Lesson

Advanced Querying & Raw SQL

50m

Explore advanced EF Core querying — projections, global query filters, raw SQL queries, stored procedures, and compiled queries.

14
Lab Exercise
Lab Exercise

Advanced Querying - Lab Exercises

1h 35m 2 Exercises

Practice advanced querying techniques including projections, global filters, raw SQL, and compiled queries.

Global Filters and Raw SQL Implement global query filters for soft-delete, execute raw SQL queries with parameterization. ~25 min
Compiled Queries and Split Queries Create compiled queries for hot paths, use split queries to avoid cartesian explosion. ~25 min
15
AI Lesson
AI Lesson

Data Validation, Concurrency & Transactions

50m

Learn data validation strategies, optimistic concurrency with row versioning, and transaction management in EF Core.

16
Lab Exercise
Lab Exercise

Data Validation & Concurrency - Lab Exercises

1h 35m 2 Exercises

Implement validation attributes, handle concurrency conflicts, and use transactions for data integrity.

Validation and Concurrency Handling Add validation annotations, implement IValidatableObject, handle optimistic concurrency with row versioning. ~25 min
Transactions and Error Handling Use explicit transactions for multi-step operations and implement robust SaveChanges error handling. ~25 min
17
AI Lesson
AI Lesson

Performance Optimization & Best Practices

50m

Master EF Core performance — eager vs lazy vs explicit loading, no-tracking queries, batching, connection pooling, and common anti-patterns.

18
Lab Exercise
Lab Exercise

Performance Optimization - Lab Exercises

1h 35m 2 Exercises

Diagnose and fix N+1 queries, implement eager loading, use no-tracking queries, and optimize a slow data access layer.

Diagnosing and Fixing N+1 Queries Identify N+1 query problems using logging, fix with Include, and compare loading strategies. ~25 min
Bulk Operations and Query Optimization Use no-tracking queries, ExecuteUpdate/ExecuteDelete for bulk ops, and optimize queries with projections. ~25 min
19
AI Lesson
AI Lesson

Capstone Briefing - Inventory Management System

30m

Review all EF Core concepts and receive the capstone project brief — build a complete inventory management data layer.

20
Lab Exercise
Lab Exercise

Capstone Project - Inventory Management System

1h 45m 1 Exercises

Build a complete inventory management data layer using EF Core with relationships, migrations, LINQ queries, and performance optimization.

Capstone: Inventory Management System Build a complete inventory management data layer with entities, relationships, migrations, LINQ queries, concurrency, and performance optimization. ~60 min

This course includes:

  • 24/7 AI Instructor Support
  • Live Lab Environments
  • 10 Hands-on Lessons
  • Completion Badge
Data Access with Entity Framework Core Badge

Earn Your Badge

Complete all lessons to unlock the Data Access with Entity Framework Core achievement badge.

Category Developer
Skill Level Intermediate
Total Duration 23h 5m
Data Access with Entity Framework Core Badge
Achievement Badge

Data Access with Entity Framework Core

Awarded for completing the Data Access with Microsoft Entity Framework and C# course, demonstrating proficiency in EF Core ORM, data modeling, CRUD operations, LINQ queries, migrations, relationships, concurrency, and performance optimization.

Course Data Access with Microsoft Entity Framework and C#
Criteria Complete all 20 lessons including the capstone project in the Data Access with Microsoft Entity Framework and C# course.

Skills You'll Earn

Entity Framework Core C# Data Access LINQ PostgreSQL ORM Database Migrations Data Modeling Performance Optimization Concurrency Control

Complete all lessons in this course to earn this badge