oreilly.comSafari Books Online.Conferences.


AddThis Social Bookmark Button

Object-Oriented Data Programming: C# Meets Caché
Pages: 1, 2, 3, 4, 5, 6, 7, 8, 9

Create the Classes First in Caché

Now that we (more or less) know what we want to create in C#, we start by creating classes in Caché.

To follow along you'll have to download both Caché 5.1 and the Caché Managed Provider for .NET (both are free for developers). You'll also need Visual Studio 2005 or C# Express 2005.

Right-click the Caché Cube (Figure 1) and open the Caché Studio (Figure 2).

Cache Cube
Figure 1. Right-click the Caché Cube ...

open studio
Figure 2. Then open the Caché Studio.

Click on File->New Project to create a new project. Then, so that you can name it, click on File->Save Project. Next, right-click on Classes and click Create New Class to add the Route class as shown in Figure 3.

new class
Figure 3. Creating a new class

When prompted, name the new class Route, and set its type to Persistent, as shown in Figure 4.

class type
Figure 4. Setting the class type

The most important buttons you'll use in the studio are the buttons for creating a New Property and for creating a Query, as shown highlighted in Figure 5.

Figure 5. The handiest: New Property and Query buttons

We decided earlier that Route would have RouteName, so click on the New Property button and give the class a property RouteName. You are next asked what the property is "for" and in this case it is a single value of type String so you can accept the defaults and click Finish. The Caché class is updated.

Pages: 1, 2, 3, 4, 5, 6, 7, 8, 9

Next Pagearrow