• February 2024
    M T W T F S S
  • Latest Posts

  • Latest Comments

  • Archives

Posts Tagged ‘MVC’

TDD Series for MVC 5

Here is a series of posts by Eric Vogel on testing MVC 5 applications: Attain Code Management Nirvana via Test-Driven Development, Part 1 Oh, CRUD … It’s Test-Driven Development for ASP.NET MVC, Part 2 TDD for ASP.NET MVC, Part 3: Contact Service Class

Dynamically Load Bootswatch Themes

This post shows how I dynamically load a user’s selected theme in an MVC 5 application that’s using Bootstrap and Bootswatch. App_Themes Folder I didn’t use use that… So you can skip this section if you like. In the past, different themes were placed in different folders and you could just enumerate the subdirectories in […]


Headline: Here is what I use for authorizing controller and actions in an MVC application that uses the new Claims based authorization. Some Great Resources Before I even begin, let me point people to some great resources I found today on this topic. The first has so many posts on the topic and they are […]

Unit Testing HandleErrorAttribute

Code Analysis doesn’t like the former MVC pattern of using a catch for all errors when updating a model. I wanted to use the HandleError attribute to deal with errors, but how should I unit test it? There are several keys to having the HandleError attribute work: Must decorate the Action with [HandleError] Must have […]

Migrated to Razor View Engine for MVC 3

I just finished converting my views from .aspx files to .cshtml Razor view engine files. It took about 4 hours for 38 views. The key lesson I learned is, “If you didn’t do anything very fancy in a View, just delete it and recreate it.” I think that would have caused it to go faster. […]

Upgrading to MVC 3

Headline: If you try on your own, it is painful. If you use the right tool, it’s not too bad. Use the MVC 3 Project Upgrade Tool Here is a link that discusses the MVC 3 Project Upgrade Tool. The only real issue I had is that all my code is in source control, so […]

Overview of Silverlight and WPF Projects

Headline: I’m trying to develop a new version of the FamilyShow that will use MVVM and work in both Silverlight (what I care about) and Windows Presentation Foundation (WPF) (what it was originally written in). I’ll start having a lot more posts about the differences between the two. I wish I’d started writing the differences […]

MVC Team Should Rule

Headline: I don’t think I’ve seen a team more focused on testability at Microsoft than the ASP.NET MVC (Model-View-Controller) team. I sure hope their unit testing philosophy starts to influence other teams more. Entity Framework If you use any of the patterns for the Entity Framework (one of the early versions of .NET 4.0 that […]

Unit Testing a Very Simple ViewResult in MVC

Technorati Tags: Unit Testing,MVC,VS 2010 I have a view that really only provides content, is there a quick way to test that it exists? What’s the Assert? There’s really not much to unit test if you have a page that has only HTML in a MVC (Model-View-Controller) project. And to some extent, if you had […]

Unit Testing CodeSmith Insight

Technorati Tags: Unit Testing,MVC,Moq,CodeSmith,Insight As anyone that knows me knows, I use test driven development. So when I put together a Feedback page in my MVC (Model-View-Controller) site I started with my test. What should the test be? Let’s start with the User Story : As a site user (anonymous or logged in) I want […]