a blog index
This commit is contained in:
parent
bc3e3099b6
commit
2666492a18
10 changed files with 47 additions and 45 deletions
|
|
@ -67,7 +67,7 @@ namespace Yavsc.Controllers
|
|||
{
|
||||
string posterId = (await _context.Users.SingleOrDefaultAsync(u=>u.UserName == userName))?.Id ?? null ;
|
||||
var result = _context.UserPosts(posterId, User.Identity.Name);
|
||||
return View("Index", result.OrderByDescending(p => p.DateCreated).ToList().Skip(pageLen*pageNum).Take(pageLen).GroupBy(p=> p.Title ));
|
||||
return View("Index", result.ToArray().Skip(pageLen*pageNum).Take(pageLen).OrderByDescending(p => p.DateCreated).ToList().GroupBy(p=> p.Title ));
|
||||
}
|
||||
// GET: Blog/Details/5
|
||||
[AllowAnonymous]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue