Building Scalable Cloud Solutions Insights, tutorials and Code Samples

Using Dapper for Data Access and Repository Pattern 2

Using Dapper for Data Access and Repository Pattern

Introduction In this article, we will explore how the Contact Management Application integrates Dapper for efficient data access. Dapper is a micro-ORM (Object-Relational Mapper) that excels in performance by directly interacting with SQL. We...

Handling Authorization and Role-Based Access Control (RBAC) 5

Handling Authorization and Role-Based Access Control (RBAC)

Introduction Role-Based Access Control (RBAC) ensures that users only perform actions they are authorized to. In the Contact Management Application, a robust RBAC system enforces permissions like Contacts.Create, Contacts.Update, and Contacts.Delete using dynamic policies and custom attributes. This...

Validating Inputs with FluentValidation 9

Validating Inputs with FluentValidation

Introduction In this article, we will explore how to implement input validation in the Contact Management Application using FluentValidation. FluentValidation is a robust .NET library that facilitates the creation of flexible and extensible validation...

Dependency Injection Setup Across Layers 5

Dependency Injection Setup Across Layers

Introduction Dependency Injection (DI) is a key aspect of Clean Architecture, ensuring decoupling between layers while enabling seamless communication. In the Contact Management Application, the DI setup is structured into API, Application, and Infrastructure layers, with each layer...

Error Handling and Exception Management in the API 7

Error Handling and Exception Management in the API

Introduction In any well-architected API, managing errors effectively is critical for ensuring stability, security, and ease of use. In the Contact Management Application, we follow clean architecture principles to implement structured error handling, ensuring...

Implementing Activity Logging with Custom Attributes 8

Implementing Activity Logging with Custom Attributes

Introduction In any enterprise-level application, logging user actions is essential for both auditing and security purposes. The Contact Management Application leverages middleware and a custom ActivityLogAttribute to implement detailed activity logging. This approach ensures...

Best Practices for Creating and Using DTOs in the API 5

Best Practices for Creating and Using DTOs in the API

Introduction In clean architecture, Data Transfer Objects (DTOs) play a vital role in decoupling the domain model from the external presentation layer, providing a clean and manageable way of interacting with external systems like...

Seeding Initial Data MS SQL 5

Seeding Initial Data Using Docker Compose and SQL Scripts

Introduction When developing an API, there are situations where it is important to populate the database with initial or sample data for testing and development purposes. In this article, we will discuss how to...

Subscribe