C# Class iBlog.Domain.Concrete.PostRepository

Inheritance: IPostRepository
Mostra file Open project: eshengsky/iBlog

Public Methods

Method Description
CheckAlias ( string alias, string uid ) : Task

判断alias是否唯一

Delete ( string postIds ) : Task

删除文章(软删除)

GetArticles ( int pageIndex, int pageSize, string sortName, string sortOrder, string searchText, string cateAlias, string uniqueId, string title ) : Task

获取文章管理页面列表

GetPostByAlias ( string id ) : Task

根据alias获取文章

GetPostById ( string id ) : Task

根据id获取文章

GetPosts ( string cateAlias, int pageIndex, int pageSize, SortBy sortBy = SortBy.Latest, FiltType filtType = FiltType.Content, string keyword = "" ) : Task

获取筛选条件下的所有文章

Insert ( Post post ) : System.Threading.Tasks.Task

新增文章

PostRepository ( ) : System
Update ( Post post ) : Task

更新文章

Private Methods

Method Description
GetPostCountByCate ( string cateAlias ) : Task

Method Details

CheckAlias() public method

判断alias是否唯一
public CheckAlias ( string alias, string uid ) : Task
alias string
uid string
return Task

Delete() public method

删除文章(软删除)
public Delete ( string postIds ) : Task
postIds string
return Task

GetArticles() public method

获取文章管理页面列表
public GetArticles ( int pageIndex, int pageSize, string sortName, string sortOrder, string searchText, string cateAlias, string uniqueId, string title ) : Task
pageIndex int
pageSize int
sortName string
sortOrder string
searchText string
cateAlias string
uniqueId string
title string
return Task

GetPostByAlias() public method

根据alias获取文章
public GetPostByAlias ( string id ) : Task
id string
return Task

GetPostById() public method

根据id获取文章
public GetPostById ( string id ) : Task
id string
return Task

GetPosts() public method

获取筛选条件下的所有文章
public GetPosts ( string cateAlias, int pageIndex, int pageSize, SortBy sortBy = SortBy.Latest, FiltType filtType = FiltType.Content, string keyword = "" ) : Task
cateAlias string
pageIndex int
pageSize int
sortBy SortBy
filtType FiltType
keyword string
return Task

Insert() public method

新增文章
public Insert ( Post post ) : System.Threading.Tasks.Task
post iBlog.Domain.Entities.Post
return System.Threading.Tasks.Task

PostRepository() public method

public PostRepository ( ) : System
return System

Update() public method

更新文章
public Update ( Post post ) : Task
post iBlog.Domain.Entities.Post
return Task