Esempio n. 1
0
        public IEnumerable <AuctionDTO> GetAllAuctions()
        {
            var auctions          = ServiceLocator.GetInstance.GetAuctionService.GetAll();
            List <AuctionDTO> res = new List <AuctionDTO>();

            foreach (Auction auction in auctions)
            {
                res.Add(AuctionDTO.GetAuctionDtoByAuction(auction));
            }

            return(res);
        }
Esempio n. 2
0
 public AuctionDTO GetAuction(int id)
 {
     return(AuctionDTO.GetAuctionDtoByAuction(ServiceLocator.GetInstance.GetAuctionService.GetById(id)));
 }