Esempio n. 1
0
        public async Task <IActionResult> OnPostAsync(string id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            if (await _tinyUrlService.IsExist(id))
            {
                await _tinyUrlService.Delete(id);
            }

            return(RedirectToPage("./Index"));
        }
Esempio n. 2
0
 private async Task <bool> UrlMapExists(string id)
 {
     return(await _tinyUrlService.IsExist(id));
 }