public ActionResult Create(QuotationViewModel quotation) { if (ModelState.IsValid) { var entity = Mapper.Map <Quotation>(quotation); quotationService.Insert(entity); return(RedirectToAction("Index")); } ViewBag.CustomerId = new SelectList(customerService.GetAll(), "Id", "FullName"); ViewBag.ProductId = new SelectList(productService.GetAll(), "Id", "Name"); ViewBag.TaxId = new SelectList(taxService.GetAll(), "Id", "Name"); return(View(quotation)); }