コード例 #1
0
		private void FillDB()
		{
			LiteralDescription ld1 = new LiteralDescription("DescriptioN 1");
			LiteralDescription ld2 = new LiteralDescription(" Description 2");
			LiteralDescription ld3 = new LiteralDescription(" Description ");
			LiteralDescription ld4 = new LiteralDescription("1234567890");
			LiteralDescription ld5 = new LiteralDescription("    1234567890    ");
			LiteralDescription ld6 = new LiteralDescription("DescRiptioN TheEnd");
			using (ISession s = OpenSession())
			{
				s.Save(ld1);
				s.Save(ld2);
				s.Save(ld3);
				s.Save(ld4);
				s.Save(ld5);
				s.Save(ld6);
				s.Flush();
			}
		}
コード例 #2
0
        private void FillDB()
        {
            LiteralDescription ld1 = new LiteralDescription("DescriptioN 1");
            LiteralDescription ld2 = new LiteralDescription(" Description 2");
            LiteralDescription ld3 = new LiteralDescription(" Description ");
            LiteralDescription ld4 = new LiteralDescription("1234567890");
            LiteralDescription ld5 = new LiteralDescription("    1234567890    ");
            LiteralDescription ld6 = new LiteralDescription("DescRiptioN TheEnd");

            using (ISession s = OpenSession())
            {
                s.Save(ld1);
                s.Save(ld2);
                s.Save(ld3);
                s.Save(ld4);
                s.Save(ld5);
                s.Save(ld6);
                s.Flush();
            }
        }
コード例 #3
0
ファイル: Fixture.cs プロジェクト: jrauber/GH1429
        private async Task FillDBAsync(CancellationToken cancellationToken = default(CancellationToken))
        {
            LiteralDescription ld1 = new LiteralDescription("DescriptioN 1");
            LiteralDescription ld2 = new LiteralDescription(" Description 2");
            LiteralDescription ld3 = new LiteralDescription(" Description ");
            LiteralDescription ld4 = new LiteralDescription("1234567890");
            LiteralDescription ld5 = new LiteralDescription("    1234567890    ");
            LiteralDescription ld6 = new LiteralDescription("DescRiptioN TheEnd");

            using (ISession s = OpenSession())
            {
                await(s.SaveAsync(ld1, cancellationToken));
                await(s.SaveAsync(ld2, cancellationToken));
                await(s.SaveAsync(ld3, cancellationToken));
                await(s.SaveAsync(ld4, cancellationToken));
                await(s.SaveAsync(ld5, cancellationToken));
                await(s.SaveAsync(ld6, cancellationToken));
                await(s.FlushAsync(cancellationToken));
            }
        }