Exemplo n.º 1
0
        public async Task <IHttpActionResult> Putscope_exceeding(int id, scope_exceeding scope_exceeding)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

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

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

            try
            {
                await db.SaveChangesAsync();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!scope_exceedingExists(id))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(StatusCode(HttpStatusCode.NoContent));
        }
Exemplo n.º 2
0
        public async Task <IHttpActionResult> Getscope_exceeding(int id)
        {
            scope_exceeding scope_exceeding = await db.scope_exceeding.FindAsync(id);

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

            return(Ok(scope_exceeding));
        }
Exemplo n.º 3
0
        public async Task <IHttpActionResult> Postscope_exceeding(scope_exceeding scope_exceeding)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            db.scope_exceeding.Add(scope_exceeding);
            await db.SaveChangesAsync();

            return(CreatedAtRoute("DefaultApi", new { id = scope_exceeding.id }, scope_exceeding));
        }
Exemplo n.º 4
0
        public async Task <IHttpActionResult> Deletescope_exceeding(int id)
        {
            scope_exceeding scope_exceeding = await db.scope_exceeding.FindAsync(id);

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

            db.scope_exceeding.Remove(scope_exceeding);
            await db.SaveChangesAsync();

            return(Ok(scope_exceeding));
        }