Пример #1
0
        public async Task <DataResult <int> > ExcluirAvaliacaoAsync(int id)
        {
            try
            {
                await _avaliacaoService.ExcluirAvaliacaoAsync(id);

                return(new DataResult <int>(1));
            }
            catch (Exception ex)
            {
                return(new DataResult <int>(ex));
            }
        }
        public async Task <DataResult <int> > ExcluirAvaliacaoAsync(int id)
        {
            try
            {
                var retorno = await avaliacaoService.ExcluirAvaliacaoAsync(id);

                return(new DataResult <int>(1));
            }
            catch (Exception ex)
            {
                return(new DataResult <int>(ex));
            }
            throw new NotImplementedException();
        }
Пример #3
0
        public async Task <IActionResult> DeleteConfirmed(int id)
        {
            await _avaliacaoService.ExcluirAvaliacaoAsync(id);

            return(RedirectToAction(nameof(Index)));
        }