Development (37)


Not obvious issues in configuration of EF Code First

This post describes my own issues which I bumped into while setting up EF Code First. This is not a complete list of all possible issues and any input would be appreciated. Connection String In web project it may be not obvious why is database not created. The error message may tell about the null reference […]




MvcSiteMapProvider localization with Resources

The links to descriptions of the approach. It is strongly required to use App_GlobalResources and place resource files with localized strings in it.




Error: DbArithmeticExpression arguments must have a numeric common type.

From time to time you need to filter data by difference between two dates. For instance, you wanna take a difference between date from a record and Today.




Error: Unable to determine the principal end of an association between the types

You may get this error if you have entities related to itself. For example, you have a tree hierarchy.




Add or update URL query parameter in JavaScript

Add or update URL query parameter with respect to number of parameters and its position.




JavaScript string format

JavaScript has no built-in function to formatting strings, like C#  string.Format(). This function solves the issue adding missing functionality.




Drop All Objects in a SQL Server Database

Originally posted here: Paige C#: Drop All Objects in a SQL Server Database: Here is a script that I created that will drop all the objects in a SQL Server database. It was created using a lot of other scripts out on …




Why Apache does not start on Windows 7?

Recently I started developing website on WordPress. In order to set up a local web server with Apache/PHP I have downloaded XAMPP. At the same time I’ve experimented with .NET features which, probably, caused the issue – I could not launch Apache. It failed due to the port 80 was busy.




Post JSON objects with nested classes to MVC action

Default view model binding of ASP.NET MVC has a disadvantage when using view models with nested classes and JSON objects. The binding is unable to recognize such nested classes and it initializes them to NULL value. This text describes a cause and solutions.




Controlling application version number with NAnt and TeamCity

I’m pretty sure almost every developer has ever struggled on how to change version number in the different way than TeamCity provides that by default. In my case I wanted to get date-based version number to clearly represent a sprint in which the build was created.