-
Notifications
You must be signed in to change notification settings - Fork 4
11.06 happy and lovely homework-pengyu #6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
company?.Employees.Remove(employee); | ||
return NoContent(); | ||
} | ||
[HttpPost("{companyId}/employees")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion: add new line to separate two methods
to be improved: missing api design for employee |
Good points:
To be improved: |
CreateCompanyRequest companyGiven = new CreateCompanyRequest("BlueSky Digital Media"); | ||
HttpResponseMessage postResponseMessage = await httpClient.PostAsJsonAsync("/api/companies", companyGiven); | ||
var createdCompany = await postResponseMessage.Content.ReadFromJsonAsync<Company>(); | ||
var createdEmployee = new EmployeeRequest("pengyu"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion: use givenEmployee when creating an employee request; use createdEmployee read from postResponseMessage because that's successfully created.
No description provided.