public async Task <ResponseMODEL> DeleteAsync(int id) { try { var resultProcess = await bookDAL.GetAsync(id); if (resultProcess.IsApproved) { if ((Book)resultProcess.ObjectResult != null) { return(await bookDAL.DeleteAsync((Book)resultProcess.ObjectResult)); } else { return(ResponseMODEL.Instance(false, "Transaccion Rechazada", "No es posible eliminar el libro", "No existe un libro que coincida con el codigo enviado")); } } else { return(resultProcess); } } catch (Exception ex) { return(ResponseMODEL.Instance(false, "Error Controlado", "Se controlo un error en la aplicacion.", ex.Message, ex)); } }