Using Phantom, a .NET build system written in C# and BOO

When starting a new project, build and deployment should be one of the first things to straighten out. There are many ways of doing this, but one really caught my eye lately and that is Phantom.

Continue reading →

How to delay input when using “autocomplete” searching

When using a autocomplete search on your site it can be wise do delay the search input being sent to the server. This is to avoid searches when the user is not really ready. For example, if a user wants to search for say, “shoes” you would like to wait until the user has typed the whole word and not do a search for every letter. Here is and example of how you can solve …

Continue reading →

How to use OutputCache for an MVC controller

If you have got pages with a lot of static content it would be wise to use OutputCaching to reduce the number of hits to the database. In MVC for example you can use the OutputCache attribute. Depending on what you are after you can use the attribute on single actions or on the entire controller (all the actions gets cached). The example code below sets the attribute on the entire controller, which means that …

Continue reading →

YouTrack meets YouTrackSharp

When it comes to issue tracking my personal favorite is YouTrack. If you would like to build some kind of roadmap or releases page you can use something that is called YouTrackSharp. With YouTrackSharp you can take advantage of the brilliant search capabilities in YouTrack to display issues, projects and so on.

Continue reading →

Autofac and MVC

I really like dependency injection, and Autofac is one of my favourite IoC containers. I used Autofac in a MVC project that I did lately. Start with installing the Autofac MVC package, open the package manager console and write the following.

Continue reading →

How to add security to all users in uCommerce

If you still run uCommerce in a version below 3.0 (the ability to turn of security foundation got introduced) and over 2.5 (this is when the security foundation got introduced), and you import a lot of products from your ERP system. You may have encountered they annoying fact that everytime a ProductCatalog gets added to uCommerce it does not show up in the backend for your user. This is because of the security foundation and …

Continue reading →

How to solve caching problem of css & js files with querystring

One thing that really bugs me sometimes is browser caching. Of course it is a good thing, but often it complicates things when you for example write a lot of javascript. When embedding your javascript and css files, be sure to add a querystring to the end with for example a version number (?ver=1.0). Just increment the number everytime you release something and all you problems with caching will go away. This will force the …

Continue reading →

SingleOrDefault vs FirstOrDefault

LINQ is awesome, it truly is! I use it a lot. The other day I started getting some errors in a web application I helped to develop. The error it self was easy to spot, but more interesting was the reason behind the error. Someone (say me) had taken for granted that a particular property of an object only returned 0 or 1 result. The data behind the property changed so it now returned 2 …

Continue reading →