初始提交

This commit is contained in:
wanyongkang
2020-10-07 20:25:03 +08:00
commit d318014316
3809 changed files with 263103 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
using Hncore.Infrastructure.Service;
using Hncore.Pass.Vpn.Domain;
using Microsoft.AspNetCore.Http;
using Microsoft.EntityFrameworkCore;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace Hncore.Pass.Vpn.Service
{
public partial class ArticleService : ServiceBase<ArticleEntity>, IFindService
{
CourseContext m_DbContext;
public ArticleService(CourseContext dbContext, IHttpContextAccessor httpContextAccessor) : base(dbContext, httpContextAccessor)
{
m_DbContext = dbContext;
}
public async Task<List<ArticleEntity>> GetTop(int top, ArticleCatalog catalog)
{
return await this.Query(m => m.CatalogId == catalog).Take(top).ToListAsync();
}
}
}