public ActionResult Create(BaseModel baseModel) { DriverModel driverModel = new DriverModel(); driverModel.CopyBaseModel(baseModel); using (DriverBAL driverBAL = new DriverBAL(ContextInfo)) { driverBAL.PrepareDriverModel(driverModel); } return(View("Create", driverModel)); }
// GET: Driver/Edit/5 public ActionResult Edit(string id, BaseModel baseModel) { DriverModel driverModel = new DriverModel(); driverModel.CopyBaseModel(baseModel); driverModel.Id = id; using (DriverBAL driverBAL = new DriverBAL(ContextInfo)) { driverBAL.GetDriverModel(driverModel); driverBAL.PrepareDriverModel(driverModel); } return(View(driverModel)); }