pull/2920/head
Akın Sabri Çam 6 years ago
parent 40e8165d1d
commit da6f72333e

@ -1,6 +1,5 @@
using System;
using System.Collections.Generic;
using System.Reflection;
using JetBrains.Annotations;
using Volo.Abp.Application.Dtos;
using Volo.Blogging.Tagging.Dtos;

@ -7,7 +7,5 @@
public const int MaxShortNameLength = 32;
public const int MaxDescriptionLength = 1024;
public const string BlogName = "blog";
}
}

@ -33,9 +33,14 @@ namespace Volo.Blogging.Posts
return post;
}
public Task<List<Post>> GetOrderedList(Guid blogId, bool @descending = false)
public async Task<List<Post>> GetOrderedList(Guid blogId, bool @descending = false)
{
throw new NotImplementedException();
if (!descending)
{
return await GetMongoQueryable().Where(x => x.BlogId == blogId).OrderByDescending(x => x.CreationTime).ToListAsync();
}
return await GetMongoQueryable().Where(x => x.BlogId == blogId).OrderByDescending(x => x.CreationTime).ToListAsync();
}
}
}

Loading…
Cancel
Save