public static AuctionBet FormAuctionBet(AuctionBetDetails details) { return(new AuctionBet { Value = details.BetValue, AuctionId = details.AuctionId }); }
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)) }); }