The MVC technology 3, 4 and 5 has been a wonderful technology for many years. It targets versions 4.x of the .NET framework and serves its purpose well for creating amazing web applications.
ASP.NET Core is the active offering of Microsoft and provides cross-platform ground for building and running .NET apps on Linux, macOS, and Windows. This is the technology that will get updates going forward. So naturally, many people will want to choose developing Core MVC web applications.
Telerik UI has well supported and developed products for each of these technologies through its Telerik UI for ASP.NET MVC and Telerik UI for ASP.NET Core libraries.
This article aims at helping you with the process of migrating from ASP.NET MVC to ASP.NET Core.
CompatibilityThe good news is that there is almost 1:1 parity between the two UI toolsets. The transition is smooth, easy, and fully feature-covered. For any minor variations, check the section about exceptions to find out where the products differ from one another.
For reference, compare the code base of the following live samples to make sure the syntax is identical:
There are couple of differences worth mentioning to ease your migration process.
The MVC Grid server-rendered templates must transfer to client-rendered templates in Core Grid. Therefore, you will now use .HeaderTemplate()
instead of .ClientHeaderTemplate()
.
Check out the Migrate to ASP.NET Core MVC from ASP.NET Framework MVC blog post by Joe Guadagno to explore the common code-behind steps while migrating an app to ASP.NET Core MVC.
Some key takeaways from this blog are:
public ActionResult Validation_Save(IEnumerable<HttpPostedFileBase> files)
{
}
The following is the equivalent implementation in Core MVC:
public async Task<ActionResult> Validation_Save(IEnumerable<IFormFile> files)
{
}
The same is true for the Startup.cs
file. Check out the JSON serialization in Core article to see how to configure it.
You can check the Migrate from ASP.NET MVC to ASP.NET Core MVC MSDN article for general points when migrating.
Some key takeaways from this article are:
If you are coming from another Telerik UI toolset, refer to the following resources addressing this scenario:
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4