.ToSafeDictionary() extension method in csharp

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

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.

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.

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.

Don't use Func delegate on the Entity Framework entities

In this post, I’ll show you what happens when you use a func delegate on the Entity Framework entities.

Building dynamic LINQ queries using Expression Trees and Func

Filtering an item from a list of items is easy but if the item to filter is not known at compile time then filtering a list will be little complicated.

Shortest word in a string with LINQ

In this post, we’ll try to find the shortest word in a string using LINQ.

Get only specific types from List in C#

This is a post to get the specific type of items from a mixed list of items. I have tried couple of solutions for the problem but it looks like there’s more elegant solution than my solution.

How c# compiler looks at switch case statements

Every developer writes a switch case statement at least once in their life of programming but as he/she understands the switch is no longer maintainable they tend to look for patterns and do refactoring.

In this post, we’ll see what’s actually inside of a switch case statement.

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#.

Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×