public async Task <IEnumerable <Vacation> > GetAllVacations() { try { if (await _сonnectedStateService.IsServiceAvailable()) { await Synchronization(); } return(await _vacationRepository.GetAll()); } catch (VTSException e) { throw new BusinessException("Can't get vacations", e); } }
public async Task <bool> Login(LoginModel loginModel) { try { if (await _сonnectedStateService.IsServiceAvailable()) { return(await _userWebService.Login(loginModel) && await _userRepository.Login(loginModel)); } return(await _userRepository.Login(loginModel)); } catch (VTSException) { return(false); } }