Functional C#

Functional C#
5 (100%) 1 vote

C# is a multi-paradigm programming language. Recently, the course has been set towards new functional constructions in C#. We can go further and add other extension methods that allow writing less code without ‘climbing’ in the F# territory.

Read More

Specification Design Pattern in C#

Specification Design Pattern in C#
2.5 (50%) 8 votes

In computer programming, the specification pattern is a particular software design pattern, whereby business rules can be recombined by chaining the business rules together using boolean logic. The pattern is frequently used in the context of domain-driven design.

In short, the main benefit of using “specifications” is a possibility to have all the rules for filtering domain model objects in one place, instead of a thousand of lambda expressions spread across an application.

Read More

Eliminating Duplication of Where Expressions in Application

Eliminating Duplication of Where Expressions in Application
1.5 (30%) 2 votes

Assume you have products and categories. A client says that it is necessary to use other business processes for the categories with the rating value higher than 50. You have a solid experience and you understand that tomorrow this value may be different – 127.37. As you want to avoid this situation, you write the code in the following way:

Read More