The activity record mode is usually used for data-driven applications.ProgramClass of the model database table or view in, with a row of its model database table from the class instance. In this mode, the attributes of the class are mapped to the columns of the corresponding database table.
The instance method of the class performs operations on the database record, while the static method uses the entire table. For example, if the database contains a table named "employee ID uniqueidentifier", a name named "nvarchar (50)", and an employee's table named "salary" as a currency, to implement the activity record mode, you want to create an attribute named "employee ID", "name", and "salary. The employee class will include static methods such as creating, saving, and deleting instance methods, and may include static methods such as deleteall, searching, and findall.
Figure 1The activity record mode is displayed. It provides a simple and intuitive syntax to use data and uses the mappers (O/RM) mode with Multiple object relationships.
Figure 1 activity record mode
// Add Andrew fuller as a new employee Employee EMP = new employee (); EMP. name = "Andrew Fuller"; EMP. salary = 50000.00 m; EMP. create (); // give a 10% raise to all employees employee [] allemployees = employee. findall (); foreach (employee current in allemployees) {current. salary * = 1.10 m; current. save ();}
Enterprise Application Architecture