Пример #1
0
        public IHttpActionResult Create(webModel.QuoteRequest quoteRequest)
        {
            var coreQuote = quoteRequest.ToCoreModel();
            var retVal    = _quoteRequestService.SaveChanges(new[] { coreQuote }).First();

            return(Ok(retVal));
        }
Пример #2
0
        public IHttpActionResult Update(webModel.QuoteRequest quoteRequest)
        {
            var coreQuote = quoteRequest.ToCoreModel();

            _quoteRequestService.SaveChanges(new[] { coreQuote });
            return(StatusCode(HttpStatusCode.NoContent));
        }
Пример #3
0
        public IHttpActionResult CalculateTotals(webModel.QuoteRequest quoteRequest)
        {
            var coreQuote = quoteRequest.ToCoreModel();

            coreQuote.Totals = _totalsCalculator.CalculateTotals(coreQuote);
            return(Ok(coreQuote.ToWebModel()));
        }