Ejemplo n.º 1
0
        public IActionResult Delete(Guid id, string type)
        {
            var destView = string.IsNullOrEmpty(type) ? "index": type;

            _todoRepo.DeleteById(id);
            return(RedirectToAction(destView));
        }
Ejemplo n.º 2
0
        public async Task <ActionResult> Delete(Guid id, FormCollection collection)
        {
            try
            {
                await _todoRepository.DeleteById(id);

                return(RedirectToAction("Index"));
            }
            catch
            {
                return(View());
            }
        }
Ejemplo n.º 3
0
 public IActionResult DeleteList(string id)
 {
     toDoLisToDoRepository.DeleteById(id);
     return(NoContent());
 }