Skip to content

Getting started for ASP.NET Core + MVC or Razor pages

Here we describe how to add EasyQuery to your ASP.NET Core application with MVC or Razor Pages views.

The easiest way to start getting acquainted with EasyQuery framework is to install and launch our demo projects available on GitHub. You can clone that repository with samples, download it as a ZIP archive or even right away!

  1. You have an ASP.NET Core version 2.1+ project with MVC views (or Razor pages)
  2. Your application uses Entity Framework Core to work with the database. NB: Of course, it’s possible to use EasyQuery without EF Core. We show this approach here just because it’s the simplest way. For other options please read Possible ways of data model creation and loading article.

To start using EasyQuery trial you need to register and get your trial version keys first. It takes 1-2 minutes of your time. On registration you will get access to a special “Client’s Area” of our web-site where you can see available licenses, get the keys, and submit a support request if necessary.

Step 1: Add EasyQuery packages to your project

Section titled “Step 1: Add EasyQuery packages to your project”

First, we are going to add EasyQuery to your ASP.NET Core backend project.

Since we have a standard ASP.NET Core project with EntityFramework Core - then we will need the following 3 EasyQuery packages be added to your project:

  • Korzh.EasyQuery.AspNetCore
  • Korzh.EasyQuery.EntityFrameworkCore.Relational
  • Korzh.EasyQuery.RazorUI

The latest package is a Razor UI library which contains several ready-to-use page templates (partial views) that work with EasyQuery components.

Hint: To add packages use NuGet Package Manager in Visual Studio (Tools | NuGet Package Manager | “Manager NuGet Packages for Solution menu item).

Step 2: Add EasyQuery services and middleware

Section titled “Step 2: Add EasyQuery services and middleware”

The next step will be to setup EasyQuery services and the middleware. Here are the parts your will need to add to your Startup class.

First of all, set the trial version keys you got on the Step 0: