The manual includes a lot of code segments, please read the illustration hereinafter to comprehend these codes better.
1. All the examples in this manual use Northwind database of Microsoft SQL Server.
2. The aliases of all the data tables with plural name will be changed to singular form in CodeAuto. For example, replace "Orders" with the "Order".
3. The "om" appears in the code is an ObjectManager object, please refer to Using NObject Persistence Layer.
|
Order order = Order.New(om); // om is an ObjectManager object |
4. The "NW" that appears in the code is the abbreviation of "Northwind", denoting the name of a query schema. The abbreviation "NW" is the "SchemaName" value having been configured while CodeAuto generating codes (refer to "3.2 Generating Codes"). Divide a big database into several sub-schemas is a good design habit. It will be more convenient to use them by giving each of these sub-schemas an abbreviation name.
|
Order.DeleteByCriteria(om, NW.Order.ShipVia == 1 && NW.Order.EmployeeID == 7 ); |