Inheritance: Dashing.Configuration.DefaultConfiguration
Exemplo n.º 1
0
 public void TestConfigWorks() {
     var config = new TestConfiguration(true);
     using (var session = config.BeginSession()) {
         session.Insert(new Post() { Title = "Foo" });
         Assert.Equal("Foo", session.Get<Post>(1).Title);
     }
 }
Exemplo n.º 2
0
        public void InsertLongWorks() {
            var config = new TestConfiguration(true);
            using (var session = config.BeginSession()) {
                var thing = new ThingWithLongPrimaryKey { Name = "Foo" };
                var inserts = session.Insert(thing);
                Assert.Equal(1, inserts);
                Assert.Equal(1, thing.Id);

                var secondThing = new ThingWithLongPrimaryKey { Name = "Bar" };
                var insertsSecond = session.Insert(secondThing);
                Assert.Equal(1, insertsSecond);
                Assert.Equal(2, secondThing.Id);
            }
        }