コード例 #1
0
        public async Task <IActionResult> PutEmployee(int id, Employee employee)
        {
            if (id != employee.Id)
            {
                return(BadRequest());
            }

            var result = await _employeeComponent.UpdateAsync(employee);

            return(Ok(result));
        }
コード例 #2
0
        public async Task <ActionResult <Employee> > PostEmployee(Employee employee)
        {
            var result = await _employeeComponent.AddAsync(employee);

            return(Ok(result));
        }