Course Overview
This course provides a practical hands-on introduction to developing Web applications using ASP.NET Core 5.0 MVC and C#. This Web development framework from Microsoft emphasizes separation of concerns in the architecture and testability of applications. This course covers development on Microsoft’s new .NET Core platform. The course is current to .NET 5.0, which is a major update of .NET Core and is the foundation for future Microsoft .NET development. This course covers the fundamentals of the Model-View-Controller design pattern and its implementation in ASP.NET Core MVC. This technology is compared with classical ASP.NET Web Forms. Visual Studio 2019 is used as a productive platform for creating MVC Web applications. After presenting the fundamentals of the technology with several examples, the main components of Model, Controller and View are covered in detail. The discussion of the Model incorporates Microsoft technologies for persisting data, including XML Serialization and ADO.NET with SQL Server 2016. The routing mechanism of ASP.NET MVC is covered. The course includes an introduction to ASP.NET Web API and deployment on the Azure cloud. Numerous programming examples and exercises are provided. The student will receive a comprehensive set of notes and all the programming examples.
What you’ll learn
At the end of the series, you’ll
- Learn structure of ASP NET MVC Core
- Learn structure of ASP NET Core
- Learn fundamentals of ASP NET MVC Core
Requirements
- The student should have a good working knowledge of C# and the .NET Framework. Basic knowledge of HTML and some prior exposure to .NET Core would also be helpful.
Target audiences
- Experienced application developers or architects responsible for Web applications in a Microsoft environment.
Curriculum
- 1 Section
- 9 Lessons
- 2 Days
- Topics9
- 1.1Introduction to ASP.NET Core MVC Review of ASP.NET Web Forms Advantages of ASP.NET Web Forms Disadvantages of ASP.NET Web Forms Model-View-Controller Pattern ASP.NET MVC ASP.NET Core What is .NET Core? Advantages of ASP.NET MVC ASP.NET MVC Considerations Goals of ASP.NET MVC ASP.NET Core 5.0 Unit Testing Summary
- 1.2Getting Started with ASP.NET Core MVC An ASP.NET Core MVC Testbed Visual Studio ASP.NET MVC Demo Starter Application Simple App with Controller Only Startup.cs Edit Startup.cs Action Methods and Routing Action Method Return Type Rendering a View Creating a View The View Web Page Dynamic Output Razor View Engine Embedded Scripts Embedded Script Example Using a Model with ViewBag Controller Using Model and ViewBag View Using Model and ViewBag Using Model Directly Passing Parameters in Query String Lab 2 Summary
- 1.3ASP.NET MVC Architecture The Controller in ASP.NET MVC The View in ASP.NET MVC The Model in ASP.NET MVC How MVC Works Using Forms HTML Helper Functions Handling Form Submission Model Binding Greet View Input Validation Nullable Type Checking Model Validity Validation Summary Lab 3 Summary
- 1.4The Model Complex Models MvcBooks Example The View The Model: Book and Category The Model: DB MvcBooks – Step 2 Books by Category Books by Category – View Running Step 2 Microsoft Technologies for the Model XML Serialization Demo Running the Starter Code XML Serialization: Save Deserialization XML Serialization What Will Not Be Serialized Lab 4 XML as a Data Store MvcBooks – Model Save() Restore() AddCategory() MvcBooks – Controller Adding a Category View for Adding a Category Running the Example SmallPub Database Using ADO.NET Model Controller and View Running the Database Example Summary
- 1.5The Controller Controller Base Class Controller Base Class Action Methods Action Method Example Index() Action Method Info() Action Method Info.cshtml Running the Example Receiving Input Binding Example Non-Nullable Parameters Nullable Parameters Using a Model Action Results Action Result Example Output Demo JavaScript Object Notation Serving Static Files Action Method Attributes Lab 5 Filters Asynchronous Controllers Summary
- 1.6The View View Responsibility A Program with a View View Page Passing Data to the View Dynamic and ExpandoObject Passing Lists to the View HTML Helper Methods Link-Building Helpers Form Helpers Html Helper Example Validation Helpers Templated Helpers Validation in Model Validation in Controller ValidtionMessage Helper Running the Example Lab 6 Summary
- 1.7Routing ASP.NET Routing Routing in ASP.NET Core MVC Simple Route Example Math Controller Default Values for URL Parameters Using a Default Route Home Controller Assigning Parameter Values Controller Code View Code Running the Example Properties of Routes Optional Parameter Matching URLs to Route Defaults Multiple Routes Example Attribute Routing Combining Routes Empty String for Route Attribute Token Replacement Summary
- 1.8ASP.NET Core Web API ASP.NET Core Web API REST Representation, State and Transfer Collections and Elements Web API Demo Strings Controller Project Settings HTTP Testing Tools Using Postman Implementing and Testing POST Lab 8A HTTP Response Codes Testing Improved Code for GET POST Response Code Named Route Testing Improved Code for POST Location Header Response Code for PUT and DELETE Web API Clients HttpClient Initializing HttpClient Issuing a GET Request Issuing a POST Request Lab 8B Summary
- 1.9ASP.NET Core and Azure What is Windows Azure? A Windows Azure Testbed Windows Azure Demo Publish to Azure Web Deployment Completed Modifying a Web Application Deploy to Original Site A Deployed Application Lab 9 Summary
