AppendWhere.cs 845 B

12345678910111213141516171819202122232425262728293031323334353637
  1. using Newtonsoft.Json.Linq;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Text;
  5. using System.Linq;
  6. namespace SqlSugar
  7. {
  8. /// <summary>
  9. /// AppendWhere
  10. /// </summary>
  11. public partial class JsonQueryableProvider : IJsonQueryableProvider<JsonQueryResult>
  12. {
  13. private void AppendWhere(JToken item)
  14. {
  15. BeforeWhere();
  16. var sqlObj = jsonCommonProvider.GetWhere(item, sugarQueryable.Context);
  17. sugarQueryable.Where(sqlObj.Key, sqlObj.Value);
  18. AfterWhere();
  19. }
  20. private void AfterWhere()
  21. {
  22. }
  23. private void BeforeWhere()
  24. {
  25. if (!IsExecutedBeforeWhereFunc)
  26. {
  27. BeforeWhereFunc();
  28. IsExecutedBeforeWhereFunc = true;
  29. }
  30. }
  31. }
  32. }