DbDeleteExpression.cs 922 B

1234567891011121314151617181920212223242526272829303132333435
  1. using Ant.Common;
  2. using Ant.Utility;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Linq;
  6. using System.Text;
  7. namespace Ant.DbExpressions
  8. {
  9. public class DbDeleteExpression : DbExpression
  10. {
  11. DbTable _table;
  12. DbExpression _condition;
  13. public DbDeleteExpression(DbTable table)
  14. : this(table, null)
  15. {
  16. }
  17. public DbDeleteExpression(DbTable table, DbExpression condition)
  18. : base(DbExpressionType.Delete, UtilConstants.TypeOfVoid)
  19. {
  20. AntUtils.CheckNull(table);
  21. this._table = table;
  22. this._condition = condition;
  23. }
  24. public DbTable Table { get { return this._table; } }
  25. public DbExpression Condition { get { return this._condition; } }
  26. public override T Accept<T>(DbExpressionVisitor<T> visitor)
  27. {
  28. return visitor.Visit(this);
  29. }
  30. }
  31. }