• Documentation

    Elanat Documentation
    The most important feature of Elanat is its add-ons-oriented structure. Add-ons-oriented structure allows you to create your own Add-ons without conflicting with Eanat core.

    Structure - The story of Elanat migration to ASP.NET Core. In just two weeks!

    Introduction :

    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.


    An example of .NET Standard code changes to .NET Core

    View in ASP.NET Standard View in ASP.NET Core

    As you can see, only the first line of the aspx page information has changed and the rest of the data has remained unchanged.


    Model in ASP.NET Standard Model in ASP.NET Core

    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 in ASP.NET Standard Controller in ASP.NET Core

    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 IFormFile

    Fortunately, 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:
    https://github.com/elanatframework/Elanat
    Elanat external add-on repository:
    https://github.com/elanatframework/Elanat_add-ons
    Code-Behind library is a backend framework:
    https://github.com/elanatframework/Code_behind

    Elanat old

    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:
    https://github.com/elanatframework/Elanat_old