Blazor第7天_Blazor自訂元件實作_共用分頁元件
用來儲存每一頁要顯示特定筆數分頁結果的資料結構 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 using System ; using System.Collections.Generic ; using System.Text ; namespace Common.Pagination { /// <summary> /// TODO:分頁機制:Add by Samuel 用來儲存每一頁要顯示特定筆數分頁結果的資料結構 /// </summary> /// <typeparam name="T"></typeparam> public struct PagingResult <T> { public IEnumerable<T> Records { get ; set ; } public int TotalRecords { get ; set ; } public PagingResult (IEnumerable<T> items, int totalRecords) { Records = items; TotalRecords = totalRecords; } } } 儲存下面分頁元件的資料結構 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 using System ; using System.Collections.Generic ; using System.Text ; namespace Co...