public void SaveCompany(Company company) { _repo.Save<Company>(company); }
public ActionResult EditCompany(Company company) { return View<EditCompanyViewModel>(model => model.Company = company); }
public ObservableCollection<CompanyContact> GetContacts(Company company) { return _repo.FindAll<CompanyContact>(cc => cc.CompanyID == company.ID).AsObservableCollection(); }
private void FixupCompany(Company previousValue) { if (previousValue != null && previousValue.CompanyContacts.Contains(this)) { previousValue.CompanyContacts.Remove(this); } if (Company != null) { if (!Company.CompanyContacts.Contains(this)) { Company.CompanyContacts.Add(this); } if (CompanyID != Company.ID) { CompanyID = Company.ID; } } }