Performance comparison chart showing C# Native AOT vs standard Runtime. Native AOT achieves 11MB app size, 40MB memory usage, and 35ms startup time.

C# Native AOT: High Performance for Cloud-Native Architectures

C# Native AOT: Reaching Maximum Performance In the modern cloud landscape, where every millisecond and every megabyte counts toward your monthly bill, how we compile and deploy our code has become a strategic decision. As developers, we are used to the standard .NET execution model: code is compiled into Intermediate Language (IL) and then compiled into machine code at runtime by the Just-In-Time (JIT) compiler. While the JIT is incredibly fast and optimized, modern architectures-especially Serverless and Edge Computing-demand something even more efficient. ...

February 15, 2026 · 2 min · 402 words · Eduardo Potumati
A comparison table or code snippet demonstrating List vs IEnumerable in C#

List<T> or IEnumerable<T> in C#: Which one to choose?

That classic question: List<T> or IEnumerable<T> in C#? Straight to the point: IEnumerable<T>: when you only need forward iteration. It also works with deferred execution, the basis of LINQ and ideal for handling large amounts of data without loading everything into memory. ICollection<T>: in addition to iteration, it allows you to add, remove, and count items, but without index access. IList<T>: includes everything from ICollection<T>, plus index-based access and the ability to insert/remove at specific positions. List<T>: the concrete implementation of IList<T>, the class you usually use to instantiate a list. Why does this matter? Whenever possible, use the minimal required interface. Clear contracts reduce coupling and make your code more flexible and easier to maintain. ...

November 15, 2025 · 1 min · 125 words · Eduardo Potumati
A code snippet illustrating the usage of tuples in C# to return multiple values

Tuples in C#: Too simple or too complex?

Too simple to be a complex type, too complex to be a simple attribute. That’s what tuples in C# are. Perfect for returning multiple values from a method. No need to create a class (or even a record). Easy to read. Take a look at the image post and see how to use it. Do you use tuples, or do you prefer DTOs/records? 👉 Adapted from my original post on LinkedIn . ...

July 20, 2025 · 1 min · 72 words · Eduardo Potumati
A code snippet illustrating the syntax for BULK INSERT in SQL Server

How to Insert Millions of Records into SQL Server

If you’re trying to insert millions of rows using INSERT in a loop, you’re doing it wrong. A few days ago, I was asked about it. It’s funny how a tool you use usually can slip our mind. Anyway, BULK INSERT is one of the most efficient ways to load large datasets into SQL Server. It can increase the insertion speed by up to 10x to 50x, which means that it can significantly reduce the time required for the operation. ...

April 10, 2025 · 3 min · 468 words · Eduardo Potumati
An example showing implicit operator conversions in C# with potential pitfalls

Implicit Operators in C#: Convenience vs. Clarity

In C#, implicit operators enable automatic type conversions without the need for explicit casting. This functionality not only enhances code readability but also boosts development agility while safeguarding against runtime conversion exceptions. However, be careful. While implicit conversions offer convenience, excessive usage can potentially compromise code clarity. It’s essential to tread carefully as an overreliance on implicit conversions may obscure the precise moments and locations where conversions occur. 👉 Adapted from my original post on LinkedIn . ...

March 22, 2025 · 1 min · 77 words · Eduardo Potumati
A visualization illustrating how Split Queries solve Cartesian Explosion in EF Core

Split Queries in EF Core: Mitigating Cartesian Explosion

Have you worked with Split Queries in EF Core before? When you incorporate related tables using EF Core, it typically generates a JOIN query, potentially leading to duplicated data. While this duplication is usually insignificant for small datasets, it can become problematic when dealing with larger volumes. When multiple collections are included, SQL JOINs multiply rows exponentially, not linearly. 1 2 3 4 var posts = context.Posts .Include(p => p.Comments) .Include(p => p.Tags) .ToList(); Imagine a scenario where you have a table with 1000 posts and each post has 1000 comments. If you use the query below, you will get 1000 * 1000 = 1,000,000 rows in the result. This phenomenon is known as Cartesian Explosion, causing unexpected spikes in data loads. ...

February 15, 2025 · 2 min · 350 words · Eduardo Potumati
A diagram or code snippet illustrating the Dependency Inversion Principle

Dependency Inversion (D) in SOLID: Why Is It So Important?

Dependency Inversion (D) in SOLID: Why Is It So Important? The Dependency Inversion Principle (D) reminds us that “high-level modules should not depend on low-level modules; both should depend on abstractions.” This means clients (code consuming functionalities) should rely on interfaces or abstractions, not concrete implementations. This practice reduces coupling, simplifies changes, and makes code more testable. For example, instead of directly coupling a notification service to a concrete class like EmailSender, use an interface such as IEmailSender. This allows you to easily swap implementations (e.g., SMTPClient, API service, message queue, etc) without modifying the client. ...

December 15, 2024 · 1 min · 124 words · Eduardo Potumati
A code comparison showing a foreach loop converted into a LINQ expression

Convert a foreach Loop to LINQ

Convert a foreach loop to LINQ LINQ transforms a query into a first-class language construct in C#. It can reduce the amount of code, enhance readability, and enable similar query expression patterns across different data sources. 👉 Adapted from my original post on LinkedIn .

November 15, 2024 · 1 min · 45 words · Eduardo Potumati
Code snippet demonstrating how to compare two numbers using Math.Abs in C#

Comparing Numbers with Tolerance in C#

Comparing Numbers with Tolerance in C# Sometimes, when comparing two numbers in C#, you may want to allow for a tolerance or interval in the comparison. Instead of manually adding, subtracting, and comparing the values, you can use Math.Abs on the difference between the two numbers to check if the result falls within your acceptable range. 👉 Adapted from my original post on LinkedIn .

September 15, 2024 · 1 min · 65 words · Eduardo Potumati
Code snippet illustrating data transfer between controllers using TempData

TempData in ASP.NET Core: Transferring Data Between Controllers

TempData - Transfer data between controllers Ideal for transferring small amounts of data between controllers in ASP.NET MVC. Unlike ViewData and ViewBag, which are specific to a single view, TempData persists for one request cycle. This means the data remains available until it’s accessed, at which point it’s automatically removed. 👉 Adapted from my original post on LinkedIn .

August 15, 2024 · 1 min · 59 words · Eduardo Potumati