Caching In Entity Framework Core Using NCache

Gowtham K

By Thiago Vivas

Introduction

It will be explained in this article how to integrate Entity Framework Core with a caching engine using NCache. The article will give a practical example of how we could set up our Entity Framework Core in a Console application and how to make use of NCache to make faster requests to the database with its native in-memory distributed cache.

What is Entity Framework Core?

Entity Framework Core is Microsoft's most recent ORM - Object Relational Mapper, that helps software applications map, connect, and manage entities to a wide range of databases. Entity Framework Core is open source and cross-platform, being the top 1 ORM used by software using Microsoft technologies.

Read full Article

At the moment of writing this article, Entity Framework Core offers two ways to connect your entities to the database:

  • Code First, writing your project's entities first and then reflecting those objects in the database;
  • Database First, have your database created first and then generate your project's entities.

What is NCache?

NCache is also open-source and cross-platform software. Its cache server offers a scalable in-memory distributed cache for .NET, Java, Scala, Python, and Node.js. As this article will be focusing on .NET technologies, we can use NCache to take advantage of the following usages:

  • ASP.NET session state storage
  • ASP.NET view state caching
  • ASP.NET output cache
  • Entity Framework cache
  • NHibernate second-level cache
Read full Article

Signup for monthly email newsletter to get latest updates.

© Copyright Alachisoft 2002 - . All rights reserved. NCache is a registered trademark of Diyatech Corp.