// PUT api/factor/5 public Factor Put(int id, Factor newFactor) { newFactor.ID = id; if (facService.SearchId(id).Count > 0) { if (facService.Edit(newFactor)) { return(newFactor); } } return(null); }
// PUT api/factor/5 public Factor Put(int id, Factor newFactor) { if (facService.SearchFactor(newFactor.BusinessPlanId, newFactor.ID).Count > 0) { if (facService.Edit(id, newFactor)) { newFactor.BusinessPlanId = id; return(newFactor); } } return(null); }