Exemplo n.º 1
0
        public async Task <ActionResult <GetQuoteResponseVm> > CreateQuote([FromBody] CreateQuoteRequestVm toCreate)
        {
            var quote = _mapper.Map <Quote>(toCreate);
            await _context.AddAsync(quote);

            await _context.SaveChangesAsync();

            return(Ok(_mapper.Map <GetQuoteResponseVm>(quote)));
        }