public async Task <bool> AddComment(blog_comment comment) { dbContext.blog_comment.Add(comment); var success = await dbContext.SaveChangesAsync(); return(success > 0 ? true : false); }
public async Task <IHttpActionResult> AddComment([FromBody] blog_comment comment) { return(Ok(await blogInfoRepo.AddComment(comment))); }