public async Task <IActionResult> OnPostAsync(string id) { if (id == null) { return(NotFound()); } if (await _tinyUrlService.IsExist(id)) { await _tinyUrlService.Delete(id); } return(RedirectToPage("./Index")); }
public async Task Delete(string id) { await _tinyUrlService.Delete(id); }