On the date 2023-09-05 the second version ready to install Elanat was released (version 2.0.0.0); exactly one week after removing the old source code and releasing the source code of the new version on GitHub. The second version of Elanat based on ASP.NET Core was presented; this was while the previous version, 1.0.8.4, was created based on the .NET standard.
The migration of Elanat from .NET Standard version 4.5 to .NET Core version 7.0 took only two weeks.
This rapid migration was due to the use of a new MVC and back-end framework developed by Elanat. Elanat named this framework CodeBehind and made it available to everyone. This framework returns aspx files and the PageLoad method makes all HttpContext values available.
Note: Web development in the CodeBehind framework is based on a modern MVC structure and has nothing to do with Microsoft's Web-Form.
As you can see, only the first line of the aspx page information has changed and the rest of the data has remained unchanged.
CodeBehind namespace has been added in the model section class; also, the word partial has been added before the class name.
The parent class name of CodeBehindModel is also added in front of the model class name.
Controller section changes have also been done simply
The following are the controller changes:Added CodeBehind namespace
System.Web.UI.Page has been removed and CodeBehindController has been added instead
The underline of the main method has been remove(Page_Load to PageLoad)
The main method has been changed from private to public
The following input arguments were omitted
object sender, EventArgs e
And the following new argument is added
HttpContext context
View(model) method; Added before the end of the main method
To access the current HttpContext, the HttpContext context argument has been added inside the btn_SendEmail_Click method.
Added context prefix to Request
Please note that the capitalization of the first letter of the project name and the addition of Controller to the name of the MemberChangeEmail class are for arranging the naming and are not required!
We created some methods that were in standard .NET but not in .NET using Extension methods and the codes remained intact.
Example of SaveAs method on IFormFileFortunately, all the data remained unchanged and the source code of the server side also had minor changes; For example, the App_Data directory remains as a relic of the ASP.NET standard.
The Elanat repository based on ASP.NET Core can be seen in the link below:We created a new repository and copied all the information from the ASP.NET Standard based Elanat repository into the new repository. This repository's README.md file provides information on how to migrate Elanat from ASP.NET Standard to ASP.NET Core.
You can see the Elanat repository based on ASP.NET Standard in the link below:Elanat is add-on oriented framework. Elanat is free and open-source ASP.NET Core CMS under license GPL V3. The Elanat kernel is designed to create an add-on for it as easily as possible; the Elanat kernel contains a variety of add-ons; the structure of Elanat allows the programmer to create a new web system containing different types of add-ons.
Download