You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
1.5 KiB

2 years ago
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq.Expressions;
  4. using System.Threading.Tasks;
  5. namespace SqlSugar
  6. {
  7. public interface IUpdateable<T> where T : class, new()
  8. {
  9. UpdateBuilder UpdateBuilder { get; set; }
  10. int ExecuteCommand();
  11. bool ExecuteCommandHasChange();
  12. Task<int> ExecuteCommandAsync();
  13. Task<bool> ExecuteCommandHasChangeAsync();
  14. IUpdateable<T> AS(string tableName);
  15. IUpdateable<T> With(string lockString);
  16. IUpdateable<T> Where(bool isNoUpdateNull,bool IsOffIdentity = false);
  17. IUpdateable<T> Where(Expression<Func<T, bool>> expression);
  18. /// <summary>
  19. /// Non primary key entity update function
  20. /// </summary>
  21. /// <param name="columns"></param>
  22. /// <returns></returns>
  23. IUpdateable<T> WhereColumns(Expression<Func<T, object>> columns);
  24. IUpdateable<T> UpdateColumns(Expression<Func<T, object>> columns);
  25. IUpdateable<T> UpdateColumns(Expression<Func<T, bool>> columns);
  26. IUpdateable<T> UpdateColumns(Func<string, bool> updateColumMethod);
  27. IUpdateable<T> UpdateColumns(Expression<Func<T, T>> columns);
  28. IUpdateable<T> IgnoreColumns(Expression<Func<T, object>> columns);
  29. IUpdateable<T> IgnoreColumns(Func<string, bool> ignoreColumMethod);
  30. IUpdateable<T> ReSetValue(Expression<Func<T, bool>> setValueExpression);
  31. IUpdateable<T> RemoveDataCache();
  32. KeyValuePair<string,List<SugarParameter>> ToSql();
  33. }
  34. }