internal Contractor EditOne(Contractor editContractor) { Contractor contractor = GetOne(editContractor.Id); if (contractor == null) { throw new SystemException("INVALID ID"); } else { editContractor.Age = editContractor.Age != null ? editContractor.Age : contractor.Age; editContractor.Name = editContractor.Name != null ? editContractor.Name : contractor.Name; editContractor.Salary = editContractor.Salary != null ? editContractor.Salary : contractor.Salary; return(_crepo.EditOne(editContractor)); } }