public async Task <IActionResult> PutEmployee(int id, Employee employee) { if (id != employee.Id) { return(BadRequest()); } var result = await _employeeComponent.UpdateAsync(employee); return(Ok(result)); }
public async Task <ActionResult <Employee> > PostEmployee(Employee employee) { var result = await _employeeComponent.AddAsync(employee); return(Ok(result)); }