Did you know that the default route of ASP.NET MVC will produce multiple URL's that display the same content? And as I am sure you are aware, duplicate content can cause all sorts of SEO problems. In this post, I will show you three steps to prevent duplicate content with ASP.NET MVC 5. … [Read more...]
Why Is Entity Framework with ASP.NET Slow?
Do you have a slow running ASP.NET Web Application? There's a good chance it's because of lazy loading, an Entity Framework feature that's enabled by default. In my opinion, you should not use lazy loading for web applications. In this post I will explain why lazy loading can slow down performance and what you can do instead. … [Read more...]
Autofac Cache Module Example for ASP.NET MVC
In my last post, I mentioned why I use Autofac with ASP.NET MVC, and how to set up a basic configuration. In this post, I will explain how to create an Autofac module that can be used to switch between different caching implementations. … [Read more...]
What is the Best IoC Container for ASP.NET MVC?
Unity, Windsor and Autofac are three popular IoC containers that I've used when developing ASP.NET MVC applications. I've found, the easiest to set up and get going, is Autofac. In my last post, I explained how to create a Settings API with Entity Framework. In this post, I will show you how to add Autofac to the project, so that we can inject the dependencies into controllers. … [Read more...]
How to Store Application Settings in ASP.NET MVC Using Entity Framework
In this tutorial, we will create a strongly typed Settings API that uses Lazy loading, Cache, Reflection and Entity Framework to manage application settings in ASP.NET MVC. I will explain why its better to store settings in a database, how using reflection can make it easier to add new settings, and how to group the settings into a wrapper that uses Lazy loading and cache. … [Read more...]