ASP.NET MVC Storefront Part 4: Linq To Sql Spike

Please install Silverlight or click download to watch video locally.

Rob creates a "spike" - a bit of functionality to test a thought or inspiration - to make sure that Linq To Sql will work for my data access pattern.

Presented by Rob Conery

Duration: 14 minutes, 16 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 : 4

Leave a Comment

jmoviedo : On November 26, 2008 10:53 PM said:

I have a question (I'm VB.Net guy), in the

SQLCatalogRespository class, what does this line means?:

ParentID = c.ParentID ?? 0

The question is what is "??" for?

Thanks

jbaird-pa : On November 27, 2008 4:15 PM said:

Imoviedo:

The ?? is equivalent to an ISNULL.  Therefore if c.ParentId is null return 0.

padcom : On February 04, 2009 2:28 PM said:

Hi,

that thing with new Product in LINQ and the mapping the LINQ result to a self-defined class really rocks! I didn't know you can do that :D

XIII : On November 27, 2009 7:00 PM said:

That's the null coalescing operator. Take a look at http://blog.krisvandermast.com/TestingUponNullableTypesInC20.aspx for information in C#. In VB.NET you can use the HasValue and Value properties on the nullable type.

Leave a Comment

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

Microsoft Communities