Пример #1
0
 public async Task <int> Delete(int salaId)
 {
     try
     {
         var salaManager = (await _salaProvider.Delete(salaId));
         return(salaManager);
     }
     catch (Exception ex)
     {
         throw new Exception(ex.Message);
     }
 }
Пример #2
0
        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));
        }