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

Scott Klein

"Professional LINQ"

FirstName = "Scott";
267
Part III: LINQ to SQL
con.LastName = "Klein";
con.MiddleName = "L";
con.NameStyle = 0;
con.EmailPromotion = 1;
con.EmailAddress = "ScottKlein@SqlXml.com";
con.PasswordHash = "asdf";
con.PasswordSalt = "qwer";
con.Title = "Geek";
db.Contacts.Add(con);
Contact con1 = new Contact();
con1.FirstName = "Horacio";
con1.LastName = "Hornblower";
con1.MiddleName = "T";
con1.NameStyle = 0;
con1.EmailPromotion = 1;
con1.EmailAddress = "Hornblower@sailingrus.com";
con1.PasswordHash = "asdf";
con1.PasswordSalt = "qwer";
con1.Title = "Captain";
db.Contacts.Add(con1);
db.SubmitChanges();
textBox1.Text = "Transaction Successful!";
ts.Complete();
ts.Dispose();
}
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
Next is an example of an explicit local transaction. Here, the specific transaction connection is created
and controlled, as well as the need to specifically commit and/or roll back the transaction. Like the first
example, the SubmitChanges method is called and executed within the same transaction scope:
db.


Pages:
408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432
hotel jelenia góra Russian bride Free English grammar and study guid powiekszenia wielkoformatowe counter strike 1.6