예제 #1
0
 public static AuctionBet FormAuctionBet(AuctionBetDetails details)
 {
     return(new AuctionBet
     {
         Value = details.BetValue,
         AuctionId = details.AuctionId
     });
 }
예제 #2
0
 public static AuctionDetails FormAuctionDetailsWithBets(Auction auction, IEnumerable <AuctionBet> auctionBets)
 {
     return(new AuctionDetails
     {
         Id = auction.Id,
         Name = auction.Name,
         Description = auction.Description,
         ActiveDate = auction.ActiveDate,
         BuyNowPrice = auction.BuyNowPrice,
         MinBidPrice = auction.MinBidPrice,
         StartingPrice = auction.StartingPrice,
         CreatedDate = auction.AddedDate.Value,
         AddedBy = auction.AddedBy,
         AuctionBets = auctionBets.Select(bet => AuctionBetDetails.FormAuctionBetDetails(bet))
     });
 }