public override async Task <AddEmployeeRsponse> AddEmployee(AddEmployeeRequest request, ServerCallContext context) { var employee = await _empyloyeeRepository.Add(request.Employee); var result = new AddEmployeeRsponse { Employee = employee }; return(result); }
public async Task <IActionResult> Add([FromBody] Employee model) { var added = await _empyloyeeRepository.Add(model); return(CreatedAtRoute("GetById", new { id = added.Id }, added)); }