How to Configure a Self Referencing Entity in Code First

Recently I was working on a project that required a categorization option. I wanted the user to have the option to create categories and as many subcategories as they wanted. To realize this I created a category model that was self referencing:

Continue reading

Dependency Injection using Castle Windsor

Castle WindsorHave you ever heard about the term Inversion of Control (IoC) or dependency injection but you dont know exactly what it is or why you need it then continue reading. If you have never heard about it before and you are a developer then keep on reading also! Its a really cool way of programming (design pattern) and it can help you a lot in the future and its not that difficult 😉

Continue reading

URL Rewriting in EPiServer 6

Today I was working on a project that uses EPiServer version 6. As you probably know EPiServer 6 is still using webforms, not MVC. For SEO optimalisation we needed to rewrite incoming URL’s to make them uniform. For example all these URL’s should go to the same page

/en/Some-Interesting-Page
/Some-Interesting-Page
/en/some-interesting-page

For SEO it is important that there is only one valid URL. Other URL’s should throw a statuscode 301 and redirect to the correct url. For this I needed to do some URL rewriting in EPiServer.

Continue reading