示例#1
0
        public IActionResult Delete([FromBody] Todo todo)
        {
            try
            {
                if (ModelState.IsValid)
                {
                    _todos.Delete(todo.Id);
                }

                return(NoContent());
            }
            catch (EntityNotFoundException)
            {
                return(NotFound());
            }
        }
示例#2
0
 public void Delete(dynamic @params)
 {
     todos.Delete(@params.Id);
 }