Exemple #1
0
        public ActionResult DeleteMachine(Guid id)
        {
            if (_service.DeleteMachine(id) == false)
            {
                return(NotFound());
            }

            return(NoContent());
        }
        public async Task <IActionResult> DeleteMachine(Guid id)
        {
            try
            {
                await _serviceMachine.DeleteMachine(id);

                return(NoContent());
            }
            catch (KeyNotFoundException)
            {
                return(NotFound("Machine not found"));
            }
        }