Friday, May 25, 2007

DevCares presentation on Visual Studio Orcas and Linq

Today I presented at the Microsoft DevCares event at the InfoMart in Dallas. As promised I have made available the powerpoints and the VS solutions that I used for the demo.

Here are the contents for Microsoft DevCares sponsored by Tekfokus:

1) Lap around Visual Studio Orcas Powerpoint
2) Linq and Data Access in Visual Studio Orcas Powerpoint
3) solution containing demos for ASP.NET
4) solution containing demos for LINQ

These documents can be found in this direcotry

It was a great presentation today at DevCares and a good turnout with 31 developers in attendance. It is amazing how many new great features are being released in this version of Visual Studio.

Note you will need to make one modification to the LINQ solution demo, you will need to change the SQL connection string to (insert your path):
-pass in the filename using a "user instance" connection in your sql connection string like so:
"Data Source=.\SQLEXPRESS;AttachDbFilename=C:\joeDev\JoeOrcasTest\Data\NORTHWND.MDF;Integrated Security=True;User Instance=True"

Here are some of the best sessions from MIX available online for free:
Anders Hejslberg on Linq
Scott Guthrie keynote at Mix (you can skip the last 10 mins)

Scott Guthrie on Silverlight (channel 9)

Recommended Reading:

MSDN article on LINQ

Additional Code examples

class Program
//--This example demonstrates that Lambda expressions are just an abbreviated syntax for anonmymous delegates

public delegate bool MyDelegate(Customer c);

static void Main(string[] args)
Customer cust = new Customer { Name = "Fred"};

//--old .NET 2.0 way, handle with an anonymous delegate
MyDelegate del = new MyDelegate(delegate(Customer c)
return c.Name == "Fred";
Console.WriteLine("old way:" + del.Invoke(cust));

//--new 3.5 way, handle with elegant Lamba expression
MyDelegate del2 = new MyDelegate(c => c.Name == "Fred");
Console.WriteLine("new way:" + del2.Invoke(cust));


public class Customer
public string Name { get; set; }
public int ZipCode { get; set; }

note: have to perform a fix to get the CSS properties window to work in ASP.NET. The fix, which consists of simply copying a certain file into the right directory can be found here:

Guess what, good news you can take advantage of AJAX in Visual Studio 2005 using Ajax extentions for VS 2005. This includes the update panel control which I demoed and is very easy to use (drag and drop easy).

note: I have installed Visual Studio Orcas on my primary work laptop and so far I haven't had any problems.

No comments: