public async Task <IHttpActionResult> PutDirOrderIntStatus(int id, DirOrderIntStatus dirOrderIntStatus)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

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

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

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

            return(StatusCode(HttpStatusCode.NoContent));
        }
        public async Task <IHttpActionResult> GetDirOrderIntStatus(int id)
        {
            DirOrderIntStatus dirOrderIntStatus = await db.DirOrderIntStatuses.FindAsync(id);

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

            return(Ok(dirOrderIntStatus));
        }
        public async Task <IHttpActionResult> PostDirOrderIntStatus(DirOrderIntStatus dirOrderIntStatus)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            db.DirOrderIntStatuses.Add(dirOrderIntStatus);
            await db.SaveChangesAsync();

            return(CreatedAtRoute("DefaultApi", new { id = dirOrderIntStatus.DirOrderIntStatusID }, dirOrderIntStatus));
        }
        public async Task <IHttpActionResult> DeleteDirOrderIntStatus(int id)
        {
            DirOrderIntStatus dirOrderIntStatus = await db.DirOrderIntStatuses.FindAsync(id);

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

            db.DirOrderIntStatuses.Remove(dirOrderIntStatus);
            await db.SaveChangesAsync();

            return(Ok(dirOrderIntStatus));
        }