Esempio n. 1
0
        public IActionResult DeleteById(string id)
        {
            var cliente = _clientesdb.GetById(id);

            if (cliente == null)
            {
                return(NotFound());
            }
            _clientesdb.DeleteById(cliente.Id);
            return(NoContent());
        }
        public async Task <IActionResult> DeleteById(string id)
        {
            var cliente = await _clienteDb.GetById(id);

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

            await _clienteDb.DeleteById(cliente.Id);

            return(NoContent());
        }
Esempio n. 3
0
        public IActionResult DeleteById(string id)
        {
            var taskToUser = _clienteDb.GetByIdTaskToUser(id);

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

            _clienteDb.DeleteById(taskToUser.Id);

            return(NoContent());
        }