ASP.NET Core API. From scratch to Master + Azure deployment
Created by Jakub Kozera, Last Updated 24-Dec-2020, Language:English
ASP.NET Core API. From scratch to Master + Azure deployment
Complete C# ASP.NET Core 3.1 and Entity Framework bootcamp. Linux/macOS guide. Deploy API and Database to MS Azure cloud
Created by Jakub Kozera, Last Updated 24-Dec-2020, Language:English
What Will I Get ?
- Create a ASP .NET Core application that according to the REST architecture will: read, create, modify or delete data from the server - using Entity Framework Core
- Authenticate & authorize users via JWT tokens - with custom authorization policies
- Create Azure App Service resource and deploy API along with Database to Azure Cloud
- create a MS SQL database based on classes in C#
- send database queries from code using ORM (Entity Framework Core)
- use of the basics Azure Cloud services
- hash users passwords
- validate incoming models and return appropriate messages in case of incorrectness
- use the built-in container to inject dependencies
- log errors or specific information to a text file
- create documentation (using the Swagger tool)
- use the auto-mapper
- configure NLogger
- use the Postman to consume the web API
- create your own authorization policies
- configure entity framework relationships
- handle Cross-Origin Resource Sharing policy
- create Action API filters
- serve static files publicly & with limited user access
- handle exceptions globally with ExceptionFilter
- configure AzureSQL database
- cache server responses
- restrict resource access
Requirements
- Basic knowledge of C#, including LINQ, collections and generic types
Description
The .NET Core platform is the latest tool from Microsoft enabling the creation of cross-platform applications, including web and web APIs.
Due to its high performance, open-source code, and the possibility of implementation on various systems, it is becoming more and more popular.
The course presents how using ASP.NET Core a web API application is created, which ultimately can be consumed by SPA (single page application), mobile applications, IoT applications, or any application where communication takes place via the HTTP protocol. First of all, the course will show you how to build applications in accordance with the REST architecture. Good practices will be discussed, such as dependency injection, auto-mapping, error logging, model validation, use of object-relational mapping.
During the course you will:
- create an application that according to the REST architecture will: read, create, modify or delete data from the server
- send database queries from code using ORM (Entity Framework Core)
- create an MS SQL database based on classes in C #
- validate incoming models and return appropriate messages in case of incorrectness
- use the auto-mapper
- use the built-in container to inject dependencies
- log errors or specific information to a text file
- create documentation (using the Swagger tool)
- configure NLogger
- use the Postman to consume the web API
- authenticate users via JWT tokens
- create your own authorization policies
- create a user and role entities tables
- hash users passwords
- authorize based on users claim and its value
Course Content
-
Course Introduction
1 Lectures 00:01:22-
Welcome message
Preview00:01:22
-
-
HTTP & REST
3 Lectures 00:08:43-
What is HTTP and how does it work
Preview00:03:20 -
REST and its assumptions
Preview00:02:51 -
REST API design
Preview00:02:32
-
-
New .NET Core project
4 Lectures 00:21:20-
Creating empty web API project
00:04:01 -
.NET Core on Linux/macOS course guide
00:10:24 -
Startup class
00:02:50 -
Dependency Injection
00:04:05
-
-
Entity Framework
5 Lectures 00:17:54-
Installing Entity Framework package
00:02:01 -
Creating entities
00:03:43 -
MeetupContext
00:04:08 -
Database migration
Preview00:03:24 -
Seeding database
00:04:38
-
-
First API Controller
10 Lectures 00:42:34-
Postman as a HTTP client
00:02:09 -
Sample controller
Preview00:07:32 -
Implementing Meetup Controller
00:02:51 -
Status codes
00:02:43 -
Automapping
00:06:46 -
Getting resources
Preview00:05:40 -
Creating resources
00:04:34 -
Model validation
00:02:46 -
Meetup modification
00:04:35 -
Removing data
00:02:58
-
-
Extending the data endpoints
5 Lectures 00:30:44-
Creating sub-resources
00:08:21 -
Fetching sub-resources
00:04:45 -
Removing sub-resources
00:05:34 -
Configure NLog
00:06:50 -
Swagger API Documentation
00:05:14
-
-
Authentication
7 Lectures 01:00:56-
What is authentication and ways of authentication
Preview00:03:27 -
Add user and role entity
00:06:14 -
User registration
00:08:15 -
Password hashing
00:06:34 -
Data validation refactor
00:10:47 -
JWT tokens
00:09:42 -
Login Action
00:15:57
-
-
Authorization
5 Lectures 00:46:10-
What is authorization and authorization methods
00:06:52 -
Role based authorization
00:05:17 -
Claim based authorization
00:08:04 -
Custom authorization policy
00:12:03 -
Resource based authorization
00:13:54
-
-
API Filters
5 Lectures 00:27:05-
API filters and their types
00:02:18 -
Action filter
00:06:02 -
Exception filter
00:06:37 -
Custom authorize filter
00:06:20 -
Injecting dependencies into filters
Preview00:05:48
-
-
Utility API
4 Lectures 00:25:58-
Cross-Origin Resource Sharing
00:05:32 -
Serving static files
00:11:29 -
Caching
00:04:26 -
Functional actions
00:04:31
-
-
Deploying the application to the Azure cloud
7 Lectures 00:33:24-
Azure and its basic services
00:04:19 -
App Service creation
00:06:40 -
Deploy with Publish Profile
00:03:02 -
Azure SQL Database
00:06:38 -
Customizing MeetupContext
00:06:59 -
Automatic migrations
00:04:03 -
API In the Cloud
00:01:43
-
-
Summary
1 Lectures 00:05:08-
Course summary
00:05:08
-