Exemplo n.º 1
0
 public async Task <int> Delete(int agendamentoId, int salaId)
 {
     try
     {
         var salaManager = (await _agendaSalaProvider.Delete(agendamentoId, salaId));
         return(salaManager);
     }
     catch (Exception ex)
     {
         throw new Exception(ex.Message);
     }
 }
        public async Task <int> Delete(int agendamentoId, int salaId)
        {
            var response = await _agendaSalaProvider.Delete(agendamentoId, salaId);

            if (!response.IsSuccessStatusCode)
            {
                await ErrorResponse(response, "Delete");
            }

            var json = await response.Content.ReadAsStringAsync();

            return(Convert.ToInt32(json));
        }