Notification entities in EF Core 1.1

By default, EF Core uses snapshot change tracking. However, if entity types implement INotifyPropertyChanged and optionally INotifyPropertyChanging, then EF can use these notifications to avoid the overhead of creating snapshots and detecting changes.

Continue reading

Advertisements

EF Core 1.1 – Creating DbContext instances

This post describes the different ways to create and configure instances of DbContext in EF Core 1.1. This includes:

  • Calling a constructor directly and overriding OnConfiguring
  • Passing DbContextOptions to the constructor
  • Using Dependency Injection (D.I.) to create instances

Continue reading