9using System.Collections.Generic;
12using System.Data.SqlClient;
13using System.Configuration;
25 get {
return GetProperty(firstNameProperty); }
26 set { SetProperty(firstNameProperty, value); }
31 get {
return GetProperty(lastNameProperty); }
32 set { SetProperty(lastNameProperty, value); }
38 get {
return GetProperty(smallColumnProperty); }
39 set { SetProperty(smallColumnProperty, value); }
62 LoadProperty(firstNameProperty, reader.GetString(
"FirstName"));
63 LoadProperty(lastNameProperty, reader.GetString(
"LastName"));
64 LoadProperty(smallColumnProperty, reader.GetString(
"SmallColumn"));
71 using (SqlCommand command =
new SqlCommand(
"Delete From Table2 Where FirstName = '" + ReadProperty(firstNameProperty) +
"' And LastName = '" + ReadProperty(lastNameProperty) +
"' And SmallColumn = '" + ReadProperty(smallColumnProperty) +
"'", manager.
Transaction.Connection, manager.
Transaction))
73 command.ExecuteNonQuery();
82 using (SqlCommand command =
new SqlCommand(
"INSERT INTO Table2(FirstName, LastName, SmallColumn) VALUES('" + ReadProperty(firstNameProperty) +
"', '" + ReadProperty(lastNameProperty) +
"', '" + ReadProperty(smallColumnProperty) +
"')", manager.
Transaction.Connection, manager.
Transaction))
84 command.ExecuteNonQuery();
This is the base class from which most business objects will be derived.
This is an IDataReader that 'fixes' any null values before they are returned to our business code.
Provides an automated way to reuse open database connections and associated ADO.NET transactions with...
T Transaction
Gets a reference to the current ADO.NET transaction object.
TransactionManager< C, T > GetManager(string database)
Gets the TransactionManager object for the specified database.
Client side data portal used for making asynchronous data portal calls in .NET.
T Create(params object[] criteria)
Called by a factory method in a business class to create a new object, which is loaded with default v...
T FetchChild()
Fetches an existing child business object.
Maintains metadata about a property.
void Child_Fetch(Csla.Data.SafeDataReader reader)
static TransactionContextUser NewTransactionContextUser()
void Child_Insert(TransactionContextUserList parent)
static TransactionContextUser GetTransactionContextUser(Csla.Data.SafeDataReader reader)
static string DataPortalTestDatabase
@ Serializable
Prevents updating or inserting until the transaction is complete.
@ Create
Create operation.