Esempio 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());
            }
        }
Esempio 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());
            }
        }
Esempio 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());
                }
            });
        }
Esempio 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());
                    }
                });
        }