public IHttpActionResult PuttbBlogComment(int id, tbBlogComment tbBlogComment)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            if (id != tbBlogComment.BlogCommentID)
            {
                return(BadRequest());
            }

            db.Entry(tbBlogComment).State = EntityState.Modified;

            try
            {
                db.SaveChanges();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!tbBlogCommentExists(id))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(StatusCode(HttpStatusCode.NoContent));
        }
        public IHttpActionResult GettbBlogComment(int id)
        {
            tbBlogComment tbBlogComment = db.tbBlogComments.Find(id);

            if (tbBlogComment == null)
            {
                return(NotFound());
            }

            return(Ok(tbBlogComment));
        }
        public IHttpActionResult PosttbBlogComment(tbBlogComment tbBlogComment)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            db.tbBlogComments.Add(tbBlogComment);
            db.SaveChanges();

            return(CreatedAtRoute("DefaultApi", new { id = tbBlogComment.BlogCommentID }, tbBlogComment));
        }
        public IHttpActionResult DeletetbBlogComment(int id)
        {
            tbBlogComment tbBlogComment = db.tbBlogComments.Find(id);

            if (tbBlogComment == null)
            {
                return(NotFound());
            }

            db.tbBlogComments.Remove(tbBlogComment);
            db.SaveChanges();

            return(Ok(tbBlogComment));
        }