public static void NestedStructTests()
        {
            var x = new NestedStruct
            {
                Foo = new Foo
                {
                    Name   = "Sandro Magi",
                    Simple = new Simple
                    {
                        Bar = 33,
                        Baz = "hello world!",
                    }
                },
            };
            var db   = Open();
            var xkey = db.Insert(x);
            var rt   = db.Lookup(xkey, new NestedStruct());

            Assert.Equal(x.Id, rt.Id);
            Assert.Equal(x.Foo.Name, rt.Foo.Name);
            Assert.Equal(x.Foo.Simple.Bar, rt.Foo.Simple.Bar);
            Assert.Equal(x.Foo.Simple.Baz, rt.Foo.Simple.Baz);
        }
        public static void NestedStructTests()
        {
            var x = new NestedStruct
            {
                Id  = int.MaxValue / 2,
                Foo = new Foo
                {
                    Name   = "Sandro Magi",
                    Simple = new Simple
                    {
                        Bar = 33,
                        Baz = "hello world!",
                    }
                },
            };
            var e = Entity <NestedStruct> .To(new Entity(), x);

            var rt = Entity <NestedStruct> .From(new NestedStruct(), e);

            Assert.Equal(x.Id, rt.Id);
            Assert.Equal(x.Foo.Name, rt.Foo.Name);
            Assert.Equal(x.Foo.Simple.Bar, rt.Foo.Simple.Bar);
            Assert.Equal(x.Foo.Simple.Baz, rt.Foo.Simple.Baz);
        }