public void Run() { Siaqodb siaqodb = SiaqodbFactoryExample.GetInstance(); siaqodb.DropType <MyClassWithLists>(); for (int i = 0; i < 10; i++) { MyClassWithLists ps = new MyClassWithLists(); ps.ID = i; ps.myList = new List <int>(); if (i % 2 == 0) { for (int j = 0; j < 3; j++) { ps.myList.Add(j * i); } } ps.blob = new byte[] { 1, 2, 3 }; siaqodb.StoreObject(ps); } //this query will run optimazed, only instances that satify condition are created by engine var q = from MyClassWithLists myListObj in siaqodb where myListObj.myList.Contains(2) select myListObj; Log("Following objects contains in myList prop element = 2:"); foreach (MyClassWithLists mcl in q) { //do somthing with obj } }
public void Run() { Siaqodb siaqodb = SiaqodbFactoryExample.GetInstance(); siaqodb.DropType<MyClassWithLists>(); for (int i = 0; i < 10; i++) { MyClassWithLists ps = new MyClassWithLists(); ps.ID = i; ps.myList = new List<int>(); if (i % 2 == 0) { for(int j=0;j<3;j++) { ps.myList.Add(j * i); } } ps.blob = new byte[] { 1, 2, 3 }; siaqodb.StoreObject(ps); } //this query will run optimazed, only instances that satify condition are created by engine var q = from MyClassWithLists myListObj in siaqodb where myListObj.myList.Contains(2) select myListObj; Log("Following objects contains in myList prop element = 2:"); foreach (MyClassWithLists mcl in q) { //do somthing with obj } }