Skip to main content
00:00/00:00
Lecture 9 of 185

Tenant Db Context

Download Course (Free)

Course Content

0 / 185 completed
Section 1: Introduction3 videos

What we will develop

10m

Introduction

12m

What you will need to follow

8m
Section 2: Solution Design And Database Contexts21 videos

Clean Architecture Solution Creation

10m

Nullable Property Handling

8m

Project Responsibilities Overview

5m

School Entity Definition

5m

Packages installations

18m

Tenant Db Context

9mNow Playing

Tenant Entity Definition

17m

Multitenant into Dependency Injection

18m

Tenancy Constants

7m

Application Role and Role Claim

10m

Multitenancy into final Dependency Injection Container

15m

Application User - IdentityUser

21m

Base Db Context - Tenant database usage configuration (TenantInfo Property

7m

Base Db Context - Identity Models

24m

Application Db Context - Definition and DI

17m

Base Db Context - Tenant database usage configuration

28m

Connection Strings

9m

Apply Configurations From Assembly

17m

IEntity Type Configuration - AspNetCore Identity Tables

32m

Application Db Context Migration

14m

Tenant Db Migration

26m
Section 3: Constants9 videos

School Action Constants

8m

School Feature Constants

6m

School Permission Constant

16m

School Permissions - Tenants

20m

School Permissions - Identity and School

27m

Role Constants

12m

Claim Constants

4m

School Permissions - Filters

32m

Claim Group Inclusion

20m
Section 4: Database InitializersSeeders13 videos

Initialize Database - Migrations

28m

Initialize Default Roles

24m

Assign Permissions To Role - Specific Role

31m

Initialize Default Roles - Complete

1h 4m

Assign Permissions To Role - Logic

44m

Initialize Database With Tenant - Logic

25m

Tenant Db Seeder - Definition

18m

Assign User to Admin Role

24m

Initialize Admin User - Logic

48m

Initialize Application Db For Tenant

29m

Database Seeder into Dependency Injection

27m

Identity Service into Dependency Injection

28m

Database Seeder Test - Success

10m
Section 5: Custom Exceptions and Global Response Wrapper8 videos

Unauthorized Exception Definition

15m

Response Wrapper Interfaces - Definitions

12m

More Custom Exceptions - Definitions

17m

Non-Generic Response Wrapper - Failure implementations (Function Over Load)

5m

Non-Generic Response Wrapper - Failure implementation

12m

Non-Generic Response Wrapper - Failure implementations (Function Over Load)

9m

Non-Generic Response Wrapper - Success implementations complete

12m

Generic Response Wrapper - Definition and Implementations

25m
Section 6: Permission Based Authorization4 videos

Permission Requirement - Definition

6m

Permission Policy Provider - Definition

30m

Permission Authorization Handler - Definition

27m

Permission Base Auth into Dependency Injection

13m
Section 7: Authentication - Json Web Token generation17 videos

Token Request and Response models

9m

Refresh Token Request model

7m

Token Service Interface Definition

6m

TokenService - Implementation (Dependencies)

14m

TokenService - Login Implementation(Tenant Subscription Expiry Validation)

20m

TokenService - Login Implementation(Validations)

39m

Claims Principal Extensions

11m

Login Full Implementations

1h 30m

Token Generation - Inclusion of Claims

1h 4m

Code refactoring - Configurations

42m

Code refactoring - Configuration into Dependency Injection

12m

Refresh Token - Complete implementation

1h 14m

Add Jwt Authentication into Dependency Injection part 2

22m

Add Jwt Authentication into Dependency Injection part 3

32m

Tenant Header as an Attribute

24m

Tenant Header - How it will be

4m

Add Jwt Authentication into Dependency Injection part 1

58m
Section 8: Open Api Configuration8 videos

Swagger Settings

5m

Swagger Header Attribute Processor

24m

Use Open Api Documentation middleware

10m

Swagger Global Auth Processor

31m

Default config cleanup

14m

Add Open Api Documentation into Dependency Injection

54m

Authorize Attribute

21m

API Testing - POST Authorize Attribute

14m
Section 9: FluentValidation, MediatR libraries, CQRS and Authentication Endpoints13 videos

Packages Installation

9m

MediatR and FluentValidation into Dependency Injection

11m

Get Refresh Token Query

8m

Get Token Query

21m

Base Api Controller

12m

Refresh Token endpoint

11m

Refresh token permission inclusion

23m

Login Endpoint - Get Token

21m

Login Endpoint - Testing

28m

Protected Endpoint Access testing

5m

Error Handling Middleware

23m

Error Handling Middleware - Testing

17m

Error handling middleware code fix

30m
Section 10: Tenant Management22 videos

Tenant request and response models

10m

Tenants Service - Definition

7m

Create Tenant Command

10m

Activate Tenant Command

8m

Deactivate Tenant Command

6m

Update Tenant Subscription Command

17m

Get Tenant By Id Query

13m

Get Tenants Query

12m

Create Tenant Endpoint

11m

Tenants Endpoints - All

11m

Tenant Service Implementation - Dependencies

18m

Activate implementation

9m

Deactivate and Get Tenant By Id implementations

21m

Get Tenants and Update Subscription implementations

12m

Create Tenant implementation

30m

Tenant service into Dependency Injection

9m

Create Tenant Testing - Shared database

18m

New Tenant User Access testing

9m

New Tenant Role Claims testing

22m

Seeding Tenant Admin user with specified values

18m

Tenant Dedicated database testing

26m

Tenant User testing

13m
Section 11: School Entity Management17 videos

School Request and Response models

10m

School Service Definition

6m

School Service implementation - Complete

22m

Delete School Command

13m

Update School Command

20m

Create School Command

19m

Get School By Id Query

12m

Get School By Name Query

8m

Get Schools Query

17m

FluentValidation preparation

4m

Create School Command Validator

11m

Create School Request Validator

23m

Update School Command Validator

6m

Update School Request Validator

23m

Create School Endpoint

13m

Update and delete school endpoints

19m

School GET endpoints

19m
Section 12: MediatR Pipeline behaviour4 videos

Validation Pipeline Behavior part 1

21m

Validation Pipeline Behavior - How it works (testing)

28m

Validation Pipeline Behavior - How it Should works (testing)

27m

Validation Pipeline Behavior part 2

1h 3m
Section 13: Identity Subsystem46 videos

Role models

14m

Update Role Permissions Request model

6m

Role Service interface definition

20m

Role Service Implementation - Dependencies

17m

Create Role and IdentityResult Error Descriptions Helper implementations

34m

Delete role implementation - Not default roles

25m

Delete role implementation - Not currently assigned role

22m

Get role By Id implementation

11m

Does role exists and Get all roles implementations

16m

Get role with Permissions implementation

30m

Update Role Permissions implementation - Not Admin role

16m

Update role implementation

21m

Update Role Permissions - Tenants permissions are removed for non root tenant

22m

Role Service into Dependency Injection

6m

Create Role Command

15m

More Role commands

13m

Update Role Permissions implementation - Drop and Lift

1h 1m

User request models

15m

Role queries

19m

User Role Request models

5m

Current User Service definition

10m

User response models

8m

User Service definition

18m

User Service implementation - Dependencies

16m

Assign Roles implementation - at least two admin users for each tenant

20m

Assign Roles implementation - not admin for root tenant

31m

Activate Or Deactivate implementation

34m

Assign Roles implementation - actual assignment

21m

Change User Password implementation

17m

Delete user implementation

10m

Get all users and by id implementations

13m

Create User implementation

32m

IsEmailTaken and IsPermissionAssigned implementations

16m

Get User Permissions implementation

40m

Get User Roles implementation

21m

Update User implementation

22m

Create User Command

13m

Current User Middleware

17m

Current User Service implementation

28m

User commands

24m

User Queries

10m

Get User By Id Query

11m

Register User endpoint

11m

User endpoints

17m

Final code cleanup

11m

Final Testing

9m