Skip to content

John Plummer . com

Stuff I want to remember

  • About
  • Contact

Category: .Net

Mainly CSharp, ASP.NET and MVC

BDD with SpecFlow, NUnit and MVC3–Refactored

Whilst the previous post (BDD with SpecFlow, NUnit and MVC3–More View a List Of Products) got the job done, it could have done it a lot better. After a conversation on Twitter and in the comments on the previous post with Darren Cauthon (@darrencauthon, http://www.cauthon.com) and Marcus Hammarberg (@marcusoftnet, http://www.marcusoft.net), there are three areas where […]

Read More…

November 21, 2010November 21, 2010 JohnNo Comments

BDD with SpecFlow, NUnit and MVC3–More View a List Of Products

Following on from this post where it looked like BDD was a spectacularly inefficient way to drive out code, I’ll add a new feature to the scenario: Scenario: Display 10 products     Given There are 10 products     When the product controller is told to display the default view     Then the view should contain […]

Read More…

November 18, 2010December 6, 2011 John8 Comments

BDD with SpecFlow, NUnit and MVC3–View a List Of Products

In the last post I set up an MVC project and Specs project and added various assembly references to the Specs project. In this post I’ll write my first feature which is to view a list of products. The First Feature Add a features folder to the Specs project then add a new item. If […]

Read More…

November 12, 2010November 18, 2010 JohnNo Comments

BDD with SpecFlow, NUnit and MVC3–Getting Started

Up to now I have been using Test Driven Development (and occasionally just Unit Testing after the fact) but I want to start using Behaviour Driven Development as it seems a more natural way to flesh out an application. When using TDD, code is tested one unit (class or method) at a time, any dependencies […]

Read More…

November 12, 2010December 6, 2011 John2 Comments

Adding Namespaces to MVC3 Views

Currently there are two ways to add an assemblies namespace to MVC3 views,either in the web.config or with @using. When adding to the web.config, add the namespace to the web.config in the Veiws/Shared directory. Adding to the web.config in the project root doesn’t work, not sure if this is a bug or working as intended. […]

Read More…

November 5, 2010December 6, 2011 John1 Comment

Data Annotations and Entity Framework Code First

I like the code first model of Entity Framework 4 (CTP2 at time of writing). A Domain Entity can be decorated with data annotations which can then be used by the Entity Framework when constructing the database. I have no concerns adding the System.ComponentModel.DataAnnotations reference to my Domain; I have no intention of changing my […]

Read More…

November 5, 2010December 6, 2011 JohnNo Comments

Entity Framework 4 and SQLCE 4 CTPs Odds and Ends

There are already plenty of good walk through for using Code First with EF 4 CTP so this a mop of of some odds and ends I found useful. I’l update this post as further releases are made / I stumble across discover new features. Adding the NuPack package EF4 (currently at CTP2) is available […]

Read More…

November 4, 2010December 6, 2011 JohnNo Comments

MVC – Multiple types were found that match the controller named ‘Home’.

  When I create a new MVC project I normally compile and run it before making any changes. The first change I make after this is normally to the assembly name and namespace. After amending the namespaces of the default controllers and model and also the global.asax markup (which I invariably forget) I re run. […]

Read More…

November 4, 2010December 6, 2011 John9 Comments

DI with Ninject for an MVC project

This seems to be a somewhat moving target with ASP.Net MVC moving up the versions as well as Ninject. This particular target will be ASP.Net MVC 2.0 and Ninject 2.0. First set up the references: Download Ninject.Web.Mvc (If not using git, there is a download source link on the page). Open the mvc2/Ninject.Web.Mvc.sln and compile […]

Read More…

August 29, 2010December 6, 2011 JohnNo Comments

Solution Layout for an MVC App

While it may seem easier to throw all code into one project, it is good practise to separate areas of code into different projects within a solution. This helps promote good design with principles like loose coupling and high cohesion. A solution layout I like is: Domain – contains the domain layer and data interfaces […]

Read More…

April 20, 2010August 29, 2010 JohnNo Comments

Posts navigation

Older posts

Recent Posts

  • Moving Plists Between Macs
  • Javascript imports and exports
  • What is Lambda Calculus
  • VS Code as a markdown editor
  • Why Measure Dev Team Productivity?

Tags

.Net Ajax Bdd Blueprint Config Current Version Databases Default View Dependencies Feature View Footer Bar Gems Heroku Honest Description Implementation Instance Methods Interface irb Lt Mac Mvc3 Namespaces Nunit Os X Preference Product Controller Project Root Rake Razor Repository Rerun Roots Ruby Ruby and Rails Ruby On Rails Running Scripts Sql Databases Sql Server Stack Using Visual Studio Vim Visual Studio Vm Wordpress

Archives

  • May 2022
  • June 2018
  • May 2018
  • October 2015
  • September 2015
  • October 2014
  • September 2014
  • May 2014
  • March 2012
  • February 2012
  • January 2012
  • December 2011
  • October 2011
  • June 2011
  • May 2011
  • April 2011
  • January 2011
  • December 2010
  • November 2010
  • October 2010
  • September 2010
  • August 2010
  • April 2010
  • January 2010
  • July 2008
  • July 2007
  • June 2007