Maxtrain.com - info@maxtrain.com - 513-322-8888 - 866-595-6863
ASP.NET Core MVC and Web API
Alert MeDescription
ASP.NET Core MVC and Web API Course Introduction
Welcome to our dynamic and immersive ASP.NET Core MVC and Web API course. This 5-day instructor-led program is meticulously crafted to cater to a wide range of professionals – from those taking their first steps in ASP.NET Core MVC to seasoned developers eager to expand their expertise into Web API development.
Our course offers a deep dive into the world of modern web application development, ensuring that participants, regardless of their prior experience, gain a thorough understanding of both ASP.NET Core MVC and Web API.
Throughout the course, you will engage in practical, hands-on learning experiences designed to provide you with the knowledge and skills necessary to excel in today’s fast-paced web development environment. You’ll discover the power of Entity Framework, learn how to build robust, scalable web applications, and explore the latest techniques and best practices in ASP.NET Core MVC and Web API.
By the end of this course, you will have developed the confidence and competence to create high-quality, innovative web applications, setting a strong foundation for your future projects and professional growth in the field of web development.
Course Objectives
Throughout this course, you will:
- Understand URL Routing in MVC and Web API
- Master Controllers, Models, and Views
- Create MVC applications from start to finish
- Work with the Entity Framework for data management
- Build Views using HTML, CSS, and Razor
- Create and consume Web API and REST/OData web services
Prerequisites
Before attending this course, you must have:
- Strong skills in C#.
- Good HTML5 and CSS3 skills.
- Basic SQL Server experience.
Audience
This course is ideal for a wide range of professionals, including:
- New web developers looking to learn MVC and Web API development
- Experienced developers new to ASP.NET MVC and Web API
ASP.NET Core MVC and Web API Outline
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
Common Web Service Data Formats
- XML
- About XML
- SystemXml.Serialization
- JSON
- Syntax
- Using JSON Strings in JavaScript
- Using JSON Strings in C#
RESTful Web Services
- REST Updates
- Examples of Accessing a RESTful Web Service
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
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
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
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
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
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
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
OData
- Service Metadata Document
- Data Format
- OData is very case sensitive
- OData Queries
- Adding OData to a Project (.NET Core)
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
$2995.00
|
5 Days Course |