コード例 #1
0
 public void ShouldTranslateDeleteExpressionWithAliasedTarget()
 {
     if (GetType() == typeof(SQLiteExpressionSyntaxTests))
         return;
     var dbDeleteQuery = new DbDeleteQuery();
     var expression = dbDeleteQuery.Delete(e => e.Table("SomeTable", "t0"))
         .Where(e => e.Column("t0", "SomeColumn") == e.Constant(1));
     var result = QueryTranslator.Translate(expression);
     Assert.AreEqual(DeleteExpressionWithAliasedTargetSyntax.Clean(), result.Sql.Clean());
 }
コード例 #2
0
 public void ShouldTranslateDeleteExpression()
 {
     var dbDeleteQuery = new DbDeleteQuery();
        var expression = dbDeleteQuery.Delete(e => e.Table("SomeTable"))
         .Where(e => e.Column("SomeColumn") == e.Constant(1));
     var result = QueryTranslator.Translate(expression);
     Assert.AreEqual(DeleteExpressionSyntax.Clean(), result.Sql.Clean());
 }