public async Task <IHttpActionResult> PostAlignBallBrg(AlignBallBrg alignBallBrg)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            db.AlignBallBearings.Add(alignBallBrg);

            try
            {
                await db.SaveChangesAsync();
            }
            catch (DbUpdateException)
            {
                if (AlignBallBrgExists(alignBallBrg.TypeID))
                {
                    return(Conflict());
                }
                else
                {
                    throw;
                }
            }

            return(CreatedAtRoute("DefaultApi", new { id = alignBallBrg.TypeID }, alignBallBrg));
        }
        public async Task <IHttpActionResult> PutAlignBallBrg(string id, AlignBallBrg alignBallBrg)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

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

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

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

            return(StatusCode(HttpStatusCode.NoContent));
        }
        public async Task <IHttpActionResult> GetAlignBallBrg(string id)
        {
            AlignBallBrg alignBallBrg = await db.AlignBallBearings.FindAsync(id);

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

            return(Ok(alignBallBrg));
        }
        public async Task <IHttpActionResult> DeleteAlignBallBrg(string id)
        {
            AlignBallBrg alignBallBrg = await db.AlignBallBearings.FindAsync(id);

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

            db.AlignBallBearings.Remove(alignBallBrg);
            await db.SaveChangesAsync();

            return(Ok(alignBallBrg));
        }