public async Task <IActionResult> Delete(int id)
        {
            try
            {
                await _machineTypeService.DeleteMachineTypeByIdAsync(id);

                return(NoContent());
            }
            catch (Exception e)
            {
                return(StatusCode(StatusCodes.Status500InternalServerError, e.Message));
            }
        }