AppendFrom.cs 839 B

123456789101112131415161718192021222324252627282930
  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. /// AppendFrom
  10. /// </summary>
  11. public partial class JsonQueryableProvider : IJsonQueryableProvider<JsonQueryResult>
  12. {
  13. private void AppendFrom(JToken item)
  14. {
  15. var tableNameInfo=jsonCommonProvider.GetTableName(item);
  16. tableNameInfo.TableName.ToCheckField();
  17. AddMasterTableInfos(tableNameInfo);
  18. if (tableNameInfo.ShortName.HasValue())
  19. {
  20. this.sugarQueryable.AS(tableNameInfo.TableName, tableNameInfo.ShortName);
  21. }
  22. else
  23. {
  24. this.sugarQueryable.AS(tableNameInfo.TableName, tableNameInfo.ShortName);
  25. }
  26. }
  27. }
  28. }