In this episode, Robert is joined by Phil Japikse for part 5 of a 10 part series on Entity Framework Core. This series is a follow-up to the 5 part series that was aimed at folks new to EF Core and provides a more in-depth exploration of a number of topics.
In this episode, Phil shows Global Query Filters, which are new in EF Core, and provide a great mechanism for handling scenarios like multi-tenancy and soft delete.
Find the sample code at https://github.com/skimedic/presentations/tree/master/DOTNETCORE/Channel9_EFCoreShows/EntityFrameworkCoreExamples.
Learn more about Entity Framework Core at https://aka.ms/vstefcoredocs.
Episode list:
Part 1: Performance. (https://youtu.be/Y__n6OOt9IQ) Phil shows off all of the great performance improvements in EF Core.
Part 2: View Models. (https://youtu.be/aJZyfio-kz4) Phil covers using straight SQL, stored procedures, and populating view models with projections.
Part 3: Configuration. (https://youtu.be/Gij0WYUuxJc) EF Core provides a wide range of configuration options for the derived DbContext and it’s full support of dependency injection.
Part 4: Build Your Model. (https://youtu.be/IjSLmsu4MeA) This show is about creating your EF Core entities to shape the database and using migrations to publish the model.
Part 5: Global Query Filters. (this episode)
Part 6: Concurrency Conflicts. (https://youtu.be/7DnVcBzpEiQ) These have long been a problem for multi-user systems. Phil walks us through how concurrency checking works with EF Core and SQL Server, and all of the data provided back to the developer when a concurrency issue occurs.
Part 7: Connection Resiliency. (https://youtu.be/-HGG6BAwd_A) EF Core can gracefully handles transient database errors (if you enable the feature). Phil and Robert talk about what transient errors are, how to enable the feature, and how it effects using explicit permissions.
Part 8: Computed Columns. (https://youtu.be/m5BhHHn3_uw) Blending EF Core with server side functionality is a breeze with EF Core. Phil covers using computed columns in EF Core as well as mapping SQL Server function to C# functions for use in LINQ queries.
Part 9: Change Tracking Events. (https://youtu.be/mFX9mRx-HJk) The fairly recent addition of Tracking and State Change events provides a mechanism for audit logging (among other uses). Phil shows how this works as well as takes a quick spin through the EF Core Interceptors.
Part 10: Field Mapping. (https://youtu.be/QBng4BL1mTs) This enables EF Core to create your entities without calling the property setters, solving the long running problem of using an ORM with frameworks that use INotifyPropertyChanged, such as Windows Presentation Foundation (WPF).
Смотреть в источнике
Thank you !
Same as a View in a SQL database. Cool feature.
Both Entity Framework Core and Entity Framework 6 are installed. The Entity Framework Core tools are running. Use 'EntityFrameworkAdd-Migration' for Entity Framework 6.
Is there any plan to handle nosql db contexts with entity Framework in the future?
So how do I use a global query filter with multi tenancy, where the current tenant will be injected?