8 NDepend Rules to Enforce Domain-Driven Design in .NET
Eight NDepend CQLinq rules automate Domain-Driven Design enforcement in .NET, protecting architectural boundaries, entities, and aggregate roots.
Blog · Topic
19 articles tagged .NET.
Eight NDepend CQLinq rules automate Domain-Driven Design enforcement in .NET, protecting architectural boundaries, entities, and aggregate roots.
Reliable resource management in C# depends on IDisposable. Implementing it correctly cleans up unmanaged resources like file handles and connections, and prevents leaks.
C# 14 adds null-conditional assignment, a feature that safely assigns values to properties or indexers without long chains of if statements.
C# 14 lets types define their own compound assignment operators, avoiding unnecessary object creation. The feature is explained along with the pitfalls to avoid.
Security-sensitive code needs true randomness. Here, .NET's RandomNumberGenerator class is used to produce cryptographically secure random values instead of Random.
Mapster is a high-performance object mapping library for .NET. A beginner-friendly introduction highlights the key features behind efficient data mapping in C#.
Extension methods let C# developers add functionality to existing classes, even sealed third-party ones, without resorting to inheritance or wrapper classes.
NLog can ship .NET application logs straight to AWS CloudWatch. This guide covers installation, CloudWatch configuration, and settings for better performance.
Serilog can write .NET application logs to AWS CloudWatch. Setup, CloudWatch integration, and log settings for better performance are covered in detail.
The AWS SDK can send .NET application logs directly to CloudWatch. Log groups and streams are created, and log messages are sent programmatically, step by step.
Aspect-Oriented Programming improves modularity and readability in .NET. Autofac interceptors are set up and used to apply AOP principles in practice.
Three methods for converting strings into enums in C# are compared, with guidance on which approach best suits different performance and safety requirements.
Config.Net offers an interface-based way to manage settings in .NET and .NET Core applications with minimal boilerplate. A follow-up to the App.config article.
C# offers several ways to turn a DateTime into a string. Custom format specifiers give full control over the output, and each one is explained with examples.
A build error caused by the Mark of the Web can block Visual Studio projects. Several fixes are covered, from unblocking files to more obscure solutions.
A single line of code in a Nancy module enables CORS, allowing a REST API built with Nancy to be called from JavaScript hosted on other domains.
A July 2018 Windows update can break Sage CRM .NET pages with a "Class not registered" error. A small IIS authentication change resolves it.
Reflection lets a C# application load DLL assemblies at runtime, extract methods from them, and execute those methods without compile-time references.
Custom configuration sections let a .NET app read structured settings from its App.config file. The classes needed to define and read them are demonstrated.