Message Brokers like RabbitMQ are the most common solution for decouple the communication between two different application and add an intermediary between them. With this solution there are many benefits, like asynchronous communication, indipendent protocols between the applications, definition of rules for routing messages and in case of RabbitMQ an efficient protocol like AMQP to... Continue Reading →
Deleting related entities with entity framework
Entity framework has some features and peculiarities that are useful in a lot of situations and with they can help us to do some operations in very smart and efficient mode. Anyway in some circumstances it could surprise us with some very strange side effects or behaviors that may we don't know; we can meet... Continue Reading →
Managing SSH connections with C# Part 2
As discussed in the previous post, disposing an SSH connection is very important to free the port and leave it usable to the next connection. Unfortunately, implementing the connector as disposable is not enought, because if the application crash or stop unexpectedly, the dispose method will no be called and the port will remain busy... Continue Reading →
Managing SSH connections with C#
A new business requirement discussed recently was to connect and retrieve some data from a database hosted in an external network. Deep in dive on the preconditions I discover that the only way to connect to the database was to establish an SSH connection, so I started to ask about the parameters to be used... Continue Reading →
Migrate csproj file from VS 2015 to VS 2017 and .NET SDK
With the release of Visual Studio 2017 and the introduction of .NET Core, Microsoft has implemented a new version of csproj files, simplier, lighter and easier to mantain and modify. The new version has nothing in common with the older and if we want to migrate the older Visual Studio 2015 projects to the newer... Continue Reading →
Creating and publishing a NuGet package
The argument of this topic is how we can generate a NuGet package from a .NET project and what are the main options that we can specify from the console command. Writing and organizing our code and applications in separated modules is very important, will help us to reuse the code, to optimize the applications... Continue Reading →
Fluent interfaces in C#
The topic of the contracts definition and how the programmer can do it in the safest way and guarantee that who will use the contract will do that in the right way is a common and complex argument. In the development phase the preconditions are fundamentals to check that the parameters allowed in our contract... Continue Reading →
Generic object factory for classes with non public constructor in C#
In this post I want to talk about a common need that we could have in an applications, that is an object factory. Of course, we could have different requirements about the implementation of it, but the most widespread is a generic factory like this: This is a very simple implementation, but with the new... Continue Reading →