public void EditCompany(int id, Company company) { var companyToEdit = GetCompany(id); if (companyToEdit == null) return; companyToEdit.Name = company.Name; _db.SaveChanges(); }
public ActionResult Create(Company company) { try { _companyHandler.AddCompany(company); return RedirectToAction("Index"); } catch { return View(company); } }
public void EditCompany(int id, Company company) { _companyRepository.EditCompany(id, company); }
public void AddCompany(Company company) { _db.Company.Add(company); _db.SaveChanges(); }
public void AddCompany(Company company) { _companyRepository.AddCompany(company); }