Ejemplo n.º 1
0
        public async Task <IActionResult> Delete(long id)
        {
            try
            {
                await bookFacade.Delete(id);

                return(NoContent());
            }
            catch (BookDeleteException ex)
            {
                return(BadRequest(ex.Message));
            }
        }
Ejemplo n.º 2
0
        public async Task OnPostDelete(Guid id)
        {
            await bookFacade.Delete(id.ToString());

            Books = await bookFacade.GetBooks();
        }