Browse Source

code fixed

pull/2920/head
Akın Sabri Çam 7 years ago
parent
commit
da6f72333e
  1. 1
      modules/blogging/src/Volo.Blogging.Application.Contracts/Volo/Blogging/Posts/PostWithDetailsDto.cs
  2. 2
      modules/blogging/src/Volo.Blogging.Domain.Shared/Volo/Blogging/Blogs/BlogConsts.cs
  3. 9
      modules/blogging/src/Volo.Blogging.MongoDB/Volo/Blogging/Posts/MongoPostRepository.cs

1
modules/blogging/src/Volo.Blogging.Application.Contracts/Volo/Blogging/Posts/PostWithDetailsDto.cs

@ -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;

2
modules/blogging/src/Volo.Blogging.Domain.Shared/Volo/Blogging/Blogs/BlogConsts.cs

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

9
modules/blogging/src/Volo.Blogging.MongoDB/Volo/Blogging/Posts/MongoPostRepository.cs

@ -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