Click here to Skip to main content
15,886,702 members
Articles / Programming Languages / SQL

RAPPTOR.Persistence - Transparent object persistence the easy way

Rate me:
Please Sign up or sign in to vote.
4.67/5 (15 votes)
31 Aug 200510 min read 69.5K   114   46  
An example on how to use the object persistence framework.
  • rapptorpersistence_src.zip
    • PersistenceWithRAPPTOR
      • AssemblyInfo.cs
      • Cars.cs
      • default.build
      • ExampleCars.csproj
      • mono
        • antlr.runtime.dll
        • MySQL.Data.dll
        • RAPPTOR.Persistence.dll
        • RAPPTOR.Persistence.MSSQLDriver.dll
        • RAPPTOR.Persistence.MySQLDriver.dll
        • RAPPTOR.Persistence.PostgreSQLDriver.dll
      • net
        • antlr.runtime.dll
        • Mono.Security.dll
        • MySQL.Data.dll
        • Npgsql.dll
        • RAPPTOR.Persistence.dll
        • RAPPTOR.Persistence.MSSQLDriver.dll
        • RAPPTOR.Persistence.MySQLDriver.dll
        • RAPPTOR.Persistence.PostgreSQLDriver.dll
      • Program.cs
      • README
using System;
using RAPPTOR.Persistence;
using RAPPTOR.Persistence.DataModel;
using RAPPTOR.Persistence.DataModel.REF;

namespace Sample
{

    // Code for tutorial step 1 
    public class Car : ManagedObject
    {
        public EV<string> Manufacturer;
        public EV<string> Color;
        public EV<float> MaxSpeed;
        public EV<byte> Gears;
    }

    // Code for tutorial step 2
    //public class Car : ManagedObject
    //{
    //    public EV<string> Manufacturer;
    //    public EV<string> Model;
    //    public EV<string> Color;
    //    public EV<float> MaxSpeed;
    //    public EV<byte> Gears;
    //}

    // Code for tutorial step 3
    //public class Car : ManagedObject
    //{
    //    public EV<string> Manufacturer;
    //    public EV<string> Model;
    //    public EV<string> Color;
    //    public EV<float> MaxSpeed;
    //    public EV<byte> Gears;
    //    public RO<Driver> CarDriver;
    //}

    //public class Driver : ManagedObject
    //{
    //    public EV<string> Name;
    //    public EV<DateTime> Birthday;
    //}

    //public class RacingCar : Car
    //{
    //    public COL<Sponsor> Sponsors;
    //    public EO<Engine> CarEngine;
    //    public EV<string> ChiefDesigner;
    //}

    //public class Sponsor : ManagedObject
    //{
    //    public EV<string> Name;
    //    public EV<double> AdvertisingMoney;
    //}

    //public class Engine : ManagedObject
    //{
    //    public EV<float> Cylinder;
    //    public EV<float> HorsePower;
    //} 
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Germany Germany
Ingo lives in Berlin (Germany) and has a long experience in handling relational databases. He also programs in .net and is mainly responsible for software design and project managment. At the moment he contributes to a open source web application-server.

Comments and Discussions