Entity Framework is well-known Microsoft open source (from EF 5) data access technology for .Net applications. Rowan
Miller announced their team plans and future of Entity framework 7 in
TechEd America 2014. You can view recorded video on Channel 9.

Entity Framework 7 (EF7) provides a familiar developer experience to
previous versions of EF, including LINQ, POCO, and Code First support.
EF7 also enables access to data across relational and non-relational
stores. EF7 is much more lightweight than previous versions and is built
from the ground up to work great in the cloud (using ASP.NET vNext) on
devices (i.e. in universal Windows apps) as well as in traditional .NET
scenarios.

Entity Framework is currently in pre-release and enhancing with new features in every release. In this article I am going to share one of useful feature "In-memory store" using Console Application.

To test Entity Framework DB operations, we need to mock out Dbcontext which is not an easy task. In-memory store is useful for testing your data context with out mock out it. In-memory store will behave same as our actual data store.Using In-Memory data store you can experience same as real data store without setup.

Install Entity Framework in project, Entity Framework is extensible now. so, you have to choose and install required extension rather than a whole Entity framework. Here we need to install EntityFramework.core and In-memory provider only.

To configure In-memory as your data store, you have to override OnConfiguring method. This method helps to build your DbContext options. I have added options.UseInMemoryDatabase() it will consider it as I want to use an In-memory provider as database. Add DbContext class as we are doing in previous version of Entity Framework.

Wrap up all code

It's time to wrap up all code using DataContext. We have already configured In-memory as our Data provider so we do not need to do anything else. Add and retrieve Employee objects same way as we are doing. It will store in our memory instead of the real database.