Пример #1
0
        public void Can_load_entity(string entityId)
        {
            using (var testContext = new IisExpressTestClient())
            {
                using (var store = testContext.NewDocumentStore())
                {
                    store.Initialize();

                    using (var session = store.OpenSession())
                    {
                        var entity = new WithBase64Characters.Entity {
                            Id = entityId
                        };
                        session.Store(entity);
                        session.SaveChanges();
                    }

                    using (var session = store.OpenSession())
                    {
                        var entity1 = session.Load <object>(entityId);
                        Assert.NotNull(entity1);
                    }
                }
            }
        }
		public void Can_load_entity(string entityId)
		{
			using (var testContext = new IISExpressTestClient())
			{
				using (var store = testContext.NewDocumentStore())
				{
					store.Initialize();

					using (var session = store.OpenSession())
					{
						var entity = new WithBase64Characters.Entity { Id = entityId };
						session.Store(entity);
						session.SaveChanges();
					}

					using (var session = store.OpenSession())
					{
						var entity1 = session.Load<object>(entityId);
						Assert.NotNull(entity1);
					}
				}
			}
		}