public List <PairingBonus_Result> GetMyPairingBonuses(int memberId) { List <PairingBonus_Result> result = new List <PairingBonus_Result>(); using (GBHODBEntities db = new GBHODBEntities()) { var query = (from a in db.PairingBonus(memberId) select a); foreach (var bonus in query) { PairingBonus_Result item = new PairingBonus_Result(); item.Date = bonus.Date; item.PairLeft = bonus.PairLeft; item.PairRight = bonus.PairRight; item.BalLeft = bonus.BalLeft; item.BalRight = bonus.BalRight; result.Add(item); } } return(result); }