Ejemplo n.º 1
0
        public async Task <IActionResult> OnPostFavoriteAsync([FromQuery] Guid id, CancellationToken cancellationToken)
        {
            var result = await _contatoService.AlternarFavorito(id, cancellationToken).ConfigureAwait(false);

            if (!result)
            {
                return(RedirectToPage("/Erro"));
            }
            return(RedirectToPage("Index"));
        }