AppendPage.cs 699 B

12345678910111213141516171819202122232425262728
  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. /// AppendPage
  10. /// </summary>
  11. public partial class JsonQueryableProvider : IJsonQueryableProvider<JsonQueryResult>
  12. {
  13. private int AppendPageSize(JToken item)
  14. {
  15. return Convert.ToInt32(item.First().ToString().ObjToInt());
  16. }
  17. private int AppendPageNumber(JToken item)
  18. {
  19. var result = Convert.ToInt32(item.First().ToString().ObjToInt());
  20. if (result == 0)
  21. {
  22. result = 1;
  23. }
  24. return result;
  25. }
  26. }
  27. }