Blazor 如何在 table 中排序或递增数据

Blazor how to order or asc a data in table

Hi i want to display simple table in my blazor and order the data according to date,

        <tbody>
            @foreach (var received in Rec)
             {
                                                 
               <tr>
                 <td>@received.DocumentType</td>
                 <td>@received.SenderName</td>
                 <td>@received.Subject</td>
                 <td>@received.Date</td>
                 <td>@received.Forwarded</td>
                 <td>@received.Remarks</td>
               </tr>
                }

            


       </tbody>
   

使用 Linq...

@using System.Linq

@foreach (var received in Rec.OrderBy(a => a.Date))
{
 ...
}