Exemplo n.º 1
0
        public GetBannedPhonesResponse Get()
        {
            var result = _banService.GetBannedPhones();

            return(new GetBannedPhonesResponse
            {
                Phones = result.Phones,
                Error = result.Error
            });
        }
Exemplo n.º 2
0
 public GetBannedPhonesResponse GetBannedPhones()
 {
     try
     {
         var result = _banService.GetBannedPhones();
         return(new GetBannedPhonesResponse
         {
             BannedPhones = result.BannedPhones,
             Error = result.Error
         });
     }
     catch (Exception ex)
     {
         return(new GetBannedPhonesResponse
         {
             BannedPhones = null,
             Error = ex.Message
         });
     }
 }