public async Task <int> Delete(int salaId) { try { var salaManager = (await _salaProvider.Delete(salaId)); return(salaManager); } catch (Exception ex) { throw new Exception(ex.Message); } }
public async Task <int> Delete(int salaId) { var response = await _salaProvider.Delete(salaId); if (!response.IsSuccessStatusCode) { await ErrorResponse(response, "Delete"); } var json = await response.Content.ReadAsStringAsync(); return(Convert.ToInt32(json)); }