コード例 #1
0
        protected override void OnSetUp()
        {
            base.OnSetUp();
            using (var s = OpenSession())
                using (var tx = s.BeginTransaction())
                {
                    var book = new DomainClass
                    {
                        Name       = "Some name",
                        ALotOfText = "Some text",
                        Id         = 1
                    };

                    s.Persist(book);
                    tx.Commit();
                }
        }
コード例 #2
0
		protected override void OnSetUp()
		{
			base.OnSetUp();
			using (var s = OpenSession())
			using (var tx = s.BeginTransaction())
			{
				var book = new DomainClass
				{
					Name = "Some name",
					ALotOfText = "Some text",
					Id = 1
				};

				s.Persist(book);
				tx.Commit();
			}
		}