forked from anjoy8/Blog.Core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTopicServices.cs
35 lines (31 loc) · 866 Bytes
/
TopicServices.cs
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
33
34
35
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Blog.Core.Common;
using Blog.Core.IRepository;
using Blog.Core.IServices;
using Blog.Core.Model.Models;
using Blog.Core.Services.BASE;
namespace Blog.Core.Services
{
public class TopicServices: BaseServices<Topic>, ITopicServices
{
ITopicRepository _dal;
public TopicServices(ITopicRepository 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");
}
}
}