C# Class Ru.GameSchool.BusinessLayer.Services.SocialService

Service class that abstracts the interraction around the comment entity with the data layer.
Inheritance: BaseService
Datei anzeigen Open project: davidein/Ru.GameSchool Class Usage Examples

Public Methods

Method Description
CreateComment ( Comment comment ) : void

Gets an instance of a comment object through parameter of the function, if the object isn't null persist it to the datasource.

CreateLike ( CommentLike commentLike ) : void

Gets an instance of a commentlike object through parameter of the function, if the object isn't null persist it to the datasource.

DeleteComment ( int commentId ) : void

Gets an integer value of a comment object to remove from the datasource, if the id is equal or larger then 1 then remove it.

DeleteLike ( int commentLikeId ) : void

Gets an integer value of a commentlike object to remove from the datasource, if the id is equal or larger then 1 then remove it.

GetCommentLikes ( int commentId ) : IEnumerable

Gets a colllection of commentlike objects that are associated with a given commentid.

GetComments ( int levelMaterialId ) : IEnumerable

Gets a lcollection of comment objects associated with this levelmaterial.

Method Details

CreateComment() public method

Gets an instance of a comment object through parameter of the function, if the object isn't null persist it to the datasource.
public CreateComment ( Comment comment ) : void
comment Ru.GameSchool.DataLayer.Repository.Comment Instance of comment object.
return void

CreateLike() public method

Gets an instance of a commentlike object through parameter of the function, if the object isn't null persist it to the datasource.
public CreateLike ( CommentLike commentLike ) : void
commentLike Ru.GameSchool.DataLayer.Repository.CommentLike Instance of commentlike object.
return void

DeleteComment() public method

Gets an integer value of a comment object to remove from the datasource, if the id is equal or larger then 1 then remove it.
public DeleteComment ( int commentId ) : void
commentId int Id of a given comment in the datasource.
return void

DeleteLike() public method

Gets an integer value of a commentlike object to remove from the datasource, if the id is equal or larger then 1 then remove it.
public DeleteLike ( int commentLikeId ) : void
commentLikeId int Id of a given commentlike in the datasource.
return void

GetCommentLikes() public method

Gets a colllection of commentlike objects that are associated with a given commentid.
public GetCommentLikes ( int commentId ) : IEnumerable
commentId int Id of the comment associated with the commentlikes.
return IEnumerable

GetComments() public method

Gets a lcollection of comment objects associated with this levelmaterial.
public GetComments ( int levelMaterialId ) : IEnumerable
levelMaterialId int The integer value of a levelmaterialid to find.
return IEnumerable