Return the most specific type, accept the most generic type

I guess most developers heard the guideline stating that, when designing methods, you should return the most specific type and accept the most generic one. Is it always applicable? Let’s try to look at it from different perspectives.

3 misuses of ?. operator in C# 6

I guess you already know about the safe navigation operator (?. operator) coming up in C# 6. While it’s a nice syntactic sugar for quite a few cases, I’d like to point out some misuses of it I’m sure we will see when C# 6 is released.

Combining SQL Server and MongoDB using NHibernate

We often think that relational and NoSQL databases are somewhat incompatible. But what if we could use both within a single domain model? I’d like to show how to combine SQL Server and MongoDB together and discuss what benefits we could get from it.

Validation logic and NHibernate event listeners

Today, I’d like to discuss a particular case with validating input data using NHibernate event listeners.

Types of CQRS

CQRS is a pretty defined concept. Often, people say that you either follow CQRS or not, meaning that it is some kind of a binary choice. In this article, I’d like to show that there is some wriggle room in this notion and how different types of CQRS can look like. Type 0: no CQRS With this type, you don’t have any CQRS whatsoever. That means you have a domain model and you use your domain classes for both serving commands and executing queries.

DTO vs Value Object vs POCO

In this article, I’d like to clarify the differences in DTO vs Value Object vs POCO where DTO stands for Data Transfer Object, and POCO is Plain Old CLR Object, also known as POJO in Java environment.

How we think

Did you think about how we think? How do we come up with a solution and how we decide whether it’s good or bad? It seems like a very interesting topic, so let’s dive in!

8 Resharper shortcuts everyone should know

If you use Resharper, you must have been using some (or maybe most) of its features already. But what I see a lot is that some really useful features are left unattended. I want to describe those lesser known yet very useful features that can help you in your day-to-day work.

Functional C#: Handling failures, input errors

The topic described in this article is a part of my Applying Functional Principles in C# Pluralsight course. In this article, I’m going to write about how to deal with failures and invalid input in a functional way. Functional C#: Immutability Functional C#: Primitive obsession Functional C#: Non-nullable reference types Functional C#: Handling failures and input errors Handling errors in C#: the common approach The concept of validation and error processing is well known, but the code required to handle it may become really annoying in languages like C#.

Functional C#: Non-nullable reference types

The topic described in this article is a part of my Applying Functional Principles in C# Pluralsight course. This is the third article in my Functional C# series. Functional C#: Immutability Functional C#: Primitive obsession Functional C#: Non-nullable reference types Functional C#: Handling failures and input errors C# non-nullable reference types: state of affairs Look at the code example below: