public IActionResult Delete(Link link)
        {
            var linkId = link.Id;

            _repository.Delete(linkId);

            return(RedirectToAction("Index"));
        }
示例#2
0
        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"));
 }
示例#5
0
 public IActionResult Delete(long id)
 {
     repository.Delete(id);
     return(Ok());
 }
示例#6
0
 public IActionResult Delete([FromQuery] string hash)
 {
     _repository.Delete(hash);
     return(Ok(new { message = "Deleted" }));
 }