diff --git a/Apps/HackerNet.Web/Views/Shared/_LinkCard.cshtml b/Apps/HackerNet.Web/Views/Shared/_LinkCard.cshtml
index a07e432..2703567 100644
--- a/Apps/HackerNet.Web/Views/Shared/_LinkCard.cshtml
+++ b/Apps/HackerNet.Web/Views/Shared/_LinkCard.cshtml
@@ -4,4 +4,8 @@
@Model.Description
+
+
\ No newline at end of file
diff --git a/HackerNet.Infrastructure/Repositories/Memory/MemoryLinkRepository.cs b/HackerNet.Infrastructure/Repositories/Memory/MemoryLinkRepository.cs
index 7682607..40b9f10 100644
--- a/HackerNet.Infrastructure/Repositories/Memory/MemoryLinkRepository.cs
+++ b/HackerNet.Infrastructure/Repositories/Memory/MemoryLinkRepository.cs
@@ -21,12 +21,24 @@ public class MemoryLinkRepository : ILinkRepository, IReadStore
public LinkHomePage[] GetPublishedLinks()
{
- return _links.Select(l => new LinkHomePage
- {
- Id = l.Id,
- Url = l.Url,
- Description = l.Description,
- CommentsCount = 0,
- }).ToArray();
+ // return (from l in _links
+ // orderby l.CreatedAt descending
+ // select new LinkHomePage
+ // {
+ // Id = l.Id,
+ // Url = l.Url,
+ // Description = l.Description,
+ // CommentsCount = 0,
+ // }).ToArray();
+
+ return _links
+ .OrderByDescending(l => l.CreatedAt)
+ .Select(l => new LinkHomePage
+ {
+ Id = l.Id,
+ Url = l.Url,
+ Description = l.Description,
+ CommentsCount = 0,
+ }).ToArray();
}
}
\ No newline at end of file