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-5ed8cd9596772572448513-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-5ed8cd9596fce445665390/] 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

July 2015 02
Data-driven test with xUnit
Posted By : Alexander Goida

In some cases it’s very challenging to recreate all data for some use case. It much easier to run the application, create some starting point: people, products, orders, prices, amounts, etc. and use such DB during tests. Automated tests

June 2015 28
Visual Studio must-have extensions
Posted By : Alexander Goida

My list of Visual Studio extensions which make developing easier and more comfortable. Tool Description ILSpy  Integrates the ILSpy decompiler into Visual Studio. ILSpy is the open-source .NET assembly browser and decompiler. Milti Language Spell Checker