-
Notifications
You must be signed in to change notification settings - Fork 4
Dian Jing's Pull request for parkinglot API #5
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: main
Are you sure you want to change the base?
Conversation
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.
一些反馈
[HttpDelete("{id}")] | ||
public async Task<ActionResult> DeleteParkingLotAsync(string id) | ||
{ | ||
bool isSuccess = _parkingLotSaervice.DeleteAsync(id).Result; |
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.
此处采用了阻塞的方法,不好,这样30行的方法不需要声明为 async
{ | ||
//given & when | ||
HttpClient _httpClient = GetClient(); | ||
HttpResponseMessage response = await _httpClient.GetAsync("/WeatherForecast"); |
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.
删除 WeatherForecast
|
||
public async Task<ParkingLot> UpdateParkingLotById(string id, int capacity) | ||
{ | ||
var update = Builders<ParkingLot>.Update.Set("Capacity", capacity); |
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.
也可以用builder
No description provided.