How Kestrel Handles Http Requests

A Deep Dive into Asynchronous Request Handling in Kestrel: How It Powers Efficient Web Servers Introduction In the world of web development, performance is key—especially when dealing with high-concurrency scenarios. Kestrel, the default web server in ASP.NET Core, stands out for its asynchronous, non-blocking I/O model. Unlike traditional servers that dedicate a thread per connection (leading to resource exhaustion), Kestrel leverages .NET’s async/await pattern to manage thousands of requests efficiently. In this comprehensive guide, we’ll walk through the step-by-step process of how a request flows through Kestrel, from acceptance to response. We’ll cover the core mechanics, why it’s more efficient, and practical insights for developers. ...

January 8, 2026 · 4 min · 811 words · Kamran Sadin

Learn C# from Scratch: A Complete Course for Absolute Beginners

Ready to start your coding journey? If you’ve never programmed before, this C# course is tailor-made for you. Over about six weeks, with 2-3 sessions per week (1-2 hours each), you’ll transform from a total beginner to someone who can write simple, functional programs in C#. C# is a powerful, beginner-friendly language used in games, apps, and more. With plenty of examples and step-by-step guidance, this course will make coding fun and approachable. Let’s dive in! ...

April 12, 2025 · 12 min · 2441 words · Kamran Sadin

Introduction to C#

C# (pronounced “C sharp”) is a programming language developed by Microsoft as part of its .NET platform. It is powerful, versatile, and relatively easy to learn. The language draws inspiration from C and C++ while simplifying many of their complexities. Key Features of C# General-Purpose: C# is not limited to a specific domain; it can be used to build a wide range of applications, including: Desktop software Web applications (ASP.NET Core, Blazor) Mobile apps (Xamarin, MAUI) Games (Unity Engine) Cloud services and microservices Type-Safe: ...

March 10, 2025 · 2 min · 416 words · Kamran Sadin

Event Sourcing: Turning Your App into a Time Machine

Hey everyone! Kamran here, and today, let’s dive deeper into Event Sourcing, especially how we manage snapshots and materialized views. If you’ve ever felt like your database only tells you the “now” and not the “how,” you’re going to love this. Imagine your application’s memory as a time machine. Instead of just saving the final result, what if you recorded every single change, every action, as an “event”? That’s event sourcing in a nutshell. ...

March 3, 2025 · 6 min · 1251 words · Kamran Sadin

A Comprehensive Guide to Data Types in C#

Download PDF Version Data types in C# define the type of data that a variable can store. Understanding and using the correct data types are crucial for writing efficient and bug-free code. This guide will walk you through the basic and advanced data types in C#, providing examples to illustrate their usage. Table of Contents: Introduction to Data Types in C# What are Data Types? Importance of Choosing the Right Data Type Basic Data Types ...

November 17, 2023 · 9 min · 1718 words · Kamran Sadin

A Comprehensive Guide to Fields and Properties in C#

Download PDF Version Fields and properties are fundamental elements in C# that allow you to define and access data within classes and structures. This comprehensive guide will take you from the fundamentals of fields and properties to more advanced techniques, ensuring you have a deep understanding of these critical concepts in C#. Table of Contents: Introduction to Fields and Properties in C# What Are Fields and Properties? The Importance of Fields and Properties Understanding Fields ...

November 15, 2023 · 6 min · 1079 words · Kamran Sadin

A Comprehensive Guide to Loops in C#

Download PDF Version Loops are a fundamental programming construct that allows you to repeat a block of code multiple times. They are indispensable for automating repetitive tasks, processing collections, and controlling program flow. In this comprehensive guide, we will explore loops in C#, starting with the basics and progressing to more advanced loop techniques. Table of Contents: Introduction to Loops in C# What Are Loops? The Importance of Loops Basic Loop Structures ...

November 13, 2023 · 5 min · 1014 words · Kamran Sadin

A Complete Guide to Conditionals in C#

Download PDF Version Conditionals in C# are essential for controlling the flow of your program, making decisions, and executing code based on specific conditions. This comprehensive guide will take you from the fundamentals of conditionals to more advanced techniques, ensuring you have a solid understanding of this crucial aspect of C# programming. Table of Contents: Introduction to Conditionals in C# What are Conditionals? The Importance of Conditionals Basic Conditional Statements ...

November 9, 2023 · 6 min · 1196 words · Kamran Sadin

A Comprehensive Guide to Variables in C#

Download PDF Version Variables are the backbone of any programming language, and C# is no exception. They allow you to store and manage data, enabling your programs to perform tasks and make decisions. In this comprehensive guide, we will explore the world of variables in C#, covering everything from their basic definition to best practices and naming conventions. 1. What Are Variables? At its core, a variable is a container for data. In C#, a variable has a type, a name, and a value. Variables serve the purpose of storing and managing data within your programs. Let’s break down the key concepts: ...

November 7, 2023 · 6 min · 1177 words · Kamran Sadin

Advanced Usages of Events

In this post, we’ll explore more advanced concepts and techniques related to C# events. These advanced topics will help you become a proficient event handler and enable you to use events in complex scenarios. Custom Event Arguments While events typically use the built-in EventArgs class to convey event information, you can create custom event argument classes to pass additional data to event handlers. Custom event arguments allow you to provide specific context to subscribers. For example, in a file monitoring application, you might create a custom event argument class to include the file name and the type of file change. ...

November 3, 2023 · 5 min · 1020 words · Kamran Sadin