Exemplo n.º 1
0
        public void DbContext_timeout_is_used_for_updates()
        {
            using (var context = new TimeoutContext())
            {
                context.Database.CommandTimeout = 66;

                using (context.Database.BeginTransaction())
                {
                    context.Space.Add(new SomeSpace());
                    context.SaveChanges();
                }

                Assert.Equal("66", GetLoggedTimeout());
            }
        }
Exemplo n.º 2
0
        public void DbContext_timeout_is_used_for_updates()
        {
            using (var context = new TimeoutContext())
            {
                context.Database.CommandTimeout = 66;

                using (context.Database.BeginTransaction())
                {
                    context.Space.Add(new SomeSpace());
                    context.SaveChanges();
                }

                Assert.Equal("66", GetLoggedTimeout());
            }
        }
Exemplo n.º 3
0
        public void DbContext_timeout_is_used_for_updates()
        {
            ExtendedSqlAzureExecutionStrategy.ExecuteNew(
                () =>
            {
                using (var context = new TimeoutContext())
                {
                    context.Database.CommandTimeout = 66;

                    using (context.Database.BeginTransaction())
                    {
                        context.Space.Add(new SomeSpace());
                        context.SaveChanges();
                    }

                    Assert.Equal("66", GetLoggedTimeout());
                }
            });
        }
Exemplo n.º 4
0
        public void DbContext_timeout_is_used_for_updates()
        {
            ExtendedSqlAzureExecutionStrategy.ExecuteNew(
                () =>
                {
                    using (var context = new TimeoutContext())
                    {
                        context.Database.CommandTimeout = 66;

                        using (context.Database.BeginTransaction())
                        {
                            context.Space.Add(new SomeSpace());
                            context.SaveChanges();
                        }

                        Assert.Equal("66", GetLoggedTimeout());
                    }
                });
        }