Ali Hamza Ansari

Ali Hamza Ansari

Meet Ali, a talented .NET developer from Pakistan. Besides blogging, Ali works for a range of international customers doing everything from C# to Azure.

19 posts
Leveraging Tuples in C#: Real-World Use Cases

Well, using OOP in development is a blessing. We define classes to leverage inheritance and abstraction. We easily represent one object as a model. However, using and maintaining these classes can sometimes be tedious for the developers and the application’s memory. You might need to define separate classes or ...

Unlocking delegate's potential in C#

Working on event-driven applications can be challenging, where you need to write a large number of methods. Remembering those methods and deciding their usage for every requirement is tedious, especially when methods have different signatures. C# brings delegates to cope with this problem. Delegating is a powerful feature introduced solely ...

Understanding Complex Types in Entity Framework: A Complete Guide

Entity Framework Core (EF Core) is a handy tool for database operations in .NET applications. It is also so powerful that you will find everything you can do conventionally in SQL queries with easy LINQ methods. Today, we will explore an essential feature of Efcore that may help you organize ...

Comparing Records, Structs, and Classes in C#: When to Use What?

C# provides a few ways to define types—records, structures, and classes. Each has its own qualities and limitations. In this blog post, I will discuss each construct and help you identify which one to use in your project. What is a class in C#? A class defines reference types, ...

How to create custom controls in .NET MAUI

.NET MAUI is a powerful cross-platform mobile app framework by Microsoft. It is a reliable feature-enriched option for developers of all types of mobile applications. Its community toolkit, XAML-based designing, and modern C# coding support stand out from MAUI among its competitors. One key feature it provides is the creation ...

How to Monitor Your App's Performance with .NET Benchmarking

Benchmarking is essential in application development, especially if you aim to scale up your app. Benchmarking enables you to evaluate your application's resource consumption, which helps you identify potential updates to speed up performance. If not scaling, you will need the application performance to be optimal to enhance ...

How to bulk insert with EF Core

You may have encountered a situation where your application must insert massive amounts of data at once. Scenarios such as analytics applications, IoT monitoring systems, legacy systems, and data migration critically require bulk insertion of records. Sometimes, you must deal with thousands of records simultaneously, so inserting them will significantly ...

C# 13 Features: What's New and How to Use It

This article is featured on C# Advent Calendar 2024. Thank you Matt for putting this together year after year. C# has always been one of the most popular programming languages among developers. It continuously evolves to meet timed features and trends. Its robustness and flexibility make it an all-purpose language ...

Schedule Background Job using Quartz.NET

You may have encountered a situation where you must do some backend job without user intervention. For example, in an IOT application, your application needs to receive frequently published data from devices or send scheduler values to devices. .NET provides background job libraries for such tasks. I will discuss one ...