[VS2008] Finally had Time to Sit Down and Play

I finally had some time to play around with VS2008 for a few hours, and I must say I do like c# 3.0, linq and all that. What I most wanted to try out was linq to sql, which I did. Nothing too complex, but I think I got the hang of it now. While looking at linq for sql I also tried out some of the other new featurs like the object and collection initializer (nice), some extension methods and of course the query language.

I'm still thinking about the extension methods and I think developers need to be a bit careful and not start using the feature just because it's there. I was glad to see the information that pops up in Visual Studio when you hover above the extension and the special intellisense icon, which makes it easier to spot them.

The linq to sql graphical designer was easy to use, but it doesn't seem to support file databases, I had to create a db in sqlexpress instead. Perhaps I did something wrong.

Something i noticed was that a stored procs which selects * from tablex returned a specific results class instead of a collection of tablex. Perhaps it's possible to cast or convert the result from the sp to a list of tablex or something, but I doubt it. The sample code from ScottGu's blog indicates it should work... I'll try again later :) 

UPDATE: Thanks to Raj for pointing out that you have change the return type of the stored proc in the designer properties to be of the type you wish it to be. *cheers* 

1 Comment

Comments have been disabled for this content.