Wednesday, April 26, 2017

Microsoft: ASP.NET Core tutorials

https://docs.microsoft.com/en-us/aspnet/core/tutorials/index

ASP.NET Core tutorials

The following step-by-step guides for developing ASP.NET Core applications are available:

Building web applications

Building web APIs

Working with data

Authentication and authorization

Client-side development

Testing

Publishing and deployment

Master Chef (Part 4) ASP.NET Core MVC and Angular 2 Implement CRUD Single Page Application

Master Chef (Part 4) ASP.NET Core MVC and Angular 2 Implement CRUD Single Page Application

Master Chef (Part 1) ASP.NET Core MVC with Fluent NHibernate and AngularJS

21 Sep 2016 CPOL
In this article, I want to show how to build a Single Page Application – MasterChef with ASP.NET Core MVC, Fluent Hibernate, and Angular JS.
ASP.NET 5 is dead, and is being renamed to ASP.NET Core 1.0. However, though naming the new, a completely written from scratch ASP.NET framework "ASP.NET 5" was a bad idea for a one major reason: 5 makes it seem like ASP.NET 5 is bigger, better, and replaces ASP.NET 4.6. Not so. So ASP.NET 5 is now ASP.NET Core 1.0, and NET Core 5 is now .NET Core 1.0. Why 1.0? Because these are new. The whole .NET Core concept is new. The .NET Core 1.0 CLI is very new. Not only that, but .NET Core isn't as complete as the full .NET Framework 4.6.
One of the big new features of working with ASP.NET Core is cross-platform compatibility. As of this version, we can both develop and run ASP.NET Core on Windows, which has always been the case, but also on Mac OS X and Linux operating systems.
ASP.NET Core and MVC are the server side of things, but as we touched on earlier, in a single-page application, there is also a client-side component. Angular is actually one of the more popular frameworks. It's built on top of the web technologies – HTML, CSS, and JavaScript – and follows a model view whatever pattern, which basically allows us to create apps that have a decoupling between the presentation and the business logic.
NHibernate is an object-relational mapping (ORM) solution for the Microsoft .NET platform. It provides a framework for mapping an object-oriented domain model to a traditional relational database. Fluent NHibernate offers an alternative to NHibernate's standard XML mapping files. Rather than writing XML documents (.hbm.xml files), Fluent NHibernate allows you to write mappings in strongly typed C# code. This allows for easy refactoring, improved readability and more concise code.
In this article, I want to show how to build a Single Page Application – MasterChef with ASP.NET Core MVC, Fluent Hibernate, and Angular JS.



Master Chef (Part 2) ASP.NET Core MVC with Fluent NHibernate and AngularJS

3 Oct 2016 CPOL
In this article I talk about how to use ASP.NET Core MVC, Fluent NHibernate and Angular JS to implement a CRUD SPA (Single Page Application).
In Maser Chef Part 1, I introduced how to integrate ASP.NET Core MVC with Fluent NHibernate and Angular JS. In this article I talk about how to use ASP.NET Core MVC, Fluent NHibernate and Angular JS to implement a CRUD SPA (Single Page Application).


Master Chef (Part 3) ASP.NET Core MVC with Entity Framework Core and Angular2

26 Jan 2017 CPOL
From this article, I’d like create ASP.NET Core (Net Core) application with Angular 2.

Introduce

In Master Chef Part 1 and Master Chef Part 2, I introduced how to integrate ASP.NET Core (Framework) with Angular JS and Fluent NHibernate. In this article, I’d like create an ASP.NET Core (Net Core) application. You should know NHibernate doesn’t have Net Core version yet, so I switch to Entity Framework Core. On 9/14/2016, Angular 2 Final release was out. Angular 2 is the second major installment of AngularJS and is entirely written in TypeScript. For the developers who are working with Angular 1.x, you might find a big change in Angular 2, as it is entirely component based and an object orientation, is much easier with enhanced DI capability. I’ll show you how to build Angular2 application in Visual Studio 2015 Update 3.

Create MasterChef2 Application in Visual Studio 2015 Update 3

Form Visual C#/Web, select ASP.NET core Web Application (.NET Core).
ASP.NET Core has two kinds of applications.
  1. ASP.NET Core .NET Framework Application is application running on Windows using .NET Framework.
  2. ASP.NET Core .NET Core Application is cross-platform application running on Windows, Linux, and OS X using .NET Core.

Master Chef (Part 4) ASP.NET Core MVC and Angular 2 Implement CRUD Single Page Application

25 Apr 2017 CPOL
Inthis article, I talk about how to use ASP.NET Core MVC, Entity Framework Coreand Angular 2 to implement a CRUD SPA (Single Page Application).

Introduction

In Master Chef (part 3) https://www.codeproject.com/Articles/1167027/Master-Chef-Part-ASP-NET-Core-MVC-with-Entity-Fram, I’ve introduced how to create ASP.NET Core MVC and Angular 2 applications. In this article, I talk about how to use ASP.NET Core MVC, Entity Framework Core and Angular 2 to implement a CRUD SPA (Single Page Application).

Server Data Model

Create, read, update and delete (as an acronym CRUD) are four basic functions of persistent storage.
We need to implement CRUD on database level in our repository class first. Add a basic Entity class.
    public class Entity
    {
        public virtual Guid Id { get; set; }

        public virtual Guid? ParentId { get; set; }
}
Then let RecipeRecipeStep and RecipeItem inherit Entity class, and use Id and ParentId these generic names to replace the corresponding keys and references.