教程帮助界面更改
This commit is contained in:
@@ -9,6 +9,7 @@ using Hncore.Infrastructure.EntitiesExtension;
|
||||
using System.Threading.Tasks;
|
||||
using System.Linq;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Hncore.Infrastructure.WebApi;
|
||||
|
||||
namespace Home.Controllers
|
||||
{
|
||||
@@ -65,18 +66,19 @@ namespace Home.Controllers
|
||||
|
||||
|
||||
[HttpGet]
|
||||
public async Task<IActionResult> Info(int id)
|
||||
public async Task<ApiResult> Info(int id)
|
||||
{
|
||||
var prev = await m_ArticleServce.Query(m => m.Id < id).OrderByDescending(m => m.Id).FirstOrDefaultAsync();
|
||||
var ret = await m_ArticleServce.GetById(id);
|
||||
var next = await m_ArticleServce.Query(m => m.Id > id).OrderBy(m => m.Id).FirstOrDefaultAsync();
|
||||
return View(new ArticleInfoMode()
|
||||
var data = new ArticleInfoMode()
|
||||
{
|
||||
|
||||
Prev = prev,
|
||||
Info = ret,
|
||||
Next = next
|
||||
});
|
||||
};
|
||||
return new ApiResult(data);
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
|
||||
Reference in New Issue
Block a user