NewGaoKaoApi/New_College.Services/TopicServices.cs

33 lines
843 B
C#
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

using New_College.Common;
using New_College.IRepository.Base;
using New_College.IServices;
using New_College.Model.Models;
using New_College.Services.BASE;
using System.Collections.Generic;
using System.Threading.Tasks;
namespace New_College.Services
{
public class TopicServices: BaseServices<Topic>, ITopicServices
{
IBaseRepository<Topic> _dal;
public TopicServices(IBaseRepository<Topic> dal)
{
this._dal = dal;
base.BaseDal = dal;
}
/// <summary>
/// 获取开Bug专题分类缓存
/// </summary>
/// <returns></returns>
[Caching(AbsoluteExpiration = 60)]
public async Task<List<Topic>> GetTopics()
{
return await base.Query(a => !a.tIsDelete && a.tSectendDetail == "tbug");
}
}
}