public void Add(IncomeQuestionnaire employee) { if (employee == null) { throw new ArgumentNullException("Please provovide the valid employee object"); } _repository.Add(employee); }
public void Add(IncomeQuestionnaire income) { var alredyExits = IncomeList.FirstOrDefault(emp => emp.Id == income.Id); if (alredyExits != null) { throw new ArgumentException(string.Format("Income already exists {0}, please add another income.", income.Id)); } IncomeList.Add(income); }
public void Post([FromBody] IncomeQuestionnaire incomeQuestionnaire) { _incomeBL.Add(incomeQuestionnaire); }
public void Add(IncomeQuestionnaire employee) { _context.Add(employee); }