Showing posts with label LINQ. Show all posts
Showing posts with label LINQ. Show all posts

Tuesday, November 27, 2007

Visual Studio 2008 Training on Channel 9

VS2008 Training Kit: Building Windows Presentation Foundation Applications in Visual Studio 2008 and Expression Blend
This session was presented by Jaime Rodriguez

Come and learn how to build Windows Presentation Foundation (WPF) applications with the help of the new WPF designer in Visual Studio 2008 This session focuses on the construction of a real-world application demonstrating how to get the best out of the designer's capabilities. Learn the basics of building WPF applications in the Visual Studio 2008 WPF designer; have a clear view on when you'll want to work in XAML Code and on the Visual Studio design surface to get your WPF application built; and see how you can use Microsoft Expression Blend in conjunction with Visual Studio 2008 WPF designer.

Watch the screencast here:

VS2008 Training Kit: What's New in Windows Presentation Foundation 3.5
This session was presented by Kevin Moore

Learn about the work being done in the Orcas release of WPF, including improved 3D with UIElement3D, increased animation smoothness, better cookie and FireFox plug-in support for XBAPs, as well as support for AddInControl, LINQ, ADO.NET and much more!

Download it here:

VS2008 Training Kit: Introduction to Silverlight
This session was presented by Adam Kinney

Silverlight is a cross platform UI framework for creating compelling Web experiences. Come learn the high-level architecture of Silverlight and the tools that are available to build Silverlight applications.

Download it here:

VS2008 Training Kit: Building Web Applications with Visual Studio 2008
This session was presented by Ryan Dunn

This session covers the new design and development features in Visual Studio 2008 for creating rich web applications. Topics include the new CSS and HTML design tools, much improved Javascript Intellisense and debugging support, and the new ASP.NET 3.5 controls supporting LINQ and AJAX.

Download it here:

VS2008 Training Kit: Introduction to ASP.NET AJAX
This session was presented by Steve Marx

In this session, you'll learn how to use ASP.NET AJAX to build a richer, more responsive user experience. Topics include partial rendering, web services, structured scripting, and integration with Silverlight.

Download it here:

Friday, August 31, 2007

Download LINQPad

Can't wait for C# 3.0 and LINQ? Well you don't have to! Dynamically query SQL databases today in LINQ: no more struggling with antiquated SQL. Download LINQPad and kiss goodbye to SQL Management Studio: LINQPad supports LINQ to objects, LINQ to SQL and LINQ to XML—in fact, everything in C# 3.0 and .NET Framework 3.5. LINQPad is also a terrific learning tool for experimenting with this exciting new technology.

No installation required: LINQPad ships as a simple "click and run" self-updating 300KB executable. Instant LINQ!

Download it here:

Monday, August 20, 2007

Article: LINQ to SQL (Part 6 - Retrieving Data Using Stored Procedures)

LINQ to SQL is a built-in O/RM (object relational mapper) that ships in the .NET Framework 3.5 release, and which enables you to model relational databases using .NET classes. You can use LINQ expressions to query the database with them, as well as update/insert/delete data.

This is the 6th article that Scott Guthrie has written about LINQ. The first 5 can be found below.

Part 1: Introduction to LINQ to SQL
Part 2: Defining our Data Model Classes
Part 3: Querying our Database
Part 4: Updating our Database
Part 5: Binding UI using the ASP:LinqDataSource Control

What is covered in the 6th article?

To SPROC or not to SPROC? That is the question....
The Steps to Map and Call a SPROC using LINQ to SQL
How to Map a SPROC to a LINQ to SQL DataContext
How to Call our Newly Mapped SPROC
Mapping the Return Type of SPROC Methods to Data Model Classes
Handling SPROC Output Parameters
Handling Multiple Result Shapes from SPROCs
Supporting User Defined Functions (UDFs)

Read the article here:

Sunday, May 27, 2007

Top 10 .NET Framework Technologies to Learn in 2007. What do you think? list the following 10 .NET Framework Technologies to Learn in 2007. What do you think? I think that you can not known all of these as well if you picked only a handful. I marked the ones that I think are absolutely needed in red and the maybe ones in blue. As you can see I marked only 4 ([edit]that was initially, I added threading since it shouldn't take you that long to master that and I added some other ones that are essential for a developer[/edit]) and yes SQL Server is one of them. Even to master SQL Server 2005 is very difficult if not impossible. Do you know all of the following good enough that you can work with it without a problem?

Notification Services

You don't and you really can't unless you don't have a life and sit in front of a PC 24/7 but even then it is doubtful
What I have noticed is that a lot of .NET developers didn't do Ajax until MS released ASP.NET Ajax, it is like they are oblivious to the fact that there are other frameworks out there like prototype for example. It is kind of sad that the technology that was first developed by Microsoft and made its way into Outlook Web Access took sooooooo long to get into Visual Studio. Same thing with Nant, Subversion etc etc. I mean how many of you are still using SourceSafe? I am not using it because Subversion is so much better and it's also free (not that that matters because we get it with our MSDN subscriptions anyway).

So open your eyes check CodePlex regularly for new things. Do you know there is a NHibernate.Spatial project? No, did you know that MbUnit 2.4 has been released?
Download it here:

Here is the list (from

1) WCF (Windows Communication Foundation): While WCF is certainly less "sexy" than say WPF / Silverlight, it is going to represent the backbone of solving business problems with .NET going forward from here. Big organizations are starting to embrace it, and it provides a cohesive framework for solving business problems in a distributed, integrated way. WCF integrates Remoting, WebServices, EnterpriseServices and Transactions, WSE, MSMQ, and much more into a cohesive programming framework. If you intend to make it your business to study just one new .NET technology this year, make it WCF.

2) ADO.NET (and LINQ): ADO.NET is how you talk to a data store, and databases are such a ubiquitous part of what you will do as a developer that you have NO CHOICE but to become extremely competent in this area. The next big thing in how to talk to data is LINQ with language extensions and entity objects that "represent" mappings of data and its relationships. If you don't become at least familiar with all this stuff, somebody else is going to eat your lunch.

3) WPF (Windows Presentation Foundation): Everything you learned about Windows Forms, pages in a browser, and UI elements is going to go out the window, because Microsoft has already declared that WPF is the new way we're gonna do this stuff. Its already built in to Windows Vista, and the XPS (XML Paper Specification) is already built into the printer subsystem. Don't hang on to the old- get with the new just as fast as you can get your little tushy in gear! And besides that, WPF is just so friggin' cool, it will knock your socks off in hi-def streaming video!

4) SQL Server 2005 (and on): I understand this isn't really .NET, but then again it really is. SQL Server 2005 hosts CLR integration of managed code. That's not only revolutionary, it provides a power to the programmer that you cannot get on other platforms. You have to learn everything you can about SQL Server 2005 including Service Broker, because it will help you to be a better programmer and problem - solver.

5) ASP.NET 2.0: Even non "web programmers" need to understand how this works. The feature set has grown and matured, and you are looking at dynamic languages, LINQ, AJAX, and much more being integrated into the ASP.NET Framework (not to forget Silverlight - the sexiest technology of all of them!).

6) Security. Developers are notoriously weak on security ("Who cares about permission sets - I'm just a Code Monkey"). Unfortunately, we do not live in a perfect world and there are evil people out there who jump with glee when they can mess up your day. The more you become an expert about security, the higher your pay will be: expert security consultants make upwards of $300 / hr.

7) TDD (Test Driven Development): Unit, regression and integration testing aren't a luxury - if you want to develop robust systems then you must have a test protocol. And to do testing right, you need to study how to write tests and what tests to write. There are several excellent books on TDD and at least one that specifically focuses on .NET.

8) Networking (System.Net and related): Networking -- TCP, UDP, HTTP, FTP, and on -- are an integral part of what you need to know how to do in order to glue programs together and make them be able to talk with each other and your data. The more you know about this area, the better equipped you'll be to make the right kind of choices when you are tasked with creating business logic through code.

9) Threading: When asked to develop a multi-threaded object or to use a ThreadPool, 95 out of 100 programmers who claim to be professional .NET developers fall flat on their faces! You need to study all the threading primitives, know how they are used, be able to use the .NET or a custom ThreadPool, and manage threads in your applications.

10) Learning. That's right, I classify learning as a technology. People need to become smarter about how to learn, and especially, WHAT to learn. Just as you become a better programmer when you learn to use the Google or other search engines more effectively, you become a better programmer when you can detail for yourself what you need to learn to be better at your craft, and write down a plan for implementing that learning process.

I would like to have all of them in red but it is time to start specializing just like doctors do, you have to become a specialist. I rather have a lung doctor, an eye doctor and an orthopedic surgeon on my team than 3 physicians who know a little about everything but not a lot about one thing.

Wednesday, May 02, 2007

Nice Silverlight Developer Reference Poster

Silverlight Developer Reference Poster

The supported languages are C#, VB, JScript, IronPython, VB10 (soon), IronRuby (soon). VB10 soon???? VB9 isn't even out yet. LINQ is supported by Silverlight, but support for XLINQ (LINQ to XML) is coming soon. The Opera browser and Windows 2000 will also be supported soon as well as RSS/Atom support.

Get the full size poster here: or click on the image

Saturday, April 28, 2007

Lambda Expressions, LINQ, DLINQ And XLINQ Samples For Orcas

Microsoft has a bunch of samples on their sitethat show how Lambda Expressions, LINQ, DLINQ And XLINQ work in Visual Studio Orcas Beta 1

This is what is available right now
C# LINQ Samples and content for Beta 1
C# LINQ Samples and content for March CTP
VB LINQ Samples for Beta 1

If you install C# LINQ Samples and content for Beta 1 then you will see the following examples

In addidion to the samples there are also these five whitepapers in the whitepapers folder.
LINQ to SQL Overview for CSharp Developers.doc
XLinq_Overview - Feb.doc
LINQ Project Overview.doc
CSharp 3.0 Specification.doc
Standard Query Operators.doc

This is all a must read if you want to get started with .NET 3.5

Here is the download link in case the URLs above changes:

Saturday, April 21, 2007

ORDER BY 1 Will Not Work In LINQ The Same As In SQL

I installed Visual Studio Orcas Beta 1 last night and now I am playing around with LINQ

You know how you can do the following in SQL

FROM SomeTable

This will order the resultset by the first column. This of course is not good practice but that is not the point here. In LINQ if you do orderby 1 (that is right no space between order and by) it looks like that line is skipped, no error or exception is thrown

Dump the following code in a C# console application and try for yourself
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication1
class Program
static void Main(string[] args)
string[] names = { "Burke", "Connor", "Frank",
"Everett", "Albert", "George",
"Harris", "David" };

IEnumerable expr = from s in names
where s.Length == 6
orderby 1
//order by s
select s.ToUpper();

foreach (string item in expr)