Entity Framework (EF) Core is the new cross-platform and light-weight version of the popular Entity Framework from Microsoft. EF Core is an object-relational mapping engine for .NET that eliminates the need for most of the data-access code that developers otherwise write.
EF Core is increasingly being used in high transaction server applications (ASP.NET, WCF, and other .NET/.NET Core server apps). And, these applications need scalability to handle large amounts of user requests without slowing down. But, the database becomes a bottleneck and distributed caching must be used to eliminate this bottleneck.
Extension Methods is a feature of C# that allows you to extend existing classes and types without creating derived classes. An Extension Method is a special kind of static method but it is called as if it is an instance method on the extended class.
NCache has integrated its caching features in EF Core through Extension Methods. This makes using NCache from within an EF Core application very simple and straight forward. Below is a list of EF Core Extension Methods provided by NCache.
Caching Transactional Data: FromCache() / FromCacheAsync()
Caching Reference Data: LoadIntoCache() / LoadIntoCacheAsync()
Searching Reference Data: FromCacheOnly() / FromCacheOnlyAsync()
Updating the Cache: Cache Class for EF Core
Recorded Webinar: EF Core Caching thru Extension Methods
Presenters: Ron Hussain and Nick Zulfiqar
Learn how to use distributed cache like NCache in your EF Core applications for removing database scalability bottlenecks. This webinar will cover (including hands-on source examples):
- Introduction to EF Core and its new features (Model, Query, Saving Data).
- Database scalability bottlenecks in EF Core and how distributed cache resolves them.
- Various options for using NCache in EF Core (Direct APIs and EF Core Extension methods).
- Details of using EF Core Extension Methods for Caching.
- How to handle caching of Collections and Relationships for reference and transactional data?
- Some important features of a good distributed cache like NCache.
Using .NET Caching in EF Core Through Extension Methods [Video]