public GetBannedPhonesResponse Get() { var result = _banService.GetBannedPhones(); return(new GetBannedPhonesResponse { Phones = result.Phones, Error = result.Error }); }
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 }); } }