ASP.NET MVC Storefront Part 5: Globalization

Please install Silverlight or click download to watch video locally.

Rob Conery works with Damien Guard to refactor the database to deal with test data and globalization issues.

Presented by Rob Conery

Duration: 11 minutes, 14 seconds

Date: 27 May 2008

Watch    Video   |   Download    Video

Video downloads: WMV  |  Zune  |  iPod  |  PSP  |  MPEG-4  |  3GP

Audio downloads: AAC  |  WMA  |  MPEG-4  |  MPEG-3  |  MPEG-2

Comments : 5

Leave a Comment

panesofglass : On November 06, 2008 2:35 PM said:

I realize this is a little late in the series to ask, but why use IQueryable rather than IEnumerable? Is there a reason, or is it just because IQueryable is the more explicit interface for queryable objects?

diego.tercero : On November 10, 2008 1:47 PM said:

Hi. Rob Conery has a blog in which he wrote a post for every episode in this series. All comments, questions and answers seem to be happening there.

http://blog.wekeroad.com/

jthanassis : On December 07, 2008 12:42 PM said:

Some quick responses to your video.

1. UnitPrice should not be in ProductCultureDetail table. You must find another way to handle/show parities of the same price in different currencies.

2. Generally speaking descriptions should be in text not in n/varchar. Don't forget that in a real case scenario the product description contains html.

I'm sure that there are many other issues concerning your database design.

Anyway for a test database we can overcome these issues.

I'm new to LINQ so I have some questions/comments regarding what I saw in this video.

1. What about left outer joins. Does LINQ support these type of joints?

2. I think you must use a single LINQ query in method GetCategories of your SQLCatalogRepository class.

3. In your last method SQLCatalogRepository_ShouldReturn...

of your CatalogIntegrationTest class (lines 25..27) you expect a full list of categories and then you filter out the category you like.This pattern of design will kill your database. I've seen a couple of other videos of yours and you always do the same thing. You first fetch all data and then filter. I'm I wrong?

robconery : On August 01, 2009 6:36 AM said:

Hi jthaniassis, thanks for the thoughts - let's see if I can help...

Re unit price - this is there for the times when Euros don't match dollars...

Use of "text" is a sledge hammer (I think you mean "ntext" right?) - nvarchar(MAX) does the same thing without using the disc to file a page. Either way HTML can be stored in both types.

Yes, LINQ supports left-outers

In GetCategories there is a single query - IQueryable uses delayed execution so it's only one. The grouping happens only when the categories are returned.

Finally - I'm not very worried about perf in a test class - it's only a test :)

zeyzone : On October 15, 2009 4:57 PM said:

Good lesson. I need to know how to upload photos to database and format

size before uploading . Regards

Leave a Comment

You must be logged in to leave a comment. Click here to log in.

Microsoft Communities