public IHttpActionResult GetLegoPart(int id)
        {
            LegoPart legoPart = db.LegoParts.Find(id);

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

            var result = AutoMapper.Mapper.Map <LegoPartDto>(legoPart);

            return(Ok(result));
        }
        public IHttpActionResult DeleteLegoPart(int id)
        {
            LegoPart legoPart = db.LegoParts.Find(id);

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

            db.LegoParts.Remove(legoPart);
            db.SaveChanges();

            return(Ok(legoPart));
        }