fixture.cs

来自「NHibernate NET开发者所需的」· CS 代码 · 共 46 行

CS
46
字号
using System;
using NUnit.Framework;

namespace NHibernate.Test.NHSpecificTest.NH315
{
	/// <summary>
	/// Summary description for Fixture.
	/// </summary>
	[TestFixture]
	public class Fixture : BugTestCase
	{
		public override string BugNumber
		{
			get { return "NH315"; }
		}

		[Test]
		public void SaveClient()
		{
			Client client = new Client();
			Person person = new Person();

			client.Contacts = new ClientPersons();

			using (ISession s = OpenSession())
			{
				s.Save(person);

				client.Contacts.PersonId = person.Id;
				client.Contacts.Person = person;

				s.Save(client);

				s.Flush();
			}

			using (ISession s = OpenSession())
			{
				s.Delete(client);
				s.Delete(person);

				s.Flush();
			}
		}
	}
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?