public HttpResponseMessage AddGrupo(tb_grupo tb_grupo)
        {
            if (ModelState.IsValid)
            {
                db.tb_grupo.Add(tb_grupo);
                db.SaveChanges();

                HttpResponseMessage response = Request.CreateResponse(HttpStatusCode.Created, tb_grupo);
                response.Headers.Location = new Uri(Url.Link("BreezeApi", new { id = tb_grupo.id_grupo }));
                return response;
            }
            else
            {
                return Request.CreateErrorResponse(HttpStatusCode.BadRequest, ModelState);
            }
        }
        public HttpResponseMessage UpdateGrupo(long id, tb_grupo tb_grupo)
        {
            if (!ModelState.IsValid)
            {
                return Request.CreateErrorResponse(HttpStatusCode.BadRequest, ModelState);
            }

            if (id != tb_grupo.id_grupo)
            {
                return Request.CreateResponse(HttpStatusCode.BadRequest);
            }

            db.Entry(tb_grupo).State = System.Data.EntityState.Modified;

            try
            {
                db.SaveChanges();
            }
            catch (DbUpdateConcurrencyException ex)
            {
                return Request.CreateErrorResponse(HttpStatusCode.NotFound, ex);
            }

            return Request.CreateResponse(HttpStatusCode.OK);
        }