Skip to content

C#

To Safe Dictionary

.ToSafeDictionary() extension method in csharp

The .ToDictionary() extension will throw an argument exception if we have duplicate keys added to the dictionary.

Read More ».ToSafeDictionary() extension method in csharp
sequence numbers in linq

Generating Sequence Numbers In LINQ Query

In this post, we’ll see how to generate sequence numbers along with the data that we need in LINQ C#.

Read More »Generating Sequence Numbers In LINQ Query
callback functions in c#

Delegates as callback functions in csharp

To update many records in entity framework, it is good to use the .Attach method of the db context instead of looping through every record and fetching the data through EF and updating it.

Read More »Delegates as callback functions in csharp
strategy design pattern

The strategy design pattern with an example

A strategy design pattern is the most commonly used design pattern in computer programming.

In this post, we’ll start with a basic switch case statement and then we’ll modify the code into strategy design pattern.

Read More »The strategy design pattern with an example
notranslated

why func delegate is not translated to sql

This post is a sequence for the previous article which shows why the Func delegate is not translated into the SQL statements.

Read More »why func delegate is not translated to sql