public ActionResult Edit(Guid id) { ViewBag.CityValues = DataAccessLayer.ListItemsFromDict(Constants.CityCode). OrderBy(x => x.Text) .ToList(); var binder = new FormEmployerToUser(DataAccessLayer); var user = DataAccessLayer.GetById<EmployerUser>(id); var model = new EmployerForm(); binder.InverseLoad(user, model); return View(model); }
public static EmployerForm Bind(DataAccessLayer dataAccessLayer, Guid userId) { var binder = new FormEmployerToUser(dataAccessLayer); var user = dataAccessLayer.GetById<EmployerUser>(userId); var model = new EmployerForm(); binder.InverseLoad(user, model); return model; }