public ActionResult Create(ProjectViewModel model, HttpPostedFileBase upload) { if (!ModelState.IsValid) { //var availableCustomers = Mapper.Map<IEnumerable<SelectListItem>>(_customerService.GetCustomers()); //model.AvailableCustomers = availableCustomers; //return View(model); } _projectService.CreateProject(Mapper.Map<Project>(model)); return RedirectToAction("Index"); }
public ActionResult Create() { var model = new ProjectViewModel(); return View(model); }