Ejemplo n.º 1
0
        public ActionResult Deal(int quoteId)
        {
            var quote = session.QueryOver<Quote>()
                .Where(q => q.Id == quoteId)
                .SingleOrDefault();

            if (quote == null || quote.HasExpired(DateTimeOffset.UtcNow))
            {
                return RedirectToAction("Quote");
            }

            var model = new DealModel();
            model.Quote = quote;
            model.QuoteId = quoteId;

            return View(model);
        }
Ejemplo n.º 2
0
        public ActionResult Deal(int quoteId)
        {
            var quote = quoteRepository
                .FindBy(q => q.Id == quoteId)
                .SingleOrDefault();

            if (quote == null || quote.HasExpired(DateTimeOffset.UtcNow))
            {
                return RedirectToAction("Quote");
            }

            var model = new DealModel();
            model.Quote = quote;
            model.QuoteId = quoteId;

            return View(model);
        }