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