Пример #1
0
 public void SingleDeleteWorks() {
     var deleteWriter = new DeleteWriter(new SqlServerDialect(), MakeConfig());
     var post = new Post { PostId = 1 };
     var result = deleteWriter.GenerateSql(new[] { post });
     Debug.Write(result.Sql);
     Assert.Equal("delete from [Posts] where [PostId] in (@p_1)", result.Sql);
 }
Пример #2
0
        public void SingleDeleteWorks()
        {
            var deleteWriter = new DeleteWriter(new SqlServerDialect(), MakeConfig());
            var post         = new Post {
                PostId = 1
            };
            var result = deleteWriter.GenerateSql(new[] { post });

            Debug.Write(result.Sql);
            Assert.Equal("delete from [Posts] where [PostId] in (@p_1)", result.Sql);
        }
Пример #3
0
 public void EmptyDeleteThrows() {
     var deleteWriter = new DeleteWriter(new SqlServerDialect(), MakeConfig());
     Assert.Throws<ArgumentOutOfRangeException>(() => deleteWriter.GenerateSql(new Post[0]));
 }
Пример #4
0
        public void EmptyDeleteThrows()
        {
            var deleteWriter = new DeleteWriter(new SqlServerDialect(), MakeConfig());

            Assert.Throws <ArgumentOutOfRangeException>(() => deleteWriter.GenerateSql(new Post[0]));
        }