public ApiResponse Create(List <EmployeeParam> param) { EmployeeProcessor = new EmployeeProcessor(); Response = new ApiResponse(); try { Response.text = JsonConverter.JsonConverter.ObjToJson(EmployeeProcessor.Create(param)); Response.result = true; return(Response); } catch { Response.text = "Something went wrong :("; Response.result = false; return(Response); } }
public void Post([FromBody] Employee employee) { employeeProcessor.Create(employee); }
public async Task <IActionResult> Post([FromBody] Employee employee) { employeeProcessor.Create(employee); return(Ok(employee)); }