public IHttpActionResult PostFirstCountStatusBINS(FirstCountStatusBINS firstCountStatusBINS)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            db.FirstCountStatusBINS.Add(firstCountStatusBINS);

            try
            {
                db.SaveChanges();
            }
            catch (DbUpdateException)
            {
                if (FirstCountStatusBINSExists(firstCountStatusBINS.AreaLine))
                {
                    return(Conflict());
                }
                else
                {
                    throw;
                }
            }

            return(CreatedAtRoute("DefaultApi", new { id = firstCountStatusBINS.AreaLine }, firstCountStatusBINS));
        }
        public IHttpActionResult PutFirstCountStatusBINS(string id, FirstCountStatusBINS firstCountStatusBINS)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

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

            if (FirstCountStatusBINSExists(id))
            {
                db.Entry(firstCountStatusBINS).State = EntityState.Modified;
            }
            else
            {
                db.FirstCountStatusBINS.Add(firstCountStatusBINS);
            }

            try
            {
                db.SaveChanges();
            }
            catch (DbUpdateConcurrencyException)
            {
                throw;
            }

            return(StatusCode(HttpStatusCode.Accepted));
        }
        public IHttpActionResult GetFirstCountStatusBINS(string id)
        {
            FirstCountStatusBINS firstCountStatusBINS = db.FirstCountStatusBINS.Find(id);

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

            return(Ok(firstCountStatusBINS));
        }
        public IHttpActionResult DeleteFirstCountStatusBINS(string id)
        {
            FirstCountStatusBINS firstCountStatusBINS = db.FirstCountStatusBINS.Find(id);

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

            db.FirstCountStatusBINS.Remove(firstCountStatusBINS);
            db.SaveChanges();

            return(Ok(firstCountStatusBINS));
        }