EntityExtentions.cs 707 B

12345678910111213141516171819202122232425262728
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Runtime.CompilerServices;
  5. using System.Text;
  6. using System.Threading;
  7. namespace NXWMS.Client.Code.Extends
  8. {
  9. /// <summary>
  10. /// 实体扩展
  11. /// </summary>
  12. public static class EntityExtentions
  13. {
  14. /// <summary>
  15. /// 追加并且又返回值
  16. /// </summary>
  17. /// <typeparam name="T"></typeparam>
  18. /// <param name="tEntity"></param>
  19. /// <param name="data"></param>
  20. /// <returns></returns>
  21. public static List<T> Add<T>(this List<T> tEntity,T data) where T : class
  22. {
  23. tEntity.Add(data);
  24. return tEntity;
  25. }
  26. }
  27. }