Sunday, September 23

Create first ASP.NET Core application


To create new application, we need an editor. It is not compulsory to use only Microsoft Editor. You can use any editor by your choice.
I will be using Microsoft Visual Studio Professional 2017.
To create new ASP.NET Core application, follow steps:
Open File menu -> New -> Project (Shortcut Ctrl + Shift + N), it will open New Project Wizard.

Now expand Visual C# in Installed section, then .NET Core. In the middle section you can multiple options for .NET Core project. Choose ASP.NET Core Web Application, give appropriate Name for project and select Location for the same. We can use Solution Name same as Name, otherwise can also change it.
Then New ASP.NET Core Web Application wizard will open for you project. See below screenshot.

There are already selected options on the top. One is .NET Core, and another is ASP.NET Core 2.1. First option defines project type, and second defines version.
For the .NET Core with ASP.NET Core 2.1 version it provides several templates.
Empty
An empty project template for creating an ASP.NET Core Application. This template does not have any content in it.
API
A project template for creating an ASP.NET Core Application with an example Controller for a RESTful HTTP service. This template can also be used for ASP.NET Core MVC Views and Controllers.
Web Application
A project template for creating an ASP.NET Core Application with example ASP.NET Core Razor Pages content.
Web Application (Model-View-Controller)
A project template for creating an ASP.NET Core Application with example ASP.NET Core MVC Views and Controllers. This template can also be used for RESTful HTTP service.
Angular
A project template for creating an ASP.NET Core Application with Angular.
React.js
A project template for creating an ASP.NET Core Application with React.js.
React.js and Redux
A project template for creating an ASP.NET Core Application with React.js and Redux.

We will go for an empty template. And uncheck Configure for HTTPS option. Set authentication to No Authentication.
It will work on your project for moments.

In Solution Explorer, you can see predefined files in your project. Which includes, Connected Services, Dependencies, Properties, wwwroot, Program.cs file, Startup.cs file.
Startup.cs

Program.cs

Both files will be discussed in relevant tutorials.
Mean while run the project by clicking on IIS Express or F5.

And its done. First application is ready for execution.

Wednesday, June 13

Introduction to ASP.NET Core

ASP.NET Core is a new framework with cross-platform compatibility and high-performance platform for building modern and could-based web app for different platforms(Windows, macOS or Linux).

If you have any experience with ASP.NET MVC or Web API over the last few years, you will notice some familiar environment. It combines the feature of MVC and Web API into a single web programming framework.

Advantages of ASP.NET Core:

  • A unified story for building web UI and Web APIs.
  • Integration of modern, client-side frameworks and development workflows.
  • A cloud-ready, environment-based configuration system.
  • Build-in dependency injection.
  • A lightweight, high-performance, and modular HTTP request pipeline.
  • Ability to host on IIS, Nginx, Apache, Docker, or self-host in your own process.
  • Side-by-side app versioning when targeting .NET Core.
  • Tooling that simplifies modern web development.
  • Ability to build and run on Windows, macOS and Linux.
  • Open-source and community-focused.

How to Install:

For Windows:
https://www.microsoft.com/net/learn/get-started/windows

For Linux:
https://www.microsoft.com/net/learn/get-started/linux/ubuntu18-04

For macOS:
https://www.microsoft.com/net/learn/get-started/macos

Create first ASP.NET Core application

To create new application, we need an editor. It is not compulsory to use only Microsoft Editor. You can use any editor by your choice. ...