forked from anjoy8/Blog.Core
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathTopicServices.cs
More file actions
32 lines (28 loc) · 831 Bytes
/
TopicServices.cs
File metadata and controls
32 lines (28 loc) · 831 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
using Blog.Core.Common;
using Blog.Core.IRepository.Base;
using Blog.Core.IServices;
using Blog.Core.Model.Models;
using Blog.Core.Services.BASE;
using System.Collections.Generic;
using System.Threading.Tasks;
namespace Blog.Core.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");
}
}
}