C#

Dependency Inversion Principle (DIP) – S.O.L.I.D. Framework

The fifth and final principle within the S.O.L.I.D. Framework is the Dependency Inversion Principle. The main statement of this principle is “Entities must depend on abstractions not on concretions. It states that the high level module must not depend on the low level module, but they should depend on abstractions”. On the first sight this may sounds useless, …

Dependency Inversion Principle (DIP) – S.O.L.I.D. Framework Read More »

Interface Segregation Principle (ISP) – S.O.L.I.D. Framework

The fourth principle of the S.O.L.I.D. Framework is the Interface Segregation Principle (ISP) . The main statement of this principle is “clients should not be forced to implement interfaces they don’t use“. This basically means that any software developer should use very short and small interfaces instead of one big ones. In the following example I demonstrate the …

Interface Segregation Principle (ISP) – S.O.L.I.D. Framework Read More »

Liskov’s Substitution Principle (LSP) – S.O.L.I.D. Framework

The third principle of the S.O.L.I.D. Framework is the Liskov’s Substitution Principle (LSP). The main statement of this principle is “derived types must be completely substitutable for their base types“. What does that means? Well, basically that every parent class should be replaceable by one of its derived child classes without any problems. Imagine we have …

Liskov’s Substitution Principle (LSP) – S.O.L.I.D. Framework Read More »

Open Closed Principle (OCP) – S.O.L.I.D. Framework

The second principle of the S.O.L.I.D. Framework is the Open Closed Principle (OCP). At the very first moment the combination of open and closed at the same time creates some confusion, but after we dig deeper it makes sense. The main statement of this principle is “A software module is open for extension and closed for modification“. So, …

Open Closed Principle (OCP) – S.O.L.I.D. Framework Read More »

Single Responsibility Principle (SRP) – S.O.L.I.D. Framework

The S.O.L.I.D. Framework and its principles are an approach to deal with the most software design issues. Robert C. Martin, or better known as Uncle Bob in the industry, created those principles in the 1990’s. In this and the next blog posts I am covering every single principle in its own dedicated post, starting with the …

Single Responsibility Principle (SRP) – S.O.L.I.D. Framework Read More »

Using The Entity Framework In Visual Studio With C#

Using the Entity Framework in Visual Studio facilitates the handling with database objects tremendously. It’s possible to access, create, update and delete database records without using dedicated sql queries and keys. Further informations can be found on MSDN and on Wikipedia. 1. Creating a Project For this demo purpose I create a very basic C# console application.   …

Using The Entity Framework In Visual Studio With C# Read More »

How To Get The Target Entity In Microsoft CRM Plugins With C#

Typically you want to use the target entity in Microsoft CRM plugins to validate, calculate and/or manipulate values. By the time you register a plugin step you have to set the primary entity, which later will be your target entity. In your plugin code, where you implement the implementation of IPlugin, which needs a Execute method with …

How To Get The Target Entity In Microsoft CRM Plugins With C# Read More »

Copy Marketing Lists in Microsoft CRM With C#

There is a pretty neat method to copy marketing lists in Microsoft CRM without retrieving every member and adding to the new list. All you have to do is creating a CopyMembersListRequest and set the two required properties SourceListId with the old list Id and the TargetListId with the new list id.  And of course, the new list …

Copy Marketing Lists in Microsoft CRM With C# Read More »