OrderBy - Rest API

Hi folkz, just having some trouble with the final piece of my REST API which is allowing Sort.

When I use Linq.Dynamic.Core and pass the filter args, it works just fine. When I do the same for OrderBy, I get

System.ArgumentException: 'Instance property 'Name asc' is not defined for type 'Server.Entity.Role' (Parameter 'propertyName')'

My table simply has an Id and a Name col for now.

my code

            if (!string.IsNullOrEmpty(filter))
                data = data.Where(filter);

            if (!string.IsNullOrEmpty(OrderBy))
                data = data.OrderBy(OrderBy);

    <RadzenDataGrid @ref="grid" IsLoading=@isLoading Count="@count" Data="@_data" LoadData="@LoadData" FilterMode="FilterMode.Simple"
                    AllowSorting="true" AllowFiltering="true" AllowPaging="true" FilterCaseSensitivity="FilterCaseSensitivity.CaseInsensitive"
                    PageSize="10" PagerHorizontalAlign="HorizontalAlign.Center" TItem="RoleModel" ColumnWidth="200px">
            <RadzenDataGridColumn TItem="RoleModel" Property="Id" Filterable="false" Title="Id" Frozen="true" Width="70px" TextAlign="TextAlign.Center" />
            <RadzenDataGridColumn TItem="RoleModel" Property="Name" SortProperty="Name" Title="Name" Frozen="true" Width="140px" />

If you REST API is not OData you cannot sort it.

ok, thank you for the quick response