State management is a critical aspect of building Blazor applications, as it determines how data is stored, updated, and shared across components. Unlike JavaScript frameworks such as React and Angular, Blazor leverages C# for managing state, offering several built-in and advanced strategies. This article explores state management approaches in Blazor, covering built-in options and external […]
Understanding obj == null vs obj is null in C# and Their Performance Impact
When working with null checks in C#, developers often use one of the following approaches: Both methods check if an object reference is null, but there are important differences between them, especially regarding operator overloading, reliability, and performance. In this article, we will explore these differences and analyze their performance impact. 1. The Equality Operator […]
500x Faster: Avoid Queries in Loops with C# Entity Framework for Peak Performance
Executing database queries inside a loop is a common mistake that leads to significant performance issues, mainly in high-scale systems. Each iteration of the loop triggers a separate database query, resulting in: For example, consider the following code in C# utilizing Entity Framework Core: This approach executes one query for each user ID in the […]
Custom DateTimeJsonConverter in .NET for Enhanced JSON Serialization
When working with JSON serialization in .NET, one of the common challenges developers face is formatting DateTime and DateTimeOffset properties. By default, the .NET JsonSerializer doesn’t provide a built-in way to specify custom formats for individual properties. This limitation can lead to workarounds that are cumbersome and error-prone, such as applying global settings or manual […]
Enum Keys Revolution: A Smarter Way to Manage Static Entities in Your Application
Imagine managing a database with countless static entities like status codes or user roles, where every change or lookup feels cumbersome and prone to errors. Traditional approaches using int or short primary keys can make the codebase harder to read and maintain, leading to inefficiencies and potential mistakes. But what if there were a simpler, […]
Artificial intelligence and speedy trial in the judiciary: Myth, reality or need? A case study in the Brazilian Supreme Court (STF)
Justice has dealt with procedural delays for decades, contributing to the rise of Artificial Intelligence (AI) to face the problem. Therefore, it is essential to understand and analyze the implications of AI on speedy trial and how AI can accelerate judicial processes. To this end, we conducted a case study at the Supreme Court of Brazil (STF), collecting documents and […]
How and where is artificial intelligence in the public sector going? A literature review and research agenda
To obtain benefits in the provision of public services, managers of public organizations have considerably increased the adoption of artificial intelligence (AI) systems. However, research on AI is still scarce, and the advance of this technology in the public sector, as well as the applications and results of this strategy, need to be systematized. With […]