Posts

Showing posts from August, 2025

Tips & Tricks for Working with Dapper in .NET Core

Tips & Tricks for Working with Dapper in .NET Core Dapper is a lightweight ORM that is simple and efficient, but like any tool, there are advanced features and best practices to ensure you use it effectively. This article explores some of Dapper's advanced features and common pitfalls developers should be aware of.   Advanced Features in Dapper MultiMapping Dapper allows you to map multiple result sets to multiple objects with its MultiMapping feature. This is particularly useful when working with joins or complex queries where you need to map different tables to different classes. Example: var sql = @"     SELECT         e.Id, e.Name, e.Email,         d.Id AS DepartmentId, d.Name AS DepartmentName     FROM Employees e     INNER JOIN Departments d ON e.DepartmentId = d.Id";   using (var connection = new SqlC...

Configure vs ConfigureServices in .NET Core – What’s the Difference?

ConfigureServices vs Configure in ASP.NET Core ConfigureServices vs Configure in ASP.NET Core When you're building an application with ASP.NET Core , you’ve likely seen two key methods in the Startup.cs file: ConfigureServices and Configure . Both are crucial for setting up your application — but they serve very different purposes. In this post, we’ll break down what each method does, how they work together, and when to use which. ๐Ÿงฉ What is ConfigureServices ? Purpose: ConfigureServices(IServiceCollection services) is used to register application services and dependencies that will be injected wherever needed using Dependency Injection (DI). Common Use Cases: Registering controllers and MVC Setting up Entity Framework Core ( DbContext ) Adding Identity and Authentication Registering custom services, repositories Enabling Swagger, CORS, etc. Example: public void ConfigureServices(IServiceC...

Components and Modules in Angular – A Practical Quick Start

Components and Modules in Angular – A Practical Quick Start ๐Ÿ“ฆ Introduction Angular applications are built using two core building blocks: Components and Modules . Understanding how these pieces fit together is essential for creating scalable and maintainable apps. ๐Ÿ”น What is a Component? A Component is a TypeScript class decorated with @Component that tells Angular how to create and render the associated HTML. Each Angular app must have at least one component – the root component. ๐Ÿ“ฆ A Component Has: A TypeScript class (logic) An HTML template (view) An optional CSS file (styles) A selector (custom tag to insert it elsewhere) ✅ Example: A Simple UserCardComponent user-card.component.ts import { Component } from '@angular/core'; @Component({ selector: 'app-user-card', templateUrl: './user-card.component.html', styleUrls: ['./user-card.component.css...

๐Ÿ•‰️ Shirdi Sai Baba’s Arrival in Shirdi at the Age of 16

“He came not to preach, but to awaken.” Around the year 1854 , a young fakir stepped into the quiet village of Shirdi , carrying no possessions — only a presence that defied his age. He was just 16 , clad in a simple kafni, eyes calm, footsteps silent, and aura serene. To most, he appeared as just another wandering boy. But to the spiritually attuned, he radiated something unmistakably divine. He made his seat beneath a neem tree, withdrawing into deep meditation. Days passed. Weather shifted. The village went on — but he remained, still and silent. And in that silence was a subtle call. Those who passed by felt it: a gentle pull, a rare peace, a mysterious energy lingering in the air. ๐ŸŒฟ His Mysterious Early Days in Shirdi In those quiet, early years, the young saint lived in utter simplicity: He meditated beneath the neem tree, unmoved by heat, cold, or time. He observed a vow of silence, letting his presence speak volumes. He wander...