MVC Storefront, Part 2: Repository Pattern
  • Video is free for view
  • Video is available for download
View_video

In this installment, I walk through our Repository implementation and write out the first main set of unit tests. I also  structure up the initial service layer methods and interfaces.

Getting Off The Ground
Finally! I get to code something! Our first set of requirements are pretty simple - which is the way we want em since we're being Agile:

  1. Users can brows products by Category and SubCategory
  2. Clicking on a Product in the category list shows a Product detail
  3. The product must display culture-specific pricing/descriptions as well as any discount information
  4. Each product can have 0 to many reviews.

I take a pretty good chunk out of the requirements in this session - working on the main setup of the Service layer as well as the Catalog Repository.

I also show you how you can work without a database (and keep working without one) as you test up and build your application from nothing. Ideally when working with TDD, you want to be sure that the your tests which require data are as isolated as possible. In other words - you don't want bad data to fail your tests.

by Rob Conery



 
Get Microsoft Silverlight

Tags: ASP.NET MVC, MVC Storefront, ASP.NET, C#, Microsoft, .NET Framework, Frameworks

Level: any Date: May 27, 2008 Votes: 0 User: Dmytro Shteflyuk  Comments:
 
 

1 Response(s) to this entry

Subscribe to comments with RSS.

 
 
miansaqibali  (2009-06-16)

Hi, I am using MVC , Entity framwork and I want to implement it with repository factory. Is there a way that we can use the existing class that the designer has generated for entites. Or we have implement ourself . and can we inherit our own classes in views of MVC if so then how