_lastName;
}
set
{
if ((this._lastName != value))
{
this._lastName = value;
}
}
}
}
[Table(Name = "ProductPart")]
public partial class ProductsPart
{
private int _productID;
private string _name;
private string _productNumber;
[Column(Name = "ProductID", Storage = "_productID", DBType = "int")]
public int ProductID
{
get
{
return this._productID;
}
set
{
if ((this._productID != value))
{
this._productID = value;
}
}
}
237
Part III: LINQ to SQL
[Column(Name = "Name", Storage = "_name", DBType = "nvarchar(50)")]
public string Name
{
get
{
return this._name;
}
set
{
if ((this._name != value))
{
this._name = value;
}
}
}
[Column(Name = "ProductNumber", Storage = "_productNumber", DBType = i
"nvarchar(50)")]
public string ProductNumber
{
get
{
return this._productNumber;
}
set
{
if ((this._productNumber != value))
{
this._productNumber = value;
}
}
}
}
In the Click event of button3, add the following code to call this stored procedure:
private void button3_Click(object sender, EventArgs e)
{
AdventureWorks db = new AdventureWorks("Integrated Security=sspi");
int caseSwitch = int.
Pages:
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386