コード例 #1
0
 public IList<Auction.Domain.Package> GetByBidder(long bidderId,
                          ref IAuctionTransaction trans)
 {
     using (var records = new PackageCollection())
     {
         var filter = new PredicateExpression(PackageFields.BidderId == bidderId);
         if (trans != null)
         {
             trans.Add(records);
         }
         records.GetMulti(filter);
         return records.Select(r => new Package()
         {
             BidderId = r.BidderId,
             CategoryId = r.CategoryId,
             ClosedOutBy = r.ClosedOutBy,
             Code = r.Code,
             CreatedBy = r.CreatedBy,
             EndingBid = r.EndingBid,
             EventId = r.EventId,
             Id = r.Id,
             Name = r.Name,
             Notes = r.Notes,
             Paid = (bool)r.Paid,
             StartingBid = r.StartingBid,
             UpdatedBy = r.UpdatedBy
         }).ToList();
     }
 }