コード例 #1
0
ファイル: CommentManager.cs プロジェクト: ppXD/KoalaBlog
        /// <summary>
        /// Comment点赞或者取消赞
        /// </summary>
        /// <param name="personId">PersonID</param>
        /// <param name="blogId">BlogID</param>
        /// <returns></returns>
        public async Task<Tuple<bool, int>> LikeAsync(long personId, long commentId)
        {
            using (KoalaBlogDbContext dbContext = new KoalaBlogDbContext())
            {
                EntityLikeHandler entityLikeHandler = new EntityLikeHandler(dbContext);

                return await entityLikeHandler.LikeAsync(personId, commentId, typeof(Comment));
            }
        }