#dotnet
55 articles tagged with #dotnet
What is event sourcing? - Part 7
Event sourcing with fund reference data: event streams, appending with expected version, projections, rebuilding views from scratch and the trade-offs.
What is event-driven architecture? - Part 6
Event-driven architecture with a mutual fund data pipeline in .NET: event contracts, publishing, subscription filters, consumers and the trade-offs.
How do messages flow from producer to consumer? - Part 4
How messages flow from producer to consumer: channel adapters, claim check, routers, dispatchers, polling and competing consumers, and ordering.
What are messages, commands and events? - Part 3
Messages, envelopes, commands and events, producers and consumers, channels, queues, topics, brokers and buses, explained with a postal-service model.
How to unit test Entity Framework Core?
Unit test code that uses Entity Framework Core with test doubles for DbContext and DbSet, so the tests stay fast and focused on the system under test.
Secure coding basics - OWASP Top 10 (2017) for .NET developers
OWASP Top 10 2017 risks are translated into practical .NET safeguards for injection, authentication, access control, XSS, deserialization, dependencies and logging.
Resilient HTTP calls with Polly - retry, timeout and circuit breaker
Polly 5.x adds retry, timeout and circuit breaker policies around HTTP calls, with guidance on composition, transient failures, idempotency and safe handling of writes.
Structured logging with Serilog - why plain text logs are not enough
Structured logging with Serilog replaces ambiguous text with searchable properties, consistent message templates, correlation context and safer ASP.NET Core operations.
How to share code with .NET Standard 2.0 libraries?
.NET Standard 2.0 libraries allow shared business rules across applications, and this guide covers project setup, API compatibility, package versioning and practical testing.
How to upgrade from .NET Core 1.x to 2.0?
This guide upgrades an application from .NET Core 1.x to 2.0, covering project files, package changes, tooling, API updates and a controlled path to ASP.NET Core 2.0.
How to test ASP.NET Core Web API with in-memory TestServer?
This guide tests an ASP.NET Core Web API with an in-memory TestServer, covering host setup, HTTP requests, dependency boundaries and fast feedback without a deployed service.
Integration tests vs unit tests - where to draw the line
Unit and integration tests serve different boundaries, feedback loops and maintenance costs, with practical guidance for choosing test types and organising a .NET solution.
Remove dead code - why and how to find it safely
Dead code increases cognitive load and deployment risk, so this guide explains how to find candidates, confirm they are unused and remove them safely with history as a backup.
Avoid sequential coupling and circular dependencies - with examples
Sequential coupling and circular dependencies create hidden constraints, so constructor injection, builders, interfaces and events make code easier to test, change and evolve.
Event Sourcing - storing the history, not just the state
Event Sourcing explained through state versus event history, commands, aggregates, append-only stores, projections, snapshots and versioned events for practical guidance.
Static code analysis with StyleCop, FxCop and ReSharper
Static code analysis explained through StyleCop, FxCop, ReSharper, rule sets, IDE checks, local builds, CI integration and gradual warning reduction.
Twelve-Factor App - what it means for .NET teams
The Twelve-Factor App principles interpreted for .NET teams through codebases, configuration, backing services, processes, logs, deployments and Azure operations for practical guidance.
How to use Azure DocumentDB from .NET?
Azure DocumentDB explained through collections, partition keys, Request Units, consistency levels and .NET operations for creating, querying and updating documents.
How to set up Azure Application Insights for an ASP.NET application?
Azure Application Insights explained through server and browser telemetry, custom events, dependencies, alerts, availability tests and ASP.NET application monitoring.
Semantic versioning for NuGet packages and APIs
Semantic versioning explained through major, minor and patch changes, pre-release labels, package compatibility, API versions and communication with consumers for practical guidance.
How to create your first Azure Function?
Creating an Azure Function explained through preview-era triggers, bindings, hosting plans, timer and HTTP functions, deployment and retry-safe execution for practical guidance.
Feature toggles - shipping unfinished code safely
Feature toggles explained through release control, toggle types, configuration, rollout, cleanup and practices for shipping unfinished code without accumulating debt.
How to build a Docker image for an ASP.NET Core application?
Building a Docker image for ASP.NET Core explained through Dockerfiles, SDK and runtime images, build commands, containers, configuration and deployment practices.
Logging best practices - what to log, what not to log
Logging best practices explained through operational value, useful fields, sensitive data, correlation, structured logging, retention and practical logging pipelines for practical guidance.
Microservices - Part 2
Microservices Part 2 compares synchronous HTTP and asynchronous messaging through timeouts, retries, Service Bus, duplicate handling and eventual consistency for practical guidance.
How to migrate an ASP.NET MVC 5 app to ASP.NET Core 1.0?
Migrating an ASP.NET MVC 5 application to ASP.NET Core 1.0 explained through project structure, middleware, dependency injection, configuration, routing and migration risks.
How to write maintainable LINQ and Entity Framework queries?
Maintainable LINQ and Entity Framework queries explained through in-memory filtering, N+1 queries, projection, tracking and practices for readable query code.
Microservices - Part 1
Microservices Part 1 explains Conway's Law, modular monoliths, service ownership, distributed data, deployment independence and the hidden costs of service boundaries.
How we simplified one of the complex filter pages with Azure Search?
An Azure Search case study showing how a complex filter page moved from dynamic SQL and slow queries to a derived search index and faster filtering.
Defensive coding - guard clauses and null checks without the noise
Defensive coding explained through guard clauses, boundary validation, specific exceptions, null checks, empty collections and clearer .NET application logic for practical guidance.
What is a Test Double - stub vs mock vs fake
Test doubles explained through dummy, stub, spy, mock and fake objects, with practical examples showing when stubs, mocks and fakes are appropriate.
Unit Test Best Practices - FIRST properties
FIRST properties explained through fast, independent, repeatable, self-validating and timely unit tests, with practical guidance for keeping a test suite healthy.
Getting started with Docker - Part 1
Getting started with Docker through images, containers, Docker Toolbox, Docker Machine, host addresses, and basic Docker 1.x commands for practical first steps.
How to set up continuous integration with Visual Studio Online?
Continuous integration with Visual Studio Online explained through vNext builds, package restoration, compilation, tests, and publishing validated artifacts for reliable delivery.
How to document ASP.NET Web API with Swagger?
Documenting ASP.NET Web API 2 with Swagger and Swashbuckle, XML comments, response contracts, and Swagger UI for an explicit API contract.
How to send and receive messages with Azure Service Bus queues?
Azure Service Bus queues explained through asynchronous work, queue creation, BrokeredMessage handling, workers, completion, and dead-letter messages for reliable background work.
How to store files in Azure Blob Storage from ASP.NET?
Storing files in Azure Blob Storage from ASP.NET, including containers, validation, uploads, private file serving, and separating file metadata.
How to deploy an ASP.NET MVC application to Azure App Service?
Deploying an ASP.NET MVC 5 application to Azure App Service, from creating the web app and publishing with Visual Studio through validation and configuration.
Async and await in C# - common mistakes
Async and await explained for web applications, including I/O-bound work, async void, blocking calls, deadlocks, ConfigureAwait, fake async, and sequential awaits.
How to do TDD (Test-Driven Development)?
Test-Driven Development explained through the Red-Green-Refactor cycle and a step-by-step fund-universe example built with tests first for practical development and design.
What is CQRS - separating reads and writes, and when not to use it?
CQRS explained through commands, handlers, queries, read models, eventual consistency, and the situations where separating reads and writes is unnecessary.
Exception handling best practices in .NET
Exception handling practices for .NET, ASP.NET MVC, and Web API covering swallowed exceptions, stack traces, specific catches, and global error handling.
Monolith vs Microservices - should we start with microservices?
Monoliths and microservices compared through modular boundaries, extraction signals, scaling, team ownership, distributed failure, and practical starting criteria for growing teams.
Code review checklist for .NET teams
A practical .NET code review checklist covering design, readability, correctness, errors, security, performance, testing, operations, and constructive review comments and discussion.
What is RESTful API - resources, verbs and status codes?
RESTful API design explained through resources, HTTP verbs, safety, idempotence, Web API 2 controllers, and status codes using a news article example.
How to write unit tests with NUnit and Moq?
Unit testing with NUnit and Moq explained through FIRST properties, the AAA pattern, test doubles, test cases, exceptions, and verification of interactions.
What is a God object and how to break it?
God objects explained through their warning signs, causes, and a step-by-step refactoring approach using characterization tests, extraction, interfaces, and dependency injection.
Repository and Unit of Work patterns with Entity Framework - help or overhead?
Repository and Unit of Work patterns examined with Entity Framework 6, including generic repositories, focused interfaces, persistence leakage, and transaction boundaries.
Why we must not use magic numbers and hard-coding?
Magic numbers and hard-coded values explained with their maintenance and security risks, plus practical replacements using constants, enums, configuration, and read-only values.
Onion architecture vs N-Tier - which one to choose?
Onion architecture and N-Tier compared through dependency direction, project structure, domain boundaries, dependency injection, and criteria for choosing between them.
How to use Dependency Injection with an IoC container in ASP.NET MVC?
Dependency Injection and IoC containers explained through Unity and Autofac setup in ASP.NET MVC 5, including object lifetimes and practical container wiring.
SOLID Principles - Part 2
The remaining SOLID principles, Liskov Substitution, Interface Segregation and Dependency Inversion, explained with practical examples from a fund domain and practical guidance.
What is N-Tier architecture and where does it fail?
N-Tier architecture explained through layer responsibilities, logical boundaries, shared databases, pass-through layers, and failure modes that make maintenance difficult in practice.
SOLID Principles - Part 1
The first two SOLID principles, Single Responsibility and Open/Closed, explained with fund report and fee calculation examples in C#, plus when not to apply them.
Why we need Clean Code?
Why clean code matters, what makes code clean (meaningful names, small functions, guard clauses, comments that explain why) and how to bring the practice into your team.