Product Information > JADE .NET Developer’s Reference > Chapter 3 - Introductory Tutorial to JADE .NET > Defining the C# Exposure

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 "Chapter 17 - Using the C# Exposure Wizard", in the JADE Development Environment User's Guide.

  1. From the Browse menu in the BankingViewSchema, select the Exposures command and then select the C# tab. Right‑click and then add an exposure.

  2. On the Define Exposure step of the wizard, name the exposure BankingClasses and then select schemas up to the BankingModelSchema.

  3. On the next step of the wizard, select the following classes.

    You do not need to select the SequenceNumber class, which generates unique customer numbers, because the use of this class is built into the JADE constructor method. 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.

  4. 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.

  5. For the BankingModelSchema, which is an Application subclass, select the myBank reference to the root object.

  6. 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.

  7. 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:

  8. The Save step of the wizard summarizes the exposure definition to be saved.

  9. 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.

    This application configuration information is similar to that provided in the shortcut for a standard JADE client.

  10. Click the Generate file to generate the files when you build a C# project in the next section.