public IActionResult Delete(Link link) { var linkId = link.Id; _repository.Delete(linkId); return(RedirectToAction("Index")); }
public async Task <Unit> Handle(DeleteLinkCommand request, CancellationToken cancellationToken) { var link = await _linksRepository.GetById(request.LinkId); await _linksRepository.Delete(link); return(new Unit()); }
public IActionResult Delete(int id) { _repository.Delete(id); return(new NoContentResult()); }
public IActionResult Delete(Link link) { _repository.Delete(link); return(Redirect("Index")); }
public IActionResult Delete(long id) { repository.Delete(id); return(Ok()); }
public IActionResult Delete([FromQuery] string hash) { _repository.Delete(hash); return(Ok(new { message = "Deleted" })); }