public async Task <ActionResult> Delete(int id)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            try
            {
                return(Ok(await _servicodesenvolvedor.Delete(id)));
            }
            catch (ArgumentException ex)
            {
                return(StatusCode((int)HttpStatusCode.InternalServerError, ex.Message));
            }
        }
コード例 #2
0
        public async Task <ActionResult> Delete(int id)
        {
            await _devService.Delete(id);

            return(CustomResponse());
        }