
Explore entity framework core as a cross-platform, lightweight .NET framework that maps .NET classes to database tables and uses only the needed providers, like SQLite.
Trace the history of entity framework core from EF Core 2.0 with .NET Standard 2.0 through EF Core 5 and .NET Core 6, highlighting the latest features.
Explore .NET 6 templates with implicit usings in a single-line console app, where defaults replace boilerplate like using statements, namespace, and main method. Compare old and new main method styles.
Enable implicit usings in older dotnet six projects by editing the csproj and adding the implicit usings setting. Enable implicit usings by default in new projects.
Install dotnet core six from the Microsoft site and set up Visual Studio 2022. Choose the community edition and add ASP.NET, dotnet desktop development, and SQL Server data tools.
Open Visual Studio 2022 and create a solution for EF Core. Add a data library and a UI console project using dotnet six to demonstrate an entity framework core setup.
Create an entities folder and define employee and spending detail classes with primary keys and a one-to-many relation, using not mapped for total spending in EF Core on .NET 6.
Install EF Core 6 preview packages via visual manager or console, including sql server and tools, then create migrations to generate sql and update the database.
Configure the DbContext to SQL Server with a connection string, then add and update the initial migration to create employees and spending details tables and record migration history.
Create a new employee through the UI by defining an execution logic class, instantiate a new employee, add it to the DbContext, and save changes with EF Core.
Use LINQ with Entity Framework Core to filter employees in the database, generating SQL with a where clause to return Natasha and reduce data transfer.
Learn how bulk insertion inserts many rows at once in a single transaction, speeding up data loading compared with row-by-row inserts, as seen with EF Core and SQL Server.
Query employees with first name length greater than four and order by first name using entity framework, then examine the generated SQL and see EF translate it for SQL Server.
Practice implementing a one-to-many relationship between employees and spending details using entity framework core in .NET 6, including querying, updating, adding spendings, and computing total spendings.
Enable EF Core logging to inspect the SQL it generates and how it tracks entity changes, using console or file outputs to debug performance and SaveChanges.
Learn how to optimize performance by using no-tracking queries in Entity Framework, disabling the change tracker for read-only data so edits aren’t detected or saved, via the on configuring method.
Configure EF Core logging with the log two method to filter by log level and display only relevant SQL statements, selecting trace or information for focused database logs.
Create a asp.net core web api project using dotnet six and visual studio 2022, configure ef core with code-first database, and wire controllers and middleware in program.cs.
Install EF Core SQL Server and tools, create a dbcontext with Office and Employee entities, define primary and foreign keys for a one-to-many relation, and seed data.
Generate sql scripts before migration with script migration to review EF Core changes, including migration history, offices and employees tables, foreign keys, indexes, and update options.
Design the app for demo purposes to delete and recreate the database at startup, using a dependency injection scope, an employee context, and EF Core migrations with error logging.
Download and install Postman to query the web API we created. Use the Windows 64-bit installer, or 32-bit if needed, or download on Mac or Linux using the links below.
Implement an api controller with http get to fetch employees by office id via the employee repository using dependency injection and entity framework core, returning 200 ok with results.
Call the default api to retrieve all employees, then map the entity framework results to the get employees dto and return only id, full name, role, and hire date.
Leverage AutoMapper to replace manual mappings between employee entities and employee DTOs, install AutoMapper extensions, register profiles, inject IMapper, and map lists for cleaner, less error-prone code.
Configure and test one-to-many database relationships by using AutoMapper to map employee properties, split full name into first and last names, and manage migrations and seeding to update the database.
Apply required attributes to enforce field constraints, create and update a new migration, and review app and down methods. Use not mapped to exclude birthdate from the database.
Discover the one to many relationship in EF Core, where an office has multiple employees, with examples linking offices to their staff and a hint toward 1 to 1 relationships.
Learn how to migrate a seeding change with entity framework by creating a migration for updated seed data and applying it to the database, with EF generating scripts.
Create a one to one relationship between employees and addresses using EF Core, including a new employee addresses class, foreign key, cascade delete, and a migration.
Unleash Your Backend Development Potential: The Ultimate Mastery Course in Entity Framework Core 6 and Visual Studio 2022
Why Choose This Course?
If you're looking to become an expert in modern backend development, this comprehensive course is your golden ticket. Seamlessly interweaving hands-on assignments with expert-led instruction, we take you on an enlightening journey through the essentials and beyond.
Master Entity Framework Core 6 & Visual Studio 2022
Learn the intricacies of building robust applications using the groundbreaking features of Entity Framework Core 6, all while navigating the powerful environment of Visual Studio 2022. Say goodbye to outdated methods and hello to efficiency and modernization.
Build Your First Web API
Kickstart your foray into API development. Whether you're a beginner or an intermediate developer looking to upskill, this course empowers you to design your own Web API from scratch. Learn by doing, not just by watching.
Build Databases from Scratch
Don't just learn to interact with databases—learn to build them. Use Entity Framework Core 6 to create databases from the ground up, and gain an irreplaceable skill set that employers are desperately seeking.
Code-First Approach for Streamlined Database Management
Use the Code-First methodology to effortlessly create and update database tables. Why rely on clunky, outdated interfaces when you can command your databases with code? Learn to speak the language that your databases understand.
Advanced Data Handling with LINQ
Unleash the full potential of Language-Integrated Query (LINQ) to manipulate, query, and manage your data. Create, read, update, or delete—become a master of database operations.
Why Entity Framework Core?
EF Core isn't just another technology; it's a revolution. Lightweight yet powerful, extensible yet user-friendly, it stands as an open-source marvel that's also cross-platform. Unleash the potential of Object-Relational Mapping (O/RM) to work more effectively and smartly with databases.
Multi-Database Support
Entity Framework Core 6 doesn't just stop at SQL Server or Azure. It extends its capabilities to SQLite, Azure Cosmos DB, MySQL, PostgreSQL, and much more, all thanks to a versatile database provider plugin model.
Straight to the Point
We know you're here to learn, not to watch fluff. Every lesson is streamlined to offer you the most value in the shortest amount of time. Witness every stage in the process of writing crucial code—no sidesteps, no detours.
Stay Ahead with the Latest .NET Core
Don't just keep up with the industry—stay ahead of it. This course is your chance to get hands-on experience with the latest advancements in .NET Core and Microsoft's Object-Relational Mapping (ORM).
Are You Ready to Accelerate Your Career?
Enroll now!