Skip to content

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

Open
wants to merge 23 commits into
base: main
Choose a base branch
from

Conversation

dianjing104
Copy link

No description provided.

Copy link

@JCLTW JCLTW left a 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;
Copy link

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");
Copy link

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);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

也可以用builder

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants