public async Task <IEnumerable <ReferralModel> > GetReferrals([FromQuery] string clientId) { var referrals = await _referralRepository.GetReferrals(clientId); var result = _mapper.Map <IEnumerable <IReferral>, IEnumerable <ReferralModel> >(referrals); return(result); }
public IEnumerable <Referral> GetReferrals(int?page = null) { IEnumerable <Referral> referrals; _dbConnection.Open(); using (var transaction = _dbConnection.BeginTransaction()) { referrals = _referralRepository.GetReferrals(_dbConnection, page); transaction.Commit(); } _dbConnection.Close(); return(referrals); }
public async Task <IEnumerable <Referral> > GetReferrals(string business_id, string thread_id, Paging page) { return(await _referralRepository.GetReferrals(business_id, thread_id, page)); }