DEV Community

Cover image for Migration to .NET Core
elanatframework
elanatframework

Posted on • Edited on

Migration to .NET Core

According to the previous content, i.e. migration from .NET, we will migrate to .NET Core in the near future and expand the serverside independence feature.

We have done many studies and by providing the infrastructure and conducting many tests, we announce that Elanat will have the highest amount of serverside independence after migrating to .NET Core.

We provided an infrastructure that provides code-behind (not the web form structure) in .NET Core and supports aspx pages. Soon we will provide migration from standard .NET to .NET Core for Elanat framework and add code-behind infrastructure with support for aspx pages separately from Elanat repository as a new repository in our repository list.

This structure is also based on MVC and will provide code-optimized and MVC together and based on aspx pages.

Example

View

<%@ Page CodeBehind="Default.aspx.Controller.cs" Inherits="YourProject.wwwroot.DefaultController" %><!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <title><%=model.PageTitle%></title>
</head>
<body>

</body>
</html>
Enter fullscreen mode Exit fullscreen mode

Controller

namespace YourProject.wwwroot
{
    public partial class DefaultController : CodeBehindController
    {
        private DefaultModel model = new DefaultModel();

        public void PageLoad(HttpContext context)
        {
            model.PageTitle = "My Title";
            View(model);
        }
    }
}
Enter fullscreen mode Exit fullscreen mode

Model

namespace YourProject.wwwroot
{
    public partial class DefaultModel : CodeBehindModel
    {
        public string PageTitle { get; set; }
    }
}
Enter fullscreen mode Exit fullscreen mode

The standard .NET platform created great challenges for us to create a framework on this platform, and we planned to leave this platform completely; but the new versions of .NET Core changed our mind to some extent and we will migrate to this platform.

After that, we will decide whether to leave Microsoft platforms completely or not.

Top comments (0)