Skip to content

Latest commit

 

History

History
 
 

EFCore

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Readme - Code Samples for Chapter 26, Entity Framework Core

The sample code for this chapter contains this solution:

  • EFCoreSamples

consisting of these sample projects

  • Intro (introduction to EF Core with models, contexts, creating the database, read, write, update, delete, logging)
  • UsingDependencyInjection (using Microsoft.Extensions.DependencyInjection to create the context)
  • MenusSample (model with a relation, self contained type configuration, tracking, batch)
  • MenusWithDataAnnotations (using data annotation to create a model)
  • ScaffoldSmaple (using dotnet ef for scaffolding)
  • BooksSample (mapping to fields, shadow properties, basic queries, client and server evaluation, raw SQL queries, compiled queries, global query filters, EF.Functions, last one wins)
  • RelationUsingConventions (defining relations using conventions, explicit and eager loading)
  • RelationUsingAnnotations (defining relations using annotations)
  • RelationUsingFluentAPI (defining relations using the fluent API)
  • TPHWithConventions (table per hierarchy with conventions)
  • TPHWithFluentAPI (table per hierarchy with the fluent API)
  • TableSplitting (table splitting)
  • OwnedEntities (owned entities)
  • ConflictHandlingSample (first one wins)
  • ContextPoolSample (using a context pool)
  • TransactionsSample (explicit transactions)
  • MigrationsLib/ConsoleApp/WebApp (migrations with dependency injection and a library)

To build and run the .NET Core samples, please install

  • Visual Studio 2017 Update 7 with the .NET Core workload

Please download and install the tools from .NET Core downloads.

For code comments and issues please check Professional C#'s GitHub Repository

Please check my blog csharp.christiannagel.com for additional information for topics covered in the book.

Thank you!