コード例 #1
0
        public async Task <bool> AddComment(blog_comment comment)
        {
            dbContext.blog_comment.Add(comment);
            var success = await dbContext.SaveChangesAsync();

            return(success > 0 ? true : false);
        }
コード例 #2
0
 public async Task <IHttpActionResult> AddComment([FromBody] blog_comment comment)
 {
     return(Ok(await blogInfoRepo.AddComment(comment)));
 }