Logo

Maxtrain.com - [email protected] - 513-322-8888 - 866-595-6863

MA-2009

ASP.NET MVC 5 and Web API

Alert Me

Description

C, Web API and the Entity Framework is a very complete set of tools built by Microsoft to allow you to quickly create multi-tiered modern web applications. ASP NET MVC 5 and Web API is a five-day instructor-led course is a deep dive into MVC and covers not only Models, Views and Controllers, but also covers ASP.NET Routing, Web API, REST, OData and the Entity Framework. You will get hands on with guided labs that reinforce the lecture material.

Key ASP NET MVC 5 and Web API Takeaways:

You will learn to:

  • Understand the role of URL Routing in MVC and Web API.
  • Understand the roles of Controllers, Models and Views.
  • Create beginning to end MVC applications.
  • Work with the Entity Framework.
  • Create Views using HTML, CSS, Razor and Bootstrap.js.
  • Create and consume Web API and REST/OData web services.

 

Outline

Module 1 - Introduction     

  • Welcome!
    • Prerequisites
  • Versions
  • What is MVC
    • Models
    • Controllers
    • Views
    • Maybe they should have called it RCMV!
  • What is Web API
  • Hosting
  • Tools
  • Auto-magic and Conventions
  • MVC – Highly Customizable
  • A Few Notes about Databases for Developers
    • Microsoft SQL Server
    • Other Databases
  • C# Notes and Tips

Module 2 - Common Web Service Data Formats

  • XML
    • About XML
    • SystemXml.Serialization
  • JSON
    • Syntax
    • Using JSON Strings in JavaScript
    • Using JSON Strings in C#

Module 3 - RESTful Web Services

  • REST Updates
    • Examples of Accessing a RESTful Web Service

Module 4 - ASP.NET Web API

  • Web Services
  • A Brief History of Web Services
  • Microsoft Tools to Create Web Services
    • Web API vs. “Minimal APIs”
  • Web API Project Structure
    • All .NET Core Applications are Console Applications
    • A Console Application
    • An MVC Web Site
  • Create and Review a Web API Project
    • An example for .NET Core 6
    • Visual Studio Run/Debug Options
    • Create New Projects from the Command Prompt
    • Common .Net Core MVC Project Folders
  • ASP.NET Configuration
  • Built-in Web Servers
    • The Kestrel Built-in Web Server
    • HTTP.sys
    • Kestrel vs HTTP.sys
    • Program.cs Server Configuration
  • Startup Process
  • Services
    • A service is…
    • Common Services used with Web Projects
    • .AddMvc
    • .AddControllers
    • .AddRazorPages
    • Custom Services
  • Add Support for XML
  • ASP.NET Core Middleware
    • The Order of Middleware is Important
  • Areas
    • Controllers
    • Routes
    • Creating Areas
  • Linking between Areas

Module 5 - Routing

  • Examples of Routes
  • Conventional Routes vs. Attribute Routes
  • Static Files
    • app.UseStaticFiles()
    • Redirect to a Static File
    • Route to Code
  • Enable Routing
  • Web API Attribute Routing
    • Routes and Parameters
    • Catch-all Parameter

Module 6 - Controllers and Actions

  • Controllers
    • Controllers are Classes
    • Actions are Methods
  • Creating Controller Classes
    • Naming Conventions and “Auto-magic”
    • Options for Adding New Controllers:
    • Manually Add a Controller
    • Add a Controller Using Templates
  • Actions
  • Creating Actions
  • Route to Controller to Action
  • Working with Parameters
    • Path Parameters
    • Routing Details
    • Parameter Notes
    • “Model 101”
    • Domain Model vs. View Model
  • Action Filters
    • Built-in Action Filters
    • Custom Action Filters
  • Best Practices

Module 7 - Models

  • Models
  • Models are Just Classes (plus some goodies)
  • MVC/Web API without the Entity Framework?
  • Tiers
  • Data Type Mapping
  • Model Attributes
  • Setting Database Types
    • System.ComponentModel.DataAnnotations
    • System.ComponentModel.DataAnnotations.Schema
    • Microsoft EntityFrameworkCore (Annotations)
  • Validation and Model State
  • Navigation Properties
    • Reverse Navigation Properties
    • Navigation Properties and JSON Serialization
    • LINQ Queries
    • Virtual Navigation Properties
  • View Models
  • Best Practices

Module 8 - Services and Dependency Injection

  • Services
    • A Service is:
    • An example…
  • An example Web API logging class that:
    • Using the Class
  • Adding the Service to an MVC or Web API application
  • Dependency Injection
    • Common Services used with Web Projects
    • Custom Services
  • Entity Framework as a Service

Module 9 - Entity Framework

  • Entity Framework
  • Other Object-Relational Mapper Tools
  • Entities
  • Context
  • Getting the Entity Framework
  • Database First and Code First
  • Primary Entity Framework Objects
  • Database First
    • A Demo Project
    • Setup the project:
    • Create the Data Models:
  • Code First
    • A Demo Project
    • Create the Model Classes
    • Console Application
    • MVC or Web API Application
    • Notes for Code First
  • Accessing Data with the Entity Framework
    • Loading All Data
    • Loading a Single Entity
    • Filtering
  • Accessing Related Data
    • Eager Loading
    • Explicit Loading
    • Lazy Loading
  • Testing with Standard Data
    • Entity Framework Fluent API
  • In Summary

Module 10 - Consuming Web Services

  • Calling a Web Service from Server-Side Code
  • Calling Web Services from Ajax and jQuery
  • Calling a Web Service from PowerShell
  • Web API Help Pages using Swagger / OpenAPI and Swashbuckle

Module 11 - OData

  • Service Metadata Document
    • Data Format
    • OData is very case sensitive
  • OData Queries
  • Adding OData to a Project (.NET Core)

Module 12 - Hosting and Deployment

  • Kestrel
  • HTTP.sys
  • Kestrel Behind a Proxy
  • Hosting in Azure Web App
  • Hosting in Linux
  • Testing from Windows 10 Windows Subsystem for Linux

 

 

PreRequisites

Before attending this course, you must have:

  • Strong skills in C#.
  • Good HTML5 and CSS3 skills.
  • An understanding of how mobile devices impact your web projects.
  • Basic SQL Server experience.

Audience

This class is for new web site developers needing to learn the full MVC collection of features and for experienced developers new to ASP.NET MVC.

 

$2995.00

5 Days Course

Class Dates

Request a Date or a Private Class below.


Categories: ,
Loading ...