示例#1
0
 public virtual void Test1()
 {
     NeoDatis.Odb.ODB     odb = Open("cyclic.neodatis");
     NeoDatis.Odb.Objects l   = odb.GetObjects(typeof(NeoDatis.Odb.Test.VO.Country.Country
                                                      ), true);
     NeoDatis.Odb.Test.VO.Country.Country country = (NeoDatis.Odb.Test.VO.Country.Country
                                                     )l.GetFirst();
     AssertEquals("Brasil", country.GetName());
     odb.Close();
 }
示例#2
0
 public virtual void Test2()
 {
     Println("-------------------");
     // LogUtil.logOn(ObjectWriter.LOG_ID, true);
     // LogUtil.logOn(ObjectReader.LOG_ID, true);
     NeoDatis.Odb.ODB     odb = Open("cyclic.neodatis");
     NeoDatis.Odb.Objects l   = odb.GetObjects(typeof(NeoDatis.Odb.Test.VO.Country.Country
                                                      ), true);
     NeoDatis.Odb.Test.VO.Country.Country country = (NeoDatis.Odb.Test.VO.Country.Country
                                                     )l.GetFirst();
     AssertEquals(10, country.GetCities().Count);
     odb.Close();
 }
示例#3
0
		/// <exception cref="System.Exception"></exception>
		public override void SetUp()
		{
			base.SetUp();
			DeleteBase("cyclic.neodatis");
			NeoDatis.Odb.ODB odb = Open("cyclic.neodatis");
			NeoDatis.Odb.Test.VO.Country.Country brasil = new NeoDatis.Odb.Test.VO.Country.Country
				("Brasil");
			for (int i = 0; i < 10; i++)
			{
				NeoDatis.Odb.Test.VO.Country.City city = new NeoDatis.Odb.Test.VO.Country.City("city"
					 + i);
				city.SetCountry(brasil);
				brasil.AddCity(city);
			}
			odb.Store(brasil);
			odb.Close();
		}
示例#4
0
 /// <exception cref="System.Exception"></exception>
 public override void SetUp()
 {
     base.SetUp();
     DeleteBase("cyclic.neodatis");
     NeoDatis.Odb.ODB odb = Open("cyclic.neodatis");
     NeoDatis.Odb.Test.VO.Country.Country brasil = new NeoDatis.Odb.Test.VO.Country.Country
                                                       ("Brasil");
     for (int i = 0; i < 10; i++)
     {
         NeoDatis.Odb.Test.VO.Country.City city = new NeoDatis.Odb.Test.VO.Country.City("city"
                                                                                        + i);
         city.SetCountry(brasil);
         brasil.AddCity(city);
     }
     odb.Store(brasil);
     odb.Close();
 }
示例#5
0
文件: City.cs 项目: ekicyou/pasta
		public virtual void SetCountry(NeoDatis.Odb.Test.VO.Country.Country country)
		{
			this.country = country;
		}
示例#6
0
文件: City.cs 项目: ekicyou/pasta
 public virtual void SetCountry(NeoDatis.Odb.Test.VO.Country.Country country)
 {
     this.country = country;
 }