Using .NET Caching in EF Core Through Extension Methods [Video]

DZone 's Guide to

Using .NET Caching in EF Core Through Extension Methods [Video]

An expert software developer shows us how to work with cached data and EF Core using C# in a web application.

· Web Dev Zone ·
Free Resource

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.

Register yourself for the upcoming Live & Interactive Webinar to Learn more about "Using .Net Caching in EF Core through Extension Method"

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.

  1. Caching Transactional Data: FromCache() / FromCacheAsync()

  2. Caching Reference Data: LoadIntoCache() / LoadIntoCacheAsync()

  3. Searching Reference Data: FromCacheOnly() / FromCacheOnlyAsync()

  4. 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.
.net, cache, ef core, extension methods, web cev

Published at DZone with permission of Shoeb Lodhi . See the original article here.

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}