C# 클래스 JustBlog.Core.BlogRepository

상속: IBlogRepository
파일 보기 프로젝트 열기: VJAI/JustBlog 1 사용 예제들

공개 메소드들

메소드 설명
AddCategory ( JustBlog.Core.Objects.Category category ) : int

Adds a new category.

AddPost ( JustBlog.Core.Objects.Post post ) : int

Adds a new post and returns the id.

AddTag ( JustBlog.Core.Objects.Tag tag ) : int

Add a new tag.

BlogRepository ( ISession session ) : System
Categories ( ) : IList

Return all the categories.

Category ( int id ) : JustBlog.Core.Objects.Category

Return category based on id.

Category ( string categorySlug ) : JustBlog.Core.Objects.Category

Return category based on url slug.

DeleteCategory ( int id ) : void

Delete a category permanently.

DeletePost ( int id ) : void

Delete the post permanently from database.

DeleteTag ( int id ) : void

Delete an existing tag permanently.

EditCategory ( JustBlog.Core.Objects.Category category ) : void

Update an existing category.

EditPost ( JustBlog.Core.Objects.Post post ) : void

Update an existing post.

EditTag ( JustBlog.Core.Objects.Tag tag ) : void

Edit an existing tag.

Post ( int id ) : JustBlog.Core.Objects.Post

Return post based on unique id.

Post ( int year, int month, string titleSlug ) : JustBlog.Core.Objects.Post

Return post based on the published year, month and title slug.

Posts ( int pageNo, int pageSize ) : IList

Return collection of posts based on pagination parameters.

Posts ( int pageNo, int pageSize, string sortColumn, bool sortByAscending ) : IList

Return posts based on pagination and sorting parameters.

PostsForCategory ( string categorySlug, int pageNo, int pageSize ) : IList

Return collection of posts belongs to a particular category.

PostsForSearch ( string search, int pageNo, int pageSize ) : IList

Return collection of posts that matches the search text.

PostsForTag ( string tagSlug, int pageNo, int pageSize ) : IList

Return collection of posts belongs to a particular tag.

Tag ( int id ) : JustBlog.Core.Objects.Tag

Return tag based on unique id.

Tag ( string tagSlug ) : JustBlog.Core.Objects.Tag

Return tag based on url slug.

Tags ( ) : IList

Return all the tags.

TotalCategories ( ) : int

Return total no. of categories.

TotalPosts ( bool checkIsPublished = true ) : int

Return total no. of all or published posts.

TotalPostsForCategory ( string categorySlug ) : int

Return total no. of posts belongs to a particular category.

TotalPostsForSearch ( string search ) : int

Return total no. of posts that matches the search text.

TotalPostsForTag ( string tagSlug ) : int

Return total no. of posts belongs to a particular tag.

TotalTags ( ) : int

Return total no. of tags.

메소드 상세

AddCategory() 공개 메소드

Adds a new category.
public AddCategory ( JustBlog.Core.Objects.Category category ) : int
category JustBlog.Core.Objects.Category
리턴 int

AddPost() 공개 메소드

Adds a new post and returns the id.
public AddPost ( JustBlog.Core.Objects.Post post ) : int
post JustBlog.Core.Objects.Post
리턴 int

AddTag() 공개 메소드

Add a new tag.
public AddTag ( JustBlog.Core.Objects.Tag tag ) : int
tag JustBlog.Core.Objects.Tag
리턴 int

BlogRepository() 공개 메소드

public BlogRepository ( ISession session ) : System
session ISession
리턴 System

Categories() 공개 메소드

Return all the categories.
public Categories ( ) : IList
리턴 IList

Category() 공개 메소드

Return category based on id.
public Category ( int id ) : JustBlog.Core.Objects.Category
id int Category id
리턴 JustBlog.Core.Objects.Category

Category() 공개 메소드

Return category based on url slug.
public Category ( string categorySlug ) : JustBlog.Core.Objects.Category
categorySlug string Category's url slug
리턴 JustBlog.Core.Objects.Category

DeleteCategory() 공개 메소드

Delete a category permanently.
public DeleteCategory ( int id ) : void
id int
리턴 void

DeletePost() 공개 메소드

Delete the post permanently from database.
public DeletePost ( int id ) : void
id int
리턴 void

DeleteTag() 공개 메소드

Delete an existing tag permanently.
public DeleteTag ( int id ) : void
id int
리턴 void

EditCategory() 공개 메소드

Update an existing category.
public EditCategory ( JustBlog.Core.Objects.Category category ) : void
category JustBlog.Core.Objects.Category
리턴 void

EditPost() 공개 메소드

Update an existing post.
public EditPost ( JustBlog.Core.Objects.Post post ) : void
post JustBlog.Core.Objects.Post
리턴 void

EditTag() 공개 메소드

Edit an existing tag.
public EditTag ( JustBlog.Core.Objects.Tag tag ) : void
tag JustBlog.Core.Objects.Tag
리턴 void

Post() 공개 메소드

Return post based on unique id.
public Post ( int id ) : JustBlog.Core.Objects.Post
id int Post unique id
리턴 JustBlog.Core.Objects.Post

Post() 공개 메소드

Return post based on the published year, month and title slug.
public Post ( int year, int month, string titleSlug ) : JustBlog.Core.Objects.Post
year int Published year
month int Published month
titleSlug string Post's url slug
리턴 JustBlog.Core.Objects.Post

Posts() 공개 메소드

Return collection of posts based on pagination parameters.
public Posts ( int pageNo, int pageSize ) : IList
pageNo int Page index
pageSize int Page size
리턴 IList

Posts() 공개 메소드

Return posts based on pagination and sorting parameters.
public Posts ( int pageNo, int pageSize, string sortColumn, bool sortByAscending ) : IList
pageNo int Page index
pageSize int Page size
sortColumn string Sort column name
sortByAscending bool True to sort by ascending
리턴 IList

PostsForCategory() 공개 메소드

Return collection of posts belongs to a particular category.
public PostsForCategory ( string categorySlug, int pageNo, int pageSize ) : IList
categorySlug string Category's url slug
pageNo int Page index
pageSize int Page size
리턴 IList

PostsForSearch() 공개 메소드

Return collection of posts that matches the search text.
public PostsForSearch ( string search, int pageNo, int pageSize ) : IList
search string search text
pageNo int Page index
pageSize int Page size
리턴 IList

PostsForTag() 공개 메소드

Return collection of posts belongs to a particular tag.
public PostsForTag ( string tagSlug, int pageNo, int pageSize ) : IList
tagSlug string Tag's url slug
pageNo int Page index
pageSize int Page size
리턴 IList

Tag() 공개 메소드

Return tag based on unique id.
public Tag ( int id ) : JustBlog.Core.Objects.Tag
id int
리턴 JustBlog.Core.Objects.Tag

Tag() 공개 메소드

Return tag based on url slug.
public Tag ( string tagSlug ) : JustBlog.Core.Objects.Tag
tagSlug string
리턴 JustBlog.Core.Objects.Tag

Tags() 공개 메소드

Return all the tags.
public Tags ( ) : IList
리턴 IList

TotalCategories() 공개 메소드

Return total no. of categories.
public TotalCategories ( ) : int
리턴 int

TotalPosts() 공개 메소드

Return total no. of all or published posts.
public TotalPosts ( bool checkIsPublished = true ) : int
checkIsPublished bool True to count only published posts
리턴 int

TotalPostsForCategory() 공개 메소드

Return total no. of posts belongs to a particular category.
public TotalPostsForCategory ( string categorySlug ) : int
categorySlug string Category's url slug
리턴 int

TotalPostsForSearch() 공개 메소드

Return total no. of posts that matches the search text.
public TotalPostsForSearch ( string search ) : int
search string search text
리턴 int

TotalPostsForTag() 공개 메소드

Return total no. of posts belongs to a particular tag.
public TotalPostsForTag ( string tagSlug ) : int
tagSlug string Tag's url slug
리턴 int

TotalTags() 공개 메소드

Return total no. of tags.
public TotalTags ( ) : int
리턴 int