public void Run() { Siaqodb siaqodb = SiaqodbFactoryExample.GetInstance(); siaqodb.DropType <AttUsage>(); AttUsage at = new AttUsage(); at.anotherInt = 100; at.SetInt(20); at.SetString("very long string"); at.UniqueField = 10; siaqodb.StoreObject(at); IObjectList <AttUsage> list = siaqodb.LoadAll <AttUsage>(); foreach (AttUsage a in list) { if (a.GetInt() == 0) { Log("Memeber was ignored by siaqodb!"); } } AttUsage at1 = new AttUsage(); at1.anotherInt = 100; at1.SetInt(20); at1.SetString("very long string"); //try to violate constraint at1.UniqueField = 10; try { siaqodb.StoreObject(at1); } catch (UniqueConstraintException ex) { Log("A unique contraint attempt to be violated!"); } }
public void Run() { Siaqodb siaqodb = SiaqodbFactoryExample.GetInstance(); siaqodb.DropType<AttUsage>(); AttUsage at = new AttUsage(); at.anotherInt = 100; at.SetInt(20); at.SetString("very long string"); at.UniqueField = 10; siaqodb.StoreObject(at); IObjectList<AttUsage> list = siaqodb.LoadAll<AttUsage>(); foreach (AttUsage a in list) { if (a.GetInt() == 0) { Log("Memeber was ignored by siaqodb!"); } } AttUsage at1 = new AttUsage(); at1.anotherInt = 100; at1.SetInt(20); at1.SetString("very long string"); //try to violate constraint at1.UniqueField = 10; try { siaqodb.StoreObject(at1); } catch (UniqueConstraintException ex) { Log("A unique contraint attempt to be violated!"); } }