The main objective of the article is: Sorting Add Sorting Changes To HTTP GET Endpoint In API Project: Let's create a DTO(Data Transfer Object) like 'SuperHeroFilterDto' in 'Dtos' folder(new folder). API_Project/Dtos/SuperHeroFilterDto.cs: namespace Dot7.Api.Dtos { public class SuperHeroFiltersDto { public string? Sort { get; set; } public string? OrderBy { get; set; } } } The 'Sort' property can have a column name by which we want to sort. The 'OrderBy' property can have value like 'Asc' & 'Desc'. Update the 'GetSuperHeroesAsync' method in the 'ISuperHeroesService' API_Project/Services/ISuperHeroesService.cs: Task<List<SuperHeroes>> GetSuperHeroesAsync(SuperHeroFiltersDto filters); Now implement the sorting logic in our 'SuperHeroesService.cs'. API_Project/Services/SuperHeroes Service .cs: public async Task<List<SuperHeroes>> GetSuperHeroesAsync(Sup