In asp.net-core controller I sort descending model collection by BirthDate property and return it to the view. While debugging prepared order is respected, but before showing view table changes sort direction to ascending again.
Is there a way to set default sort order from ascending to descending for table column just by applying Bootstrap classes in Razor view?
<table id="table" class="table table-striped table-bordered" style="width:100%">
<thead>
<tr>
<th>Birth date</th>
<th>Name</th>
</tr>
</thead>
<tbody>
@foreach (var person in Model)
{
<tr>
<td>@person.BirthDate</td>
<td>@person.Name</td>
</tr>
}
</tbody>
</table>
What is the simplest way to accomplish that?