public ActionResult Create(BaseModel baseModel) { CompanyModel companyModel = new CompanyModel(); companyModel.CopyBaseModel(baseModel); using (CompanyBAL companyBAL = new CompanyBAL(ContextInfo)) { companyBAL.PrepareCompanyModel(companyModel); } return(View("Create", companyModel)); }
// GET: Company/Edit/5 public ActionResult Edit(string id, BaseModel baseModel) { CompanyModel companyModel = new CompanyModel(); companyModel.CopyBaseModel(baseModel); companyModel.Id = id; using (CompanyBAL companyBAL = new CompanyBAL(ContextInfo)) { companyBAL.GetCompanyModel(companyModel); companyBAL.PrepareCompanyModel(companyModel); } return(View(companyModel)); }