C# Class Blog.Logic.Core.CommentsLogic

Inheritance: ICommentsLogic
Show file Open project: jsnmgpnty/Blogness2.0

Public Methods

Method Description
Add ( Comment comment ) : Comment
CommentsLogic ( ICommentRepository commentRepository, IUserRepository userRepository ) : System
Delete ( int commentId ) : bool
Get ( int commentId ) : Comment
GetByPostId ( int postId ) : List
GetByUser ( int userId ) : List
GetReplies ( int commentId ) : List
GetTopComments ( int postId, int commentsCount ) : List
SearchComments ( string query, int threshold = 10, int skip = 10 ) : List

Method Details

Add() public method

public Add ( Comment comment ) : Comment
comment Blog.Common.Contracts.Comment
return Blog.Common.Contracts.Comment

CommentsLogic() public method

public CommentsLogic ( ICommentRepository commentRepository, IUserRepository userRepository ) : System
commentRepository ICommentRepository
userRepository IUserRepository
return System

Delete() public method

public Delete ( int commentId ) : bool
commentId int
return bool

Get() public method

public Get ( int commentId ) : Comment
commentId int
return Blog.Common.Contracts.Comment

GetByPostId() public method

public GetByPostId ( int postId ) : List
postId int
return List

GetByUser() public method

public GetByUser ( int userId ) : List
userId int
return List

GetReplies() public method

public GetReplies ( int commentId ) : List
commentId int
return List

GetTopComments() public method

public GetTopComments ( int postId, int commentsCount ) : List
postId int
commentsCount int
return List

SearchComments() public method

public SearchComments ( string query, int threshold = 10, int skip = 10 ) : List
query string
threshold int
skip int
return List