public void Insert_with_default_value_from_sequence()
        {
            using (var testStore = NpgsqlTestStore.Create(DatabaseName))
            {
                using (var context = new BlogContextDefaultValue(testStore.Name))
                {
                    context.Database.EnsureCreated();

                    context.AddRange(new Blog {
                        Name = "One Unicorn"
                    }, new Blog {
                        Name = "Two Unicorns"
                    });

                    context.SaveChanges();
                }

                using (var context = new BlogContextDefaultValue(testStore.Name))
                {
                    var blogs = context.Blogs.OrderBy(e => e.Id).ToList();

                    Assert.Equal(77, blogs[0].Id);
                    Assert.Equal(78, blogs[1].Id);
                }
            }
        }
        public void Insert_with_default_value_from_sequence()
        {
            using (var testStore = MySqlTestStore.CreateInitialized(DatabaseName))
            {
                using (var context = new BlogContextDefaultValue(testStore.Name))
                {
                    context.Database.EnsureCreatedResiliently();

                    context.AddRange(
                        new Blog
                    {
                        Name = "One Unicorn"
                    }, new Blog
                    {
                        Name = "Two Unicorns"
                    });

                    context.SaveChanges();
                }

                using (var context = new BlogContextDefaultValue(testStore.Name))
                {
                    var blogs = context.Blogs.OrderBy(e => e.Id).ToList();

                    Assert.Equal(0, blogs[0].Id);
                    Assert.Equal(1, blogs[1].Id);
                }

                using (var context = new BlogContextDefaultValueNoMigrations(testStore.Name))
                {
                    context.AddRange(
                        new Blog
                    {
                        Name = "One Unicorn"
                    }, new Blog
                    {
                        Name = "Two Unicorns"
                    });

                    context.SaveChanges();
                }

                using (var context = new BlogContextDefaultValueNoMigrations(testStore.Name))
                {
                    var blogs = context.Blogs.OrderBy(e => e.Id).ToList();

                    Assert.Equal(0, blogs[0].Id);
                    Assert.Equal(1, blogs[1].Id);
                    Assert.Equal(2, blogs[2].Id);
                    Assert.Equal(3, blogs[3].Id);
                }
            }
        }