示例#1
0
        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);
        }
示例#3
0
 public async Task <IEnumerable <Referral> > GetReferrals(string business_id, string thread_id, Paging page)
 {
     return(await _referralRepository.GetReferrals(business_id, thread_id, page));
 }