public ActionResult Delete(int id, IFormCollection collection) { try { var resultado = repositorioUsuario.Delete(id); return(RedirectToAction(nameof(Index))); } catch (Exception e) { return(View()); } }
public bool EliminarUsuario(DtoUsuario usr) { IRepositorioUsuario repo = new RepositorioUsuario(); if (usr != null) { Usuario user = new Usuario { Email = usr.Email, Password = usr.Password }; return(repo.Delete(user)); } return(false); }