Repository and Unit of work pattern in ASP.net core

Repository and Unit of work pattern in ASP.net core

A Repository is used to manage aggregate persistence and retrieval. The repository mediates between the data-access layer and the domain.The unit of work pattern keeps track of all changes to aggregates. Once all updates of the aggregates in a scope are completed, the tracked changes are played onto the database in a transaction

July 30, 2020 · (updated December 27, 2024) · 12 min · 2421 words · Pradeep Loganathan
Securing the  OAS/Swagger endpoint in dotnet using swashbuckle

Securing the OAS/Swagger endpoint in dotnet

OpenAPI 3.0 lets you describe how your APIs are protected using various security schemes and their security requirements.

June 25, 2020 · (updated November 5, 2025) · 4 min · 678 words · Pradeep Loganathan
Building a successful API - Understanding the Open api specification (OAS)

Building a successful API - Understanding the Open API Specification (OAS)

The Open API Specification is used to define the contract between the API consumers and the API providers. The specification is based on the JSON schema and is a standard format for describing the data exchanged between the API consumers and the API providers.

June 20, 2020 · (updated December 27, 2024) · 11 min · 2268 words · Pradeep Loganathan

Creating a Windows VM using Terraform

This post is a follow up on the Terraform 101 sessions for the Sunshine Coast dotnet user group. The slides and the code from the session are below. Slides Terraform 101 from Pradeep Loganathan Creating a Windows Virtual Machine provider "azurerm" { version = "=2.8.0" features {} } #create the resource group resource "azurerm_resource_group" "rg" { name = "ateam-resource-group" location = "australiaeast" } #create the virtual network resource "azurerm_virtual_network" "vnet1" { resource_group_name = azurerm_resource_group.rg.name location = "australiaeast" name = "dev" address_space = ["10.0.0.0/16"] } #create a subnet within the virtual network resource "azurerm_subnet" "subnet1" { resource_group_name = azurerm_resource_group.rg.name virtual_network_name = azurerm_virtual_network.vnet1.name name = "devsubnet" address_prefixes = ["10.0.0.0/24"] } ##create the network interface for the VM resource "azurerm_public_ip" "pub_ip" { name = "vmpubip" location = "australiaeast" resource_group_name = azurerm_resource_group.rg.name allocation_method = "Dynamic" } resource "azurerm_network_interface" "vmnic" { location = "australiaeast" resource_group_name = azurerm_resource_group.rg.name name = "vmnic1" ip_configuration { name = "vmnic1-ipconf" subnet_id = azurerm_subnet.subnet1.id private_ip_address_allocation = "Dynamic" public_ip_address_id = azurerm_public_ip.pub_ip.id } } ##end creating network interface for the VM ##create the actual VM resource "azurerm_windows_virtual_machine" "devvm" { name = "development-vm" location = "australiaeast" size = "Standard_A1_v2" admin_username = "pradeep" admin_password = "kq7UciQluJt%3dtj" resource_group_name = azurerm_resource_group.rg.name network_interface_ids = [azurerm_network_interface.vmnic.id] os_disk { caching = "ReadWrite" storage_account_type = "Standard_LRS" } source_image_reference { publisher = "MicrosoftWindowsServer" offer = "WindowsServer" sku = "2016-Datacenter" version = "latest" } } ##end creating VM The above code is not at all production ready and was used as part of a live coding exercise to use Terraform to create a Windows VM. The above code creates the VM password as plain text which is not ideal. The password can be generated and printed as an output if necessary. ...

May 18, 2020 · (updated December 21, 2024) · 2 min · 284 words · Pradeep Loganathan
Https in ASP.Net Core

Https in ASP.Net Core

In asp.net core https is enabled by default. The HttpsRedirection middleware class provides the necessary functionality to enforce redirection from http to https.

February 2, 2020 · (updated December 27, 2024) · 5 min · 1022 words · Pradeep Loganathan
Dependency injection in .Net Core Console application

Dependency injection in .Net Core Console application

Dependency injection enables an application to use a key design principle called Loose coupling. Loose coupling enables us to write highly maintainable

February 1, 2020 · (updated February 5, 2024) · 5 min · 859 words · Pradeep Loganathan
Git Branching strategies

Git Branching strategies

GIT branching strategies are conventions, or a set of rules, that describes when branches are created. Choosing the right branching strategy is key to empower development teams to collaborate effectively.

January 28, 2020 · (updated December 21, 2024) · 11 min · 2149 words · Pradeep Loganathan

DynamoDb - RUNNING locally using docker

DynamoDb from AWS is a major player in the cloud NoSQL database market. It can scale globally and is blazing fast when used appropriately. There are a bunch of reasons to use Dynamodb locally, the primary ones being development cost and integration testing. DynamoDB does not have a desktop install, however thankfully, AWS has created a Docker image to enable running DynamoDb locally. To run DynamoDb locally pull the docker image using the command ...

January 27, 2020 · (updated December 21, 2024) · 2 min · 347 words · Pradeep Loganathan
Configuration in a .Net Core Console application

Configuration in a .Net Core Console application

Adding configuration to a .Net core Console application to read configuration from a json file, or environmental variables or command line arguments.

December 20, 2019 · (updated December 27, 2024) · 3 min · 509 words · Pradeep Loganathan
What is HTTPS?

What is HTTPS?

HTTPS is a network protocol used to serve up web pages. HTTPS, or HTTP Secure, was designed to secure communications between a client and the HTTP server. It is a protocol that uses a secure connection to transfer data over the internet.

September 27, 2019 · (updated December 27, 2024) · 7 min · 1288 words · Pradeep Loganathan