// 我的中奖查询 // GET: /Casino/Bet public ActionResult MyBet(Criteria criteria) { var model = new MyBetDto(); var query = _repo.Query <BetView>(criteria, x => x.UserID == AcnID) .Many <BetView, BetDetail, int>(t => t.ID); var mapper = BetDto.ConfigMapper().CreateMapper(); var list = mapper.Map <IEnumerable <BetDto> >(query.AsEnumerable()); model.Criteria = criteria; model.Data = list; return(View(model)); }
// 我的中奖查询 // GET: /Casino/Bet public ActionResult MyBet(Criteria criteria) { var model = new MyBetDto(); var query = _repo.Query<BetView>(criteria, x => x.UserID == AcnID) .Many<BetView, BetDetail, int>(t => t.ID); var mapper = BetDto.ConfigMapper().CreateMapper(); var list = mapper.Map<IEnumerable<BetDto>>(query.AsEnumerable()); model.Criteria = criteria; model.Data = list; return View(model); }