public async Task <IActionResult> Detail(int auctionId)
        {
            var model = new DetailViewModel()
            {
                Auction = await _auctionBusiness.GetAuctionAsync(auctionId),
                Bids    = await _bidBusiness.GetBidsAsync(auctionId)
            };

            model.Bids = model.Bids.OrderByDescending(x => x.Summa).ToList();

            return(View(model));
        }
Esempio n. 2
0
        public bool IsAllowed(int auctionId, string userId)
        {
            var model = _auctionBusiness.GetAuctionAsync(auctionId).Result;

            var createdBy = model.SkapadAv;

            bool result = userId.ToString() == createdBy.ToString();

            return(result);
        }