Exemplo n.º 1
0
        // PUT api/vwMatchMetric/5
        public IHttpActionResult PutvwMatchMetric(int id, vwMatchMetric vwmatchmetric)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

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

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

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

            return(StatusCode(HttpStatusCode.NoContent));
        }
Exemplo n.º 2
0
        public IHttpActionResult GetvwMatchMetric(int id)
        {
            vwMatchMetric vwmatchmetric = db.vwMatchMetrics.Find(id);

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

            return(Ok(vwmatchmetric));
        }
Exemplo n.º 3
0
        public IHttpActionResult PostvwMatchMetric(vwMatchMetric vwmatchmetric)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            db.vwMatchMetrics.Add(vwmatchmetric);
            db.SaveChanges();

            return(CreatedAtRoute("DefaultApi", new { id = vwmatchmetric.vwMatchMetricId }, vwmatchmetric));
        }
Exemplo n.º 4
0
        public IHttpActionResult DeletevwMatchMetric(int id)
        {
            vwMatchMetric vwmatchmetric = db.vwMatchMetrics.Find(id);

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

            db.vwMatchMetrics.Remove(vwmatchmetric);
            db.SaveChanges();

            return(Ok(vwmatchmetric));
        }