C# Class DotNetClub.Core.Service.TopicService

Inheritance: ServiceBase
显示文件 Open project: scheshan/DotNetClub Class Usage Examples

Private Properties

Property Type Description

Public Methods

Method Description
Add ( SaveTopicModel model ) : Task>

创建主题

Delete ( long id ) : Task

删除主题

Edit ( long id, SaveTopicModel model ) : Task>

编辑主题

Get ( long id ) : Task

获取指定ID的主题

IncreaseVisit ( long topicID ) : void
Query ( int pageIndex, int pageSize, string category = null, string keywords = null, bool isRecommand = null, bool isTop = null ) : Task>
QueryByUser ( long userID, int count ) : Task>

查询用户创建的主题,返回指定数量的数据

QueryByUser ( long userID, int pageIndex, int pageSize ) : Task>

查询用户创建的主题,返回分页数据

QueryByUserCollect ( long userID, int pageIndex, int pageSize ) : Task>
QueryByUserComment ( long userID, int count ) : Task>

查询用户最新评论的主题

QueryByUserComment ( long userID, int pageIndex, int pageSize ) : Task>

查询用户最新评论的主题,返回分页数据

QueryNoComment ( int count ) : Task>
SetLock ( long id ) : Task>

设置主题锁定状态

SetRecommand ( long id ) : Task>

设置主题精华

SetTop ( long id ) : Task>

设置主题置顶

TopicService ( IServiceProvider serviceProvider, CategoryService categoryService ) : DotNetClub.Domain.Entity
Transform ( ) : Task>

Method Details

Add() public method

创建主题
public Add ( SaveTopicModel model ) : Task>
model DotNetClub.Core.Model.Topic.SaveTopicModel
return Task>

Delete() public method

删除主题
public Delete ( long id ) : Task
id long
return Task

Edit() public method

编辑主题
public Edit ( long id, SaveTopicModel model ) : Task>
id long
model DotNetClub.Core.Model.Topic.SaveTopicModel
return Task>

Get() public method

获取指定ID的主题
public Get ( long id ) : Task
id long
return Task

IncreaseVisit() public method

public IncreaseVisit ( long topicID ) : void
topicID long
return void

Query() public method

public Query ( int pageIndex, int pageSize, string category = null, string keywords = null, bool isRecommand = null, bool isTop = null ) : Task>
pageIndex int
pageSize int
category string
keywords string
isRecommand bool
isTop bool
return Task>

QueryByUser() public method

查询用户创建的主题,返回指定数量的数据
public QueryByUser ( long userID, int count ) : Task>
userID long
count int
return Task>

QueryByUser() public method

查询用户创建的主题,返回分页数据
public QueryByUser ( long userID, int pageIndex, int pageSize ) : Task>
userID long
pageIndex int
pageSize int
return Task>

QueryByUserCollect() public method

public QueryByUserCollect ( long userID, int pageIndex, int pageSize ) : Task>
userID long
pageIndex int
pageSize int
return Task>

QueryByUserComment() public method

查询用户最新评论的主题
public QueryByUserComment ( long userID, int count ) : Task>
userID long
count int
return Task>

QueryByUserComment() public method

查询用户最新评论的主题,返回分页数据
public QueryByUserComment ( long userID, int pageIndex, int pageSize ) : Task>
userID long
pageIndex int
pageSize int
return Task>

QueryNoComment() public method

public QueryNoComment ( int count ) : Task>
count int
return Task>

SetLock() public method

设置主题锁定状态
public SetLock ( long id ) : Task>
id long
return Task>

SetRecommand() public method

设置主题精华
public SetRecommand ( long id ) : Task>
id long
return Task>

SetTop() public method

设置主题置顶
public SetTop ( long id ) : Task>
id long
return Task>

TopicService() public method

public TopicService ( IServiceProvider serviceProvider, CategoryService categoryService ) : DotNetClub.Domain.Entity
serviceProvider IServiceProvider
categoryService CategoryService
return DotNetClub.Domain.Entity

Transform() public method

public Transform ( ) : Task>
return Task>