public IHttpActionResult PutunitType(int id, unitType unitType)
        {
            if (!ModelState.IsValid)
            {
                return BadRequest(ModelState);
            }

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

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

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

            return StatusCode(HttpStatusCode.NoContent);
        }
        public IHttpActionResult PostunitType(unitType unitType)
        {
            if (!ModelState.IsValid)
            {
                return BadRequest(ModelState);
            }

            db.unitType.Add(unitType);
            db.SaveChanges();

            return CreatedAtRoute("DefaultApi", new { id = unitType.unitTypeID }, unitType);
        }