Пример #1
0
        public void Save()
        {
            var user = new User {
                Name = "foo", Age = 5
            };

            user = CsOhm.Save(user);

            Assert.NotNull(user);

            var savedUser = CsOhm.Get <User>(user.Id);

            Assert.NotNull(savedUser);

            Assert.Equal(savedUser.Id, user.Id);
            Assert.Equal(savedUser.Name, user.Name);
            Assert.Equal(savedUser.Age, user.Age);
        }
Пример #2
0
 public BasicPersistenceTest()
 {
     CsOhm.Connect(prefix: "Test");
 }