public IHttpActionResult PutReferCBVS(int id, ReferCBVS referCBVS)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

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

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

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

            return(StatusCode(HttpStatusCode.NoContent));
        }
        public ActionResult DeleteConfirmed(int id)
        {
            ReferCBVS referCBVS = db.ReferCBVS.Find(id);

            db.ReferCBVS.Remove(referCBVS);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public ActionResult Edit([Bind(Include = "ReferCBVSId,ReferCBVSValue")] ReferCBVS referCBVS)
 {
     if (ModelState.IsValid)
     {
         db.Entry(referCBVS).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(referCBVS));
 }
        public IHttpActionResult GetReferCBVS(int id)
        {
            ReferCBVS referCBVS = db.ReferCBVS.Find(id);

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

            return(Ok(referCBVS));
        }
        public ActionResult Create([Bind(Include = "ReferCBVSId,ReferCBVSValue")] ReferCBVS referCBVS)
        {
            if (ModelState.IsValid)
            {
                db.ReferCBVS.Add(referCBVS);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(referCBVS));
        }
        public IHttpActionResult PostReferCBVS(ReferCBVS referCBVS)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            db.ReferCBVS.Add(referCBVS);
            db.SaveChanges();

            return(CreatedAtRoute("DefaultApi", new { id = referCBVS.ReferCBVSId }, referCBVS));
        }
        public IHttpActionResult DeleteReferCBVS(int id)
        {
            ReferCBVS referCBVS = db.ReferCBVS.Find(id);

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

            db.ReferCBVS.Remove(referCBVS);
            db.SaveChanges();

            return(Ok(referCBVS));
        }
        // GET: ReferCBVS/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            ReferCBVS referCBVS = db.ReferCBVS.Find(id);

            if (referCBVS == null)
            {
                return(HttpNotFound());
            }
            return(View(referCBVS));
        }