示例#1
0
        public IHttpActionResult PutMA_HABLADORES_BITACORA(decimal id, MA_HABLADORES_BITACORA mA_HABLADORES_BITACORA)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

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

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

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

            return(StatusCode(HttpStatusCode.NoContent));
        }
示例#2
0
        public IHttpActionResult GetMA_HABLADORES_BITACORA(decimal id)
        {
            MA_HABLADORES_BITACORA mA_HABLADORES_BITACORA = db.MA_HABLADORES_BITACORA.Find(id);

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

            return(Ok(mA_HABLADORES_BITACORA));
        }
示例#3
0
        public IHttpActionResult PostMA_HABLADORES_BITACORA(MA_HABLADORES_BITACORA mA_HABLADORES_BITACORA)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            db.MA_HABLADORES_BITACORA.Add(mA_HABLADORES_BITACORA);
            db.SaveChanges();

            return(CreatedAtRoute("DefaultApi", new { id = mA_HABLADORES_BITACORA.id }, mA_HABLADORES_BITACORA));
        }
示例#4
0
        public IHttpActionResult DeleteMA_HABLADORES_BITACORA(decimal id)
        {
            MA_HABLADORES_BITACORA mA_HABLADORES_BITACORA = db.MA_HABLADORES_BITACORA.Find(id);

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

            db.MA_HABLADORES_BITACORA.Remove(mA_HABLADORES_BITACORA);
            db.SaveChanges();

            return(Ok(mA_HABLADORES_BITACORA));
        }