Missing And New Features In ASP.NET Core

Hi all, before starting with ASP.NET Core, we must know what are the new things that are added in it and what features are eliminated from it.



This is the most repeated question everyone is asking me: What is the difference between MVC5 and CORE MVC?

Let me share my thoughts on it below.

We should expect some changes when advanced technology is released with existing technology.
Similarly, in CORE we might be surprised to find some items are missing.

Firstly, we shall look at New Features,

  1. App_start
    This folder previously contained start up processes and settings such as configurations and routing. But now in .NETCore this item is replaced with startup.cs. Now we can all the settings, configuration and routing details in startup.cs.

  2. App_data
    This folder contains application data such as local database and log files. This folder in not included in Core version, but you have a chance to add it back to your project.

  3. Global.asax
    This file is not required because all startup functionality has been placed in startup.cs.

  4. Web Config
    This web.config file also been deleted from core version. Now all application settings are found in appsettings.json.

  5. Scripts
    Scripts directory used to store the js files has a home of scriptings, now in core all the files reside under wwwroot/js as static resource.

    In Core MVC, both MVC Controllers and WEB API controllers use the same routes and controller base class.

Let have a look at the root folder; there are many new files and folders in the project as shown below.

Let’s explore and understand their purpose in the project,


  1. SRC
    The root folder of the project is src folder, we call it source folder.

    This folder is used to identify the source code of the project.

  2. wwwroot

    The wwwroot folder is used by the host to serve static resources. Sub-folders also include js, css, images and libraries. The lib folder contains third party js libraries added via nugetpackage manager.

  3. Dependencies

    In Core MVC, more package management options are available, this version included bower and NPM Support, which we can configure by GUI.

    Additionally we can manage configuration by their respective json files.



  4. project.json

    The project.json file describes the application and its .NET dependencies. Unlike prior versions of MVC, you can add and remove .NET dependencies for your application using the project.json file.

    These dependencies are resolved through NuGet, and full intellisense is enabled within the file; simply begin typing the desired NuGet package name, and suggestions will appear on-the-fly. You can also configure cross-platform compilation and build scripts here.

  5. appsettings.json

    The appsettings.json file is the primary replacement for the Web.Config. In this file, you'll specify application settings such as connection string, email endpoints and more. The new configuration model supports the JSON format which is used throughout ASP.NET Core MVC.
Thanks for reading my blog.
X

Build smarter apps with Machine Learning, Bots, Cognitive Services - Start free.

Start Learning Now