前置作業完成了以後
public void ConfigureServices(IServiceCollection services)
{
// Add framework services.
services.AddSingleton<IUserRepository, UserRepository>();
services.AddTransient<DataAccess>();
services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1);
}
直接在程式頁面按下F5,或是啟動IIS Express
這時候VS2017就會幫你多起一個瀏覽器並帶入你的localhost
我這邊是localhost://44362
Self-signed SSL certificates are being blocked:
Fix this by turning off 'SSL certificate verification' in Settings > General*
找全部user Get
用id找user Get
新增user Post
Body:{
"userId": "8",
"userName": "rose",
"Phone":"0912345678"
"birthday": "2018/10/31"
}
修改user資料 Put
Body:{
"userId": "7",
"userName": "玫瑰",
"birthday": "2018/10/31"
}
刪除user Delete