示例#1
0
        public async Task CreateComment(string content, int episodeId, string userId)
        {
            Comment comment = new Comment()
            {
                UserId         = userId,
                EpisodeId      = episodeId,
                CommentContent = WordsFilter.CensorComment(content),
                DateCreatedAt  = DateTime.Now
            };

            await this.AnimeContext.Comments.AddAsync(comment);

            await this.AnimeContext.SaveChangesAsync();
        }