Data Access with EF Core, ADO.NET and LINQ
Data Access with EF Core, ADO.NET and LINQ is a course in writing database code on .NET 10 with ADO.NET, LINQ and EF Core 10, from code-first and database-first models to fast queries and a well-organised data layer. It suits C# and ASP.NET developers, and teams moving older data access code over to EF Core.
- Duration18 hours · 3 days
- FormatOnsite / live online
- Next roundOn request
- CertificateIncluded
Course overview
Almost every business application reads and writes a database. Many .NET developers still maintain code built on DataSets, older Entity Framework versions on .NET Framework or LINQ to SQL, which is no longer developed, while new systems use Entity Framework Core on current .NET. A solid understanding of ADO.NET, LINQ and EF Core helps you choose the right tool for each job, write fast queries and move older systems to the current platform with confidence.
This course teaches database programming on .NET 10. It starts with modern ADO.NET using Microsoft.Data.SqlClient and with LINQ, from the basics to new operators such as LeftJoin. It then goes deep into EF Core 10, covering code-first and database-first models, relationships, LINQ to Entities, change tracking, JSON columns on SQL Server 2025, named query filters, raw SQL and stored procedures. It continues with performance tuning, an N-tier data layer, use in an ASP.NET Core Web API, testing and deploying migrations, and closes with a workshop that moves older code to EF Core 10. (3 days, 6 hours per day, 18 hours in total, Intermediate level.)
What you’ll gain
- Choose the right data access technology for the job among ADO.NET, Dapper and EF Core 10
- Write safe ADO.NET code with Microsoft.Data.SqlClient using parameters and transactions
- Write LINQ fluently in query and method syntax, including the new operators in .NET 10
- Design data models with EF Core 10, both code first and database first
- Write LINQ to Entities that translates into efficient SQL, and handle change tracking correctly
- Use JSON columns, query filters, raw SQL and stored procedures with EF Core
- Structure an N-tier data layer, use it in an ASP.NET Core Web API and deploy migrations
Who this course is for
- C# developers who build applications or websites that work with databases
- Developers maintaining systems on ADO.NET, Entity Framework 6 or LINQ to SQL who want to move to EF Core
- ASP.NET developers who want a fast, maintainable data layer
- System administrators and IT teams who need to read and improve database code
- Tech leads who set data access and migration practices for their team
Prerequisites
- C# programming, such as classes, methods, collections and basic async/await
- Basic SQL such as SELECT, JOIN, INSERT, UPDATE and DELETE
- Some experience building ASP.NET websites or .NET applications
- A laptop that can run the .NET 10 SDK and Docker Desktop, with permission to install software
Curriculum
Course Details
This course is the 2026 edition of Programming ADO.NET Entity Framework and LINQ, rewritten from scratch and updated for .NET 10 and EF Core 10. It runs for 3 days, 6 hours per day (18 hours in total, 09:00-16:00), as lectures with labs built on a single sample sales database throughout. Intermediate level. It focuses on the data layer, covering ADO.NET, LINQ and EF Core, plus how to move code from older Entity Framework versions. Every tool is free and every lab runs on the learner's own machine with Docker. Learners take home a lab guide, source code for every lab and the sample database with docker-compose files.
Day 1 ADO.NET, LINQ and Getting Started with EF Core 10
Section 1: Lab: Data Access in .NET 10 at a Glance
- How the technology evolved: ADO.NET, Entity Framework 6, LINQ to SQL and EF Core
- Choosing ADO.NET, Dapper or EF Core for the job at hand
- Install the .NET 10 SDK, the dotnet-ef tool and an IDE
- Run SQL Server 2025 Developer Edition with Docker
- Lab: create the sample database and a console project for every lab
Section 2: Modern ADO.NET with Microsoft.Data.SqlClient
- SqlConnection, SqlCommand and async DataReader
- Parameterised queries and preventing SQL injection
- Connection strings, encryption on by default and connection pooling
- Transactions with SqlTransaction and error handling
- Lab: write a class that reads and saves customer data with ADO.NET
Section 3: Lab: LINQ from the Basics to the New Operators
- Query syntax compared with method syntax and lambda expressions
- Where, Select, OrderBy, GroupBy, Join and aggregates
- Deferred execution, and IEnumerable compared with IQueryable
- New operators such as CountBy, AggregateBy and LeftJoin in .NET 10
- Lab: analyse sales data with LINQ to Objects
Section 4: Lab: Getting Started with EF Core 10 Code First
- DbContext, DbSet, entities and the conventions worth knowing
- Defining the model with data annotations compared with the Fluent API
- Creating and updating the database with migrations
- Seeding initial data with UseSeeding
- Lab: create the sales database from the model
Section 5: Database First with Scaffolding
- Reverse engineer an existing database with dotnet ef dbcontext scaffold
- Choose the tables you need and adjust class names and namespaces
- Customise the generated code with partial classes and templates
- When to use code first and when to use database first
- Lab: scaffold a legacy database and write the first query
Day 2 Modelling and Querying with EF Core
Section 6: Relationships and Inheritance
- One-to-one, one-to-many and many-to-many
- Foreign keys, navigation properties and delete behaviour
- Owned types and complex types for values without their own identity
- TPH, TPT and TPC inheritance and their trade-offs
- Lab: model the relationships between customers, orders and products
Section 7: Lab: LINQ to Entities
- How LINQ becomes SQL, and viewing the SQL with ToQueryString and logging
- Include, ThenInclude and projection with Select
- LeftJoin in EF Core 10, GroupBy and aggregates
- Split queries and paging
- Lab: sales reports by customer and product category
Section 8: Creating, Updating, Deleting and Change Tracking
- Entity states and how SaveChanges works
- AsNoTracking for read-only work
- ExecuteUpdate and ExecuteDelete with ordinary lambdas in EF Core 10
- Transactions and concurrency with row versions
- Lab: reduce stock while preventing conflicting updates
Section 9: Advanced Mapping: JSON and Query Filters
- Store complex types as JSON columns on the SQL Server 2025 json data type
- Query data inside JSON with LINQ
- Value converters and shadow properties
- Named query filters for soft delete and multi-tenancy
- Lab: store product attributes as JSON and hide deleted records
Section 10: Lab: Raw SQL, Stored Procedures and Dapper
- FromSql and SqlQuery with safe parameters
- ExecuteSql for commands that return no data
- Calling stored procedures and views from EF Core
- Using Dapper alongside EF Core for queries that must be very fast
- Lab: a complex report with a stored procedure
Day 3 Performance, Structure and Real-World Use
Section 11: Lab: Tuning EF Core Performance
- Detecting N+1 queries and fetching more data than needed
- Creating indexes through migrations and reading SQL Server execution plans
- DbContext pooling and compiled queries
- Interceptors for logging slow queries
- Lab: measure a report query before and after tuning
Section 12: Structuring an N-Tier Data Layer
- Separating the data, service and presentation layers
- When repositories and units of work help, given that DbContext already provides them
- DTOs and mapping data between layers
- Registering DbContext with dependency injection and context lifetimes
- Lab: move the data layer into a reusable class library
Section 13: Lab: EF Core in an ASP.NET Core 10 Web API
- Connect the data layer to a web API
- CRUD endpoints with searching and paging
- Handling database errors and concurrency in the API
- Async queries throughout to support many users
Section 14: Testing and Deploying Migrations
- Testing the data layer against a real database in Docker
- Using SQLite or the in-memory provider for tests while knowing their limits
- Idempotent SQL scripts and migration bundles
- Safe ways to take migrations to production
- Lab: deploy migrations with a bundle to a test database
Section 15: Workshop: Moving Legacy Code to EF Core 10
- How to move code from ADO.NET, EF6 and LINQ to SQL to EF Core
- Brief: rework the data layer of the sample system or one the learner chooses
- Use an AI assistant to help convert code, and check the resulting SQL before using it
- Present the work, review it together and wrap up with a data layer checklist
Schedule & training options
For individuals — public rounds
No public rounds are open right now. Join the waiting list and we will contact you first when the next round opens, or ask us on LINE. Or call 02-570-8449 or 088-807-9770
For organisations — in-house / private
- Tailor the content to your team’s tools and projects
- Your dates, at your office or live online
- Quotation with tax ID for procurement
Instructors
Frequently asked questions
What is Entity Framework Core, and how does it differ from writing SQL yourself with ADO.NET?
EF Core is Microsoft's object-relational mapper. It maps database tables to classes so you read and change data through objects and LINQ, while the framework generates the SQL and tracks changes. With ADO.NET through Microsoft.Data.SqlClient you open the connection, write the SQL and read results from a DataReader yourself, which gives finer control but means more code. Real projects often use EF Core for most work and plain SQL or Dapper for queries that must be especially fast.
How does Code First data modelling differ from Database First?
With Code First you write the classes that represent your data and use EF Core migrations to create and update the database from them. With Database First you start from an existing database and run dotnet ef dbcontext scaffold to generate the classes and DbContext from its tables. EF Core no longer has the EDMX file and designer of older Entity Framework versions. Code First suits new systems managed in code; Database First suits databases that are already designed or owned by a DBA team.
How do you write a query with LINQ to Entities?
Create an EF Core DbContext and query the DbSet you need, either with query syntax such as from c in db.Customers where c.City == city select c, or with method syntax by chaining Where, OrderBy and Select. EF Core translates the query into SQL and sends it when you call ToListAsync or iterate the results. You can see the generated SQL with ToQueryString, and should use Select to fetch only the fields you need. EF Core 10 also supports LeftJoin for left joins directly.
Who is the Data Access with EF Core, ADO.NET and LINQ course for, and what should I know beforehand?
It suits C# and ASP.NET developers who build database-driven systems, teams maintaining systems on ADO.NET, Entity Framework 6 or LINQ to SQL, and system administrators who need to improve database code. You should be able to program in C#, write basic SQL and have some experience building ASP.NET websites or .NET applications.
What will I be able to do after the Data Access with EF Core, ADO.NET and LINQ course?
You will be able to write safe ADO.NET code with Microsoft.Data.SqlClient, use LINQ fluently, design EF Core 10 data models code first or database first, create, update and delete data with transactions and concurrency control, speed up queries, structure an N-tier data layer and deploy migrations. Participants who complete the training receive a Certificate of Completion with its own number, which can be verified online.
Can the Data Access with EF Core, ADO.NET and LINQ course be run in-house for our team?
Yes. It can be run in-house for your team, with examples adapted to your own work, such as scaffolding and modelling the database structure your team already uses, or planning how to move existing code to EF Core. You can request a quotation from this page, or contact us on LINE @itgenius or by phone on 02-570-8449.
Related articles
Articles are published in Thai.

