July 2016 06
Shifty Responsibility of Repository Pattern
Posted By : Alexander Goida

During a lot of discussions about the Repository Pattern I noticed that people are separated into two camps. For the purposes of the article I call them abstractionists and concretists. The difference between them is whether the

May 2016 20
How to extract domain from URL
Posted By : Alexander Goida

You want to extract a domain from URL. The list of URLs to support might be as below. For this list you expect the domain [crayon-5e25f6d26b18c244264694-i/] : sub.domain.com/folder?p1=v1 www.sub.domain.com/folder?p1=v1 http://sub.domain.com/folder?p1=v1 https://sub.domain.com/folder?p1=v1 https://www.sub.domain.com/folder?p1=v1 For this list you expect

July 2015 22
How To: Refresh POCO entity from DbContext
Posted By : Alexander Goida

If you notice that the context returns the same entity even if it is already changed one line before, you probably what the following [crayon-5e25f6d26b90f361828000/] You can use it right after obtaining an entity with a statement like

July 2015 14
Executing SQL script with GO statement from C# code
Posted By : Alexander Goida

In the middle of a project you might want to automate DB restoring and upgrading  by means of existing SQL scripts which may contain GO-statements. If you are that person who is attempting to execute scripts at runtime with GO-statements, this