Пример #1
0
        public async Task <ResponseMessage> Delete(int id)
        {
            try
            {
                var storedTask = await _taskService.DeleteAsync(id);

                return(new ResponseMessage(true, null, "Task removed with success!", HttpStatusCode.OK));
            }
            catch (Exception err)
            {
                return(new ResponseMessage(false, null, err.Message, HttpStatusCode.BadRequest));
            }
        }
Пример #2
0
        public async Task <IActionResult> Delete(Guid id)
        {
            await _appService.DeleteAsync(id);

            return(NoContent());
        }