SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 362 | Next

Scott Klein

"Professional LINQ"

The SalesPersonID is passed in to the stored procedure as
a parameter.
Now turn your attention to LINQ and Visual Studio. Open Visual Studio and create a new C# project.
Once the project is created, add the reference to System.Data.Linq. Next, place a list box, a text box, and
five buttons on Form1. It doesn??™t really matter how you lay everything out on the form, but make sure
that the list box is wide enough to display some data.
When the form is laid out, double-click the first button to display the code behind that button. Next, add
the using statement to System.Data.Linq, as shown in the following code:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Data.Linq;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace LINQ
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
}
private void button1_Click(object sender, EventArgs e)
{
}
}
}
The next thing you want to do is create a class that derives from the DataContext class, which you learned
about earlier in this chapter.


Pages:
350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374
hotel jelenia góra Russian bride Free English grammar and study guid powiekszenia wielkoformatowe counter strike 1.6