Example #1
0
        public IHttpActionResult Putsp_RBU_Result(int id, sp_RBU_Result sp_RBU_Result)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

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

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

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

            return(StatusCode(HttpStatusCode.NoContent));
        }
Example #2
0
        public IHttpActionResult Getsp_RBU_Result(int id)
        {
            sp_RBU_Result sp_RBU_Result = db.sp_RBU_Result.Find(id);

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

            return(Ok(sp_RBU_Result));
        }
Example #3
0
        public IHttpActionResult Postsp_RBU_Result(sp_RBU_Result sp_RBU_Result)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            db.sp_RBU_Result.Add(sp_RBU_Result);
            db.SaveChanges();

            return(CreatedAtRoute("DefaultApi", new { id = sp_RBU_Result.id }, sp_RBU_Result));
        }
Example #4
0
        public IHttpActionResult Deletesp_RBU_Result(int id)
        {
            sp_RBU_Result sp_RBU_Result = db.sp_RBU_Result.Find(id);

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

            db.sp_RBU_Result.Remove(sp_RBU_Result);
            db.SaveChanges();

            return(Ok(sp_RBU_Result));
        }