Why should I migrate to .NET Core?

.Net Core has been around for quite some time (.NET Core 1.0 was released on June 27, 2016). It was announced as a free, open-source software framework that will function on any platform, not just Windows. However, it was not sold as an upgrade to the .NET development framework; instead, it was marketed as a standalone framework with utilities that supplemented the existing functionality.

The.NET framework is still in use, with the most recent Visual Studio upgrade (4.7.2) issued on April 30, 2018.

With both frameworks still running strong, it's debatable whether to migrate to the.NET core framework or stick with the present one if it meets all of our criteria.

We are not on fire for migration when it comes to the.NET core. Because it's a Microsoft product, it's likely that we'll have to upgrade to.NET core at some point. Is it, however, a need or an emergency? Here are a few features that you'll need to upgrade to.NET Core if you need them.


".NET Core is a cross-platform version of.NET for building websites, services, and console programs," according to Windows; cross-platform compatibility being the crucial word here. If your program needs to operate on a variety of platforms other than Windows,.NET core is the platform to use because it is compatible with Windows, Linux, and Mac.

Microservices & Containers

Microservices architecture organizes an application as a set of services that span the business domain. Each service can be self-contained, segregated, and built on its own structure.

Containers and Microservices go hand in hand. Microservices can run in their own virtual environments, but Containers help isolate your application's runtime environment, as well as all the information and files needed to run it. As a result, application portability is possible. .NET Core is an ideal partner for Containers due to its lightweight nature. Because the.NET Framework is associated with Windows, an application written in it is much larger than one written in.NET Core. When using.NET Core, we can deploy both Linux and Windows Container images, allowing us to work cross-platform.


Because it delivers high-performance server runtime,.NET core is considered to be far superior to the traditional.NET Framework. When working across systems, as well as when working with the cloud, scalability is a concern. For SMBs, cloud-native modernization necessitates a considerable rewrite of their existing software. Microservice-based applications are at the heart of Cloud-native development. .NET Core's Microservices and Containers support model enables developers to create applications that fully utilize a Cloud computing architecture, resulting in a slight speed boost.

Migrating from one platform to another is expensive and may necessitate minor code changes. With these distinctions in mind, a company should consider whether or not to switch to. NET.

Migration to any platform is a project that requires.NET Development businesses to work in unison to execute, and it necessitates a complete revaluation of the services accessible on the previous platform. Make sure you employ a skilled team of experts in the process of evaluating technology partners for the same.

Please contact WebClues Infotech if you have any migration plans and are looking for a technically competent team. Their team of.Net professionals would gladly assist you with this.

Website: https://www.webcluesinfotech.com/microsoft-development-services/ 

Contact: +1 9783099910

Email: sales@webcluesinfotech.com

What is GEEK

Buddha Community

Why should I migrate to .NET Core?
Einar  Hintz

Einar Hintz


jQuery Ajax CRUD in ASP.NET Core MVC with Modal Popup

In this article, we’ll discuss how to use jQuery Ajax for ASP.NET Core MVC CRUD Operations using Bootstrap Modal. With jQuery Ajax, we can make HTTP request to controller action methods without reloading the entire page, like a single page application.

To demonstrate CRUD operations – insert, update, delete and retrieve, the project will be dealing with details of a normal bank transaction. GitHub repository for this demo project : https://bit.ly/33KTJAu.

Sub-topics discussed :

  • Form design for insert and update operation.
  • Display forms in modal popup dialog.
  • Form post using jQuery Ajax.
  • Implement MVC CRUD operations with jQuery Ajax.
  • Loading spinner in .NET Core MVC.
  • Prevent direct access to MVC action method.

Create ASP.NET Core MVC Project

In Visual Studio 2019, Go to File > New > Project (Ctrl + Shift + N).

From new project window, Select Asp.Net Core Web Application_._

Image showing how to create ASP.NET Core Web API project in Visual Studio.

Once you provide the project name and location. Select Web Application(Model-View-Controller) and uncheck HTTPS Configuration. Above steps will create a brand new ASP.NET Core MVC project.

Showing project template selection for .NET Core MVC.

Setup a Database

Let’s create a database for this application using Entity Framework Core. For that we’ve to install corresponding NuGet Packages. Right click on project from solution explorer, select Manage NuGet Packages_,_ From browse tab, install following 3 packages.

Showing list of NuGet Packages for Entity Framework Core

Now let’s define DB model class file – /Models/TransactionModel.cs.

public class TransactionModel
    public int TransactionId { get; set; }

    [Column(TypeName ="nvarchar(12)")]
    [DisplayName("Account Number")]
    [Required(ErrorMessage ="This Field is required.")]
    [MaxLength(12,ErrorMessage ="Maximum 12 characters only")]
    public string AccountNumber { get; set; }

    [Column(TypeName ="nvarchar(100)")]
    [DisplayName("Beneficiary Name")]
    [Required(ErrorMessage = "This Field is required.")]
    public string BeneficiaryName { get; set; }

    [Column(TypeName ="nvarchar(100)")]
    [DisplayName("Bank Name")]
    [Required(ErrorMessage = "This Field is required.")]
    public string BankName { get; set; }

    [Column(TypeName ="nvarchar(11)")]
    [DisplayName("SWIFT Code")]
    [Required(ErrorMessage = "This Field is required.")]
    public string SWIFTCode { get; set; }

    [Required(ErrorMessage = "This Field is required.")]
    public int Amount { get; set; }

    [DisplayFormat(DataFormatString = "{0:MM/dd/yyyy}")]
    public DateTime Date { get; set; }


Here we’ve defined model properties for the transaction with proper validation. Now let’s define  DbContextclass for EF Core.

#asp.net core article #asp.net core #add loading spinner in asp.net core #asp.net core crud without reloading #asp.net core jquery ajax form #asp.net core modal dialog #asp.net core mvc crud using jquery ajax #asp.net core mvc with jquery and ajax #asp.net core popup window #bootstrap modal popup in asp.net core mvc. bootstrap modal popup in asp.net core #delete and viewall in asp.net core #jquery ajax - insert #jquery ajax form post #modal popup dialog in asp.net core #no direct access action method #update #validation in modal popup

Einar  Hintz

Einar Hintz


MVC User Registration & Login with ASP.NET Core Identity

User registration and authentication are mandatory in any application when you have little concern about privacy. Hence all most all application development starts with an authentication module. In this article, we will discuss the quickest way to use **ASP.NET Core Identity for User Login and Registration **in a new or existing MVC application.

Sub-topics discussed :

  • How to add ASP.NET Core Identity to MVC application.
  • Customize ASP.NET Core Identity.
  • Identity.UI Design Customization.
  • Next step.


ASP.NET Core Identity is an API, which provides both user interface(UI) and functions for user authentication, registration, authorization, etc. Modules/ APIs like this will really be helpful and fasten the development process. It comes with ASP.NET Core Framework and used in many applications before. Which makes the API more dependable and trustworthy.

ASP.NET Core MVC with user authentication can easily be accomplished using Identity.UI. While creating the MVC project, you just need to select Authentication as Individual User Accounts.

Showing how to create an MVC application with ASP.NET Core Identity API

The rest will be handled by ASP.NET Core Identity UI. It already contains razor view pages and backend codes for an authentication system. But that’s not what we want in most of the cases. we want to customize ASP.NET Core Identity as per our requirement. That’s what we do here.

Create an ASP.NET Core MVC Project

First of all, I will create a brand new ASP.NET Core MVC application without any authentication selected. We could add ASP.NET Core Identity later into the project.

In Visual Studio 2019, Go to File > New > Project (Ctrl + Shift + N). From new project window, select ASP.NET Core Web Application.

Create an ASP.NET Core Web application

Once you provide the project name and location. A new window will be opened as follows, Select _Web Application(Model-View-Controller), _uncheck _HTTPS Configuration _and DO NOT select any authentication method. Above steps will create a brand new ASP.NET Core MVC project.

Select Model View Controller templet under .NET Core

#asp.net core article #asp.net core #add asp.net core identity to existing project #asp.net core identity in mvc #asp.net core mvc login and registration #login and logout in asp.net core

Index is not an attribute class – Error while migrating from ASP.Net MVC 5 to .Net Core

Recently one of my friends was migrating a project from ASP.Net MVC 5 to ASP.Net core 3.1. One of the challenges he faced is with the Index Attribute in data annotations. The .Net Core is not recognizing the Index attribute. When he copied his class from his MVC 5 project, he got the following error message.


Though the other data annotations accepted by .Net Core, this data attribute “Index” was throwing an exception.

“Index is not an attribute class”

Cool!. Let us dig into the details. You can find the related post on the Entity Framework Github page.



From the page, it is clear now, this is not a bug, the EF Core team didn’t migrate the Index Attribute from the EF 6. So we need to live with this.

Now the question arises, how we are going to add the Indexes to our Tables. The answer is to use the Fluent API in ASP.Net core.

You can refer to the following link on the Microsoft Site to get the details of how to apply the Index to a property.


So the solution is to replace the Index Attribute to the Fluent API, as below.


In real life, you will have many classes, and adding all classes using Fluent API inside OnModelCreating() method will make your code difficult to maintain. The solution is to create a separate class derived from IEntityTypeConfiguration. This will help us define all the related configurations in a single class and then apply the configurations from the OnModelCreating() method.

Let us apply the configuration class for the above. The following is the configuration class.


Once you have the configuration class, you can apply the configuration in the ModelCreating() method as follows.


Happy Coding!

#asp.net #asp.net core 3.1 #.net core #entity framework core #mvc #migration #.net #microsoft

Authorization in asp.net core

#Asp.net core #Asp.net core mvc #Core #Asp.net core tutorials #Asp.net core with entity framework

AllowAnonymous in asp.net core

#Asp.net core #Asp.net core mvc #Core #Asp.net core tutorials #Asp.net core with entity framework