Skip to main content

Introducing new learning courses and educational videos from Apress. Start watching

  • Book
  • © 2022

Practical Entity Framework Core 6

Database Access for Enterprise Applications

Apress

Authors:

(view affiliations)
  • Gives you a solid understanding of critical entity framework components and operations

  • Provides examples of best practices for scalable and maintainable applications

  • Teaches you how to optimize efficiency to provide better overall user experiences

  • 17k Accesses

Buying options

eBook
USD 49.99
Price excludes VAT (USA)
  • ISBN: 978-1-4842-7301-2
  • Instant PDF download
  • Readable on all devices
  • Own it forever
  • Exclusive offer for individuals only
  • Tax calculation will be finalised during checkout
Softcover Book
USD 64.99
Price excludes VAT (USA)

This is a preview of subscription content, access via your institution.

Table of contents (16 chapters)

  1. Front Matter

    Pages i-xxix
  2. Getting Started

    1. Front Matter

      Pages 1-1
    2. Introduction to Entity Framework

      • Brian L. Gorman
      Pages 3-26
    3. Working with an Existing Database

      • Brian L. Gorman
      Pages 27-79
    4. Entity Framework: Code First

      • Brian L. Gorman
      Pages 81-144
  3. Building the Data Solution

    1. Front Matter

      Pages 145-145
    2. Models and the Data Context

      • Brian L. Gorman
      Pages 147-194
    3. Constraints, Keys, and Relationships

      • Brian L. Gorman
      Pages 195-268
    4. Data Access (Create, Read, Update, Delete)

      • Brian L. Gorman
      Pages 269-297
    5. Stored Procedures, Views, and Functions

      • Brian L. Gorman
      Pages 299-371
    6. Sorting, Filtering, and Paging

      • Brian L. Gorman
      Pages 373-403
  4. Enhancing the Data Solution

    1. Front Matter

      Pages 405-405
    2. LINQ for Queries and Projections

      • Brian L. Gorman
      Pages 407-462
    3. Encryption of Data

      • Brian L. Gorman
      Pages 463-518
    4. Repository and Unit of Work Patterns

      • Brian L. Gorman
      Pages 519-574
    5. Unit Testing, Integration Testing, and Mocking

      • Brian L. Gorman
      Pages 575-614
  5. Recipes for Success

    1. Front Matter

      Pages 673-673
    2. .Net 5 and EFCore5

      • Brian L. Gorman
      Pages 675-735
    3. .Net 6 and EFCore6

      • Brian L. Gorman
      Pages 737-775

About this book

Take a developer journey that paves the way to enterprise-level database access from .NET and C# using the object-relational mapper (ORM) of choice. This second edition is revised to cover Entity Framework Core 5 and 6 (EF) and includes new content on table-per-type mapping, LINQ improvements (filtered includes), many-to-many navigation changes, split queries, simple logging using the DBCommandInterceptor, and other improvements available in EF Core 6. Real-world examples and considerations are presented in this book to help you create robust and efficient database solutions. Throughout the text, actual problems, questions, and common pitfalls are provided to help you recognize optimal solutions for maximum success in the different application scenarios you might encounter. 

Practical Entity Framework Core 6 focuses on the code first approach to developing a database. Taking the code first approach allows the entire database to be built and maintained in code using EF Core 6 so there is never a situation in which you cannot restore the database schema. Additionally, the code first approach creates an entirely transparent record of changes to the database that is easily tracked in source control systems such as GitHub. Emphasis throughout the book is on leaving you well positioned to architect and lead data development efforts for your organization.

What You Will Learn
  • Build robust and maintainable databases using a code first approach
  • Create and execute stored procedures, triggers, and functions
  • Analyze and optimize performance of database queries
  • Ensure data integrity through keys, constraints, and relationships
  • Encrypt your database columns at rest with TDE and Always-On Encryption 
  • Leverage the FluentAPI and attributes for entity configuration

Keywords

  • Code First
  • Database First
  • Entity Framework
  • Core 3
  • Core 3.1
  • LINQ
  • LINQ Queries
  • SQL
  • Entity Framework Schema
  • Fluent API
  • Database Migrations
  • Azure Dev Ops
  • SQL Server Express Edition
  • ASP.NET
  • Data Transfer Object (DTO)
  • View-Model Pattern
  • Object-Relational Mapping (ORM)
  • Dependency Injection
  • Encryption
  • Unit Testing

Authors and Affiliations

  • Jesup, USA

    Brian L. Gorman

About the author

Brian Gorman is a Microsoft Azure MVP, developer, computer science instructor, and trainer, and has been working in .NET technologies as long as they have existed. He was originally MCSD certified in .NET 1 and re-certified with MCSA: Web Apps and MCSD: App Builder certifications in 2019. From 2019 to 2021, Brian has earned nine Azure certifications, including Azure and Data Fundamentals, Azure Administrator, Database Administrator, Security Engineer and Developer Associate certifications, Azure Solutions Architect and DevOps Expert certifications, and an IoT Specialty certification.

Additionally, Brian became an MCT as of April 2019, and is focusing on developing and training developers with full-stack web solutions with .NET Core and Azure.  Most recently, Brian has been employed as a Senior Training Architect with Opsgility.

In addition to working with .NET technologies, Brian has been an adjunct faculty member in the computer science department for Franklin University for the last 11 years, where his courses have included data structures, algorithms, design patterns, and, more recently, full-stack solutions in the capstone practicum course. 


Bibliographic Information

Buying options

eBook
USD 49.99
Price excludes VAT (USA)
  • ISBN: 978-1-4842-7301-2
  • Instant PDF download
  • Readable on all devices
  • Own it forever
  • Exclusive offer for individuals only
  • Tax calculation will be finalised during checkout
Softcover Book
USD 64.99
Price excludes VAT (USA)