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 367 | Next

Scott Klein

"Professional LINQ"

_lastName;
}
set
{
if ((this._lastName != value))
{
this._lastName = value;
}
}
}
[Column(Name = "UnitPrice", Storage = "_unitPrice", DBType = "decimal")]
public decimal UnitPrice
232
Chapter 11: LINQ to SQL Queries
{
get
{
return this._unitPrice;
}
set
{
if ((this._unitPrice != value))
{
this._unitPrice = value;
}
}
}
}
You are almost done. The last step is to add the code behind the button. Add the following code to the
click event of button1:
private void button1_Click(object sender, EventArgs e)
{
AdventureWorks db = new AdventureWorks("Integrated Security=sspi");
IEnumerable result = db.SalesOrders(275);
foreach (OrdersBySalesPersonID ord in result)
{
listBox1.Items.Add(ord.ProductID + " " + ord.ProductName + " " +
ord.SalesPerson + " " + ord.UnitPrice);
}
}
That??™s it! In Visual Studio, select Debug ??? Start Debugging, or press the F5 key. Oops! You received some
compilation errors, didn??™t you? They probably state something like the following:
The type or namespace ??™MethodInfo??™ could note be found.


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