EF Core State Validation
A guide to implementing custom state validation for entities in EF Core using Data Annotations to catch errors before saving.
Ricardo Peres is a Portuguese software developer and Microsoft MVP, writing in-depth articles on .NET and general software development, open source, and research alongside his academic and industry work.
29 articles from this blog
A guide to implementing custom state validation for entities in EF Core using Data Annotations to catch errors before saving.
Explores advanced mapping techniques in EF Core 10, focusing on JSON column support and modern entity-value type relationships.
Explains a subtle ASP.NET Core API routing issue with the [Consumes] attribute and charset, and provides a workaround.
A developer's 2025 retrospective covering blog migration, PhD start, MVP status, and a breakdown of 50+ technical posts on .NET, ASP.NET Core, and EF Core.
Explores entity validation in .NET 10, covering the Data Annotations API, common attributes like Required and MinLength, and recent changes.
Explains the differences and usage of nullable and required types in C#, covering value types, reference types, and the nullable operator.
Explains techniques for implementing multitenant UI customization in ASP.NET Core, including tenant-specific views and conditional content.
Explores various tenant identification techniques for multitenant ASP.NET Core applications, including query strings, routes, and HTTP headers.
Explores three techniques for implementing multitenancy in EF Core applications, focusing on tenant isolation strategies and context configuration.
A guide to implementing API versioning in ASP.NET Core, covering setup, versioning strategies, and integration with Swagger.
A technical guide on retrieving geographic location and weather data from an IP address using C# and a free API service.
Explains how to implement and use health checks in ASP.NET Core applications to monitor system status and resource utilization.
Explains rate limiting strategies in ASP.NET Core, including fixed window, sliding window, token bucket, and concurrency limiters.
Explains service discovery in .NET 8, covering the built-in NuGet package, configuration, and integration with HttpClient.
Introduces ScannedIsolationHost for .NET's Isolator, enabling white/black list control over plugin assembly and type references.
Using Mono.Cecil to scan .NET assemblies for external method and type references, enabling code analysis and security checks.
Introducing ClientIsolationHost, a new component for the Isolator framework that enables executing sandboxed code plugins on remote machines over TCP/IP.
Explores advanced .NET string handling techniques like SearchValues<T> for performance and FormattableString for formatting.
Explains the three table inheritance patterns (TPH, TPT, TPC) now available in EF Core 7 for mapping object-oriented class hierarchies to relational databases.
Tips for improving performance in Entity Framework Core, covering compiled queries, lazy loading, and other optimizations for reads and writes.