Defining the C# Exposure
The following instructions describe how you can create a C# exposure for classes in the banking system. For more details, see "
-
From the Browse menu in the BankingViewSchema, select Exposures and then select the C# tab. Right‑click and add an exposure.
-
On the Define Exposure step of the wizard, name the exposure BankingClasses and then select schemas up to the BankingModelSchema.
-
On the next step of the wizard, select the following classes.
-
Bank, to enable the application to access the root object's allCustomers collection
-
BankingModelSchema, to enable the root object to be accessed using the myBank reference
-
Customer, because the application will create customers
You do not need direct access to this class from your C# application code. For simplicity in this tutorial, the BankAccount classes are not included.
-
-
On the Select Features step of the wizard, for the Bank class, select the allCustomers collection.
When you select the allCustomers collection, the CustomerByLastName collection class becomes part of the exposure. You never need to select the class of reference explicitly when using the C# Exposure wizard.
-
For the BankingModelSchema, which is an Application subclass, select the myBank reference to the root object.
-
For the Customer class, select the setPropertiesOnCreate method along with the address, firstNames, lastName, and number properties so that it can be invoked from your C# code.
-
The Feature Mappings step of the wizard enables you to specify different names for the exposed classes, properties, and methods. Accept the default names without change.
By default:
-
C# class names are the same as those of the corresponding JADE classes
-
C# property and method names are derived from the corresponding JADE names with the first letter changed to uppercase
-
-
The Save step of the wizard summarizes the exposure definition to be saved.
-
On the Generate step of the wizard, enter C:\Projects\BankingClasses as the directory where the C# project file and class files will be created.
Check the option to create a sample C# project file. In addition, check the option to create an application configuration file using the following information specified on the form.
-
JADE database path
-
JADE initialization file location
-
Sign-on schema name
-
Sign-on application name, for which you should select DotNetConnection
-
Mode (multiuser or single user) in which the JADE database should be open when the C# application attempts to connect
Note that this application configuration information is similar to that provided in the shortcut for a standard JADE client.
-
-
Click the Generate file to generate the files when you build a C# project in the next section.