12345678910111213141516171819202122232425262728293031 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
-
- namespace Luticate2.Utils.Dbo.Basic
- {
- public class LuPaginatedDbo<TDbo>
- {
- public long Count { get; set; }
-
- public List<TDbo> Data { get; set; }
-
- public LuPaginatedDbo<T> To<T>(Func<List<TDbo>, List<T>> convert)
- {
- return new LuPaginatedDbo<T>
- {
- Count = Count,
- Data = convert(Data)
- };
- }
-
- public LuPaginatedDbo<T> Select<T>(Func<TDbo, T> convert)
- {
- return new LuPaginatedDbo<T>
- {
- Count = Count,
- Data = Data.Select(convert).ToList()
- };
- }
- }
- }
|