From 7089bee264fe71c4a38424e7e175914eb9f31a64 Mon Sep 17 00:00:00 2001 From: Hamid Reza Mohammadi Date: Tue, 4 May 2021 12:05:25 +0430 Subject: [PATCH] fixing poets order --- RMuseum/Services/Implementation/GanjoorService.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/RMuseum/Services/Implementation/GanjoorService.cs b/RMuseum/Services/Implementation/GanjoorService.cs index 837fa337..a4793643 100644 --- a/RMuseum/Services/Implementation/GanjoorService.cs +++ b/RMuseum/Services/Implementation/GanjoorService.cs @@ -45,8 +45,7 @@ namespace RMuseum.Services.Implementation (from poet in _context.GanjoorPoets join cat in _context.GanjoorCategories.Where(c => c.ParentId == null) on poet.Id equals cat.PoetId - where !websitePoets || poet.Id < 200 - orderby poet.Name descending + where poet.Published select new GanjoorPoetViewModel() { Id = poet.Id, @@ -62,7 +61,7 @@ namespace RMuseum.Services.Implementation .ToListAsync(); StringComparer fa = StringComparer.Create(new CultureInfo("fa-IR"), true); - res.Sort((a, b) => fa.Compare(a.Name, b.Name)); + res.Sort((a, b) => fa.Compare(a.Nickname, b.Nickname)); return new RServiceResult (