Trying to sort data in a DataView but nothing happening
===

I have a DataSet which was holding data that I had extracted from a database table. Relevant excerpts from the controller and model can be seen below

Controller:

    DataSet ds = new DataSet();
    adapter.Fill(ds,currentIndex,(int)pageSize,"LD_USER_ROLE");                            
    conn.Close();                  
    return View(ds);

View:

    @using System.Data
    @model System.Data.DataSet

    <table>
    @foreach (DataRow row in Model.Tables[0].Rows)
    {
        <tr>            
            
            @foreach (DataColumn column in Model.Tables[0].Columns)
            {                
                        <td>@row[column]</td>                 
            }
    </tr>        
    }
    </table>
    
I wanted to alter the code so that the table produced in the view would be sorted by the USERNAME column. To do this I placed the data in a dataview and used the sort method. I then passed the dataview into the view instead of the dataset. When I do this however I end up with the exact same unsorted table as before. What am I doing wrong?

Controller:

    DataSet ds = new DataSet();
    adapter.Fill(ds,currentIndex,(int)pageSize,"LD_USER_ROLE");
    DataView dv = ds.Tables[0].DefaultView;
    dv.Sort = "USERNAME ASC";                            
    conn.Close();                  
    return View(dv);

View:

    @using System.Data
    @model System.Data.DataView

    <table>
    @foreach (DataRow row in Model.Table.Rows)
    {
        <tr>            
            
            @foreach (DataColumn column in Model.Table.Columns)
            {                
                        <td>@row[column]</td>                 
            }
    </tr>        
    }
    </table>