A SOLID validation class

by Alex Siepman 5. January 2014 09:33
When business objects needs to be stored in the database, they need to be validated. Creating a validation class make it easy to maintain en unit test the validations. Also implications are made easier. [More]


Generics | LINQ | SOLID

ID - Sequential Guid (COMB) Vs. Int Identity, using Entity Framework

by Alex Siepman 28. October 2013 16:03
What shoud I use for a Id in a SQL server database when using Entity Framework. Sequentional Guid (COMB) or an Int Identity? [More]


LazyList<T>: A better LINQ-result-cache than List<T>

by Alex Siepman 9. October 2013 20:17
Caching LINQ results with ToList() has some disadvantages. Not using caching can have disadvantages to. There is a smart solution that does not cache more than needed. [More]

Except, intersect and union without distinct

by Alex Siepman 19. August 2013 19:22
Except, Intersect and Union are doing a distict as thy are a set operation. This blog will help you if you don't want a distict. [More]

A generic tree of nodes, the easy way!

by Alex Siepman 30. July 2013 16:28
An easy way to ceate a tree and query the nodes of the tree. [More]

Mapping without the switch command

by Alex Siepman 21. July 2013 16:57
If you need to map codes or values, don't use the switch statement. An extension method makes it much easier. [More]

Any, Single, Multiple and Count

by Alex Siepman 26. May 2012 17:20
.Any() is much more effecient than .Count() > 0. Other methods like .IsSingle() or .IsMultiple() are also much more efficient than .Count() == 1 or .Count() > 1. [More]

Enum to dictionary

by Alex Siepman 14. April 2012 10:30
Convert an enum to a enum-string dictionary with text including spaces. [More]

Convert to unknown generic type: ChangeType<T>

by Alex Siepman 6. March 2012 21:15
The ChangeType method changes "any" type to T. This is handy if you need to convert something to T in a generic method. [More]



About the author

I am a software architect at Roxit and also a C# Developer. My main interests in the area of ​​C# are LINQ and generics

Visit my personal homepage (Dutch) for more info about me.

Month List

Page List