public ActionResult Create(int?ID) { InquiryViewModel inquiryViewModel = new InquiryViewModel { InquiryModel = new Models.InquiryModel { InquiryDate = DateTime.UtcNow } }; var inquiryResponse = inquiryService.GetInquiryResponse(ID); if (inquiryResponse.Inquiry != null) { inquiryViewModel.InquiryModel = inquiryResponse.Inquiry.MapServerToClient(); inquiryViewModel.InquiryModel.InquiryProductId = inquiryResponse.InquiryDetails.FirstOrDefault().ProductID; inquiryViewModel.Documents = inquiryResponse.InquiryDocuments.ToList(); } inquiryViewModel.Contacts = inquiryResponse.Contacts.Select(x => x.CreateDDL()).ToList(); inquiryViewModel.Products = inquiryResponse.Products.Select(x => x.MapServerToClient()).ToList(); ViewBag.MessageVM = TempData["message"] as MessageViewModel; return(View(inquiryViewModel)); }