public ActionResult Create(PropertyViewModel viewModel) { if (ModelState.IsValid) { var model = new Property(); model.InjectFrom<UnflatLoopValueInjection>(viewModel); PropertyService.CreateProperty(model); return RedirectToAction("Manager"); } return View(viewModel); }
public ActionResult Websites(int id) { var property = PropertyService.GetByID(id); var model = new PropertyViewModel().InjectFrom<UnflatLoopValueInjection>(property); return View(model); }