Description
In this course, you will learn:
- Discover the foundations of ASP NET Core Web API.
- Create RESTful APIs in.NET 7.
- Discover how to document an API.
- An API with versioning.
- Use EF to implement the Repository Pattern in API to database.
- Implement and consume API authentication and authorization.
- To authenticate API, use.NET Identity.
- Combine Entity Framework with code-first migrations.
- Learn how to use HTTPClient to consume API under the Repository Pattern.
- In.NET API, dependency injection is used.
- API deployment to Azure
Syllabus:
1. First End point
- Add project to source control
- Code CleanUp
- Create VillaAPIController Class
- First API Endpoint - HTTPGET
- Using Controller Name in Route
- Add VillaDTO
- Villa Data Store
- Get individual Villa
2. CRUD Functionality
- Status Code in EndPoints
- Response Types
- HttpPOST in Action
- CreatedAtRoute
- ModelState Validations
- Custom ModelState Validation
- Http Delete in Action
- Http PUT in action
- Http Patch Nuget Packages
- Http Patch in Action
- PostMan
- Content Negotiations
3. Dependency Injection and DBContext
- Logger Dependency Injection
- Changing Logger with Dependency Injection - Serilog
- Dependency Injection - Custom Logging
- Entity Framework Core Database Models
- NugetPackages for Entity Framework Core
- SQL Server Connection Server Name
- Connection String and DbSet Entity
- Use Connection String
- Create Villa Table
- Seed Villa Table with records
- Use ApplicationDbContext in APIController
- Demo - Entity Frameowkr Core CRUD in Action
- AsNoTracking in Action
4. DTO and AutoMapper
- Seperate DTO for Create and Update
- Async Methods
- Setup AutoMapper and MApping Config
- AutoMapper in Action
5. Repository
- Add Villa Repository Interface
- Villa Repository Implementation
- Async Repository in Action
- Repository CleanUp
- API Response
- Standard API Response
- Villa Number Models
- Assignment 1 - Villa Number API Endpoints
- Add Foreign Key Reference
- CRUD Villa Number DTO with Villa ID
6. Consuming API
- Setup MVC Web Project
- Web Project DTO's and API Models
- AutoMapper
- Add API URL in AppSettings
- Base Service for API
- Adding Villa Service
- Calling Villa API
- Display all Villa List
- Create Villa UI
- Disable NULLABLE - IMPORTANT
- Update Villa Action Methods
- Update VIlla UI
- Delete Villa
- Add VillaNumberService
- Getting Villa Numbers
- Include Villa when retireving Villa Number
- Bootswatch Theme
- Villa Home Page
- Move Images
- Villa Number Assignment
- Create Villa Number GET
- Create Villa POST
- Special Validation and Base Service Update
- Display API Error Messages
- Update and Delete Action Method for Villa Number
- Update and Delete Villa Number
- Sweet Alert
7. API Security
- Add Models for Login and Registeration
- Add User Repository
- Implement User Repository - Register
- Implement User Repository - Login Part 1
- Generate Token on Successful Login
- User Controller
- Login and Register in Action
- Secure API Endpoints
- Authentication in Action
- Swagger and Bearer in Action
8. Consuming Secured API
- Add DTOs for Login and Registeration
- Add Auth Service
- Auth Controller Action Methods
- Login and Register View
- Auth Controller Action Methods
- NavBar Display
- Authentication in Web Project
- Pass Token to API from Web Project
9. Versioning in API
- Nuget Packages for API Versioning
- Add Versioning to API Services
- API Version Attribute
- Multiple Version in same Controller
- API Version Configuration
- Swagger Document for v1
- Multiple Version Swagger Doc
- Managing Multiple Versions - Cleaner Approach
- API Neutral and Depreciating API
- Consume Versioned API
10. Caching, Filter and Pagination
- Caching Request
- Caching Profile
- Filters in API
- Seach Villa Name
- Pagination in API
- Add Pagination to Response Header
- Status Code and IsSuccess
- Bug Fixing
11. .NET Identity
- Add Identity Library and Tables
- User Repository - Login
- User Repository - Register
- Login and Registration with Identity
- Login and Registration in Web Application