資源簡介
麻雀雖小,五臟俱全,很經典
操作步驟:
1. 修改下 appsetting.json文件中的MySqlConnection 為你本機的 mysql賬號密碼
2. 運行webapi項目 即可看到 輸出的webapi
代碼片段和文件信息
using?System;
using?System.Collections.Generic;
using?System.IO;
using?System.Linq;
using?System.Threading.Tasks;
using?Microsoft.AspNetCore;
using?Microsoft.AspNetCore.Hosting;
using?Microsoft.Extensions.Configuration;
using?Microsoft.Extensions.Logging;
namespace?ASP.Net_Core_API
{
????public?class?Program
????{
????????public?static?void?Main(string[]?args)
????????{
????????????BuildWebHost(args).Run();
????????}
????????public?static?IWebHost?BuildWebHost(string[]?args)?=>
????????????WebHost.CreateDefaultBuilder(args)
????????????????.UseStartup()
????????????????.Build();
????}
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2018-04-04?22:31??DotNetCore\
?????目錄???????????0??2018-04-04?22:31??DotNetCore\.vs\
?????目錄???????????0??2018-04-04?22:31??DotNetCore\.vs\DotNetCore\
?????目錄???????????0??2018-04-04?22:32??DotNetCore\.vs\DotNetCore\v15\
?????文件??????118272??2018-04-05?00:37??DotNetCore\.vs\DotNetCore\v15\.suo
?????目錄???????????0??2018-04-04?22:32??DotNetCore\.vs\DotNetCore\v15\Server\
?????目錄???????????0??2018-04-05?00:37??DotNetCore\.vs\DotNetCore\v15\Server\sqlite3\
?????文件???????????0??2018-04-04?22:32??DotNetCore\.vs\DotNetCore\v15\Server\sqlite3\db.lock
?????文件?????1970176??2018-04-05?00:37??DotNetCore\.vs\DotNetCore\v15\Server\sqlite3\storage.ide
?????目錄???????????0??2018-04-05?00:37??DotNetCore\.vs\DotNetCore\v15\sqlite3\
?????文件???????????0??2018-04-04?22:32??DotNetCore\.vs\DotNetCore\v15\sqlite3\db.lock
?????文件?????5525504??2018-04-05?00:37??DotNetCore\.vs\DotNetCore\v15\sqlite3\storage.ide
?????目錄???????????0??2018-04-05?00:33??DotNetCore\ASP.Net?Core?API\
?????文件?????????614??2017-09-20?09:08??DotNetCore\ASP.Net?Core?API\ASP.Net?Core?API.csproj
?????文件?????????398??2017-09-20?09:10??DotNetCore\ASP.Net?Core?API\ASP.Net?Core?API.csproj.user
?????目錄???????????0??2018-04-04?22:31??DotNetCore\ASP.Net?Core?API\Controllers\
?????文件?????????949??2017-09-20?09:12??DotNetCore\ASP.Net?Core?API\Controllers\ValuesController.cs
?????文件?????????633??2017-09-20?09:04??DotNetCore\ASP.Net?Core?API\Program.cs
?????目錄???????????0??2018-04-04?22:31??DotNetCore\ASP.Net?Core?API\Properties\
?????文件?????????724??2017-09-20?09:04??DotNetCore\ASP.Net?Core?API\Properties\launchSettings.json
?????文件????????1643??2018-04-05?00:33??DotNetCore\ASP.Net?Core?API\Startup.cs
?????文件?????????178??2017-09-20?09:04??DotNetCore\ASP.Net?Core?API\appsettings.Development.json
?????文件?????????387??2018-04-04?22:40??DotNetCore\ASP.Net?Core?API\appsettings.json
?????目錄???????????0??2018-04-04?22:31??DotNetCore\ASP.Net?Core?API\bin\
?????目錄???????????0??2018-04-04?22:31??DotNetCore\ASP.Net?Core?API\bin\Debug\
?????目錄???????????0??2018-04-04?22:31??DotNetCore\ASP.Net?Core?API\bin\Debug\netcoreapp2.0\
?????文件??????271423??2018-04-04?22:41??DotNetCore\ASP.Net?Core?API\bin\Debug\netcoreapp2.0\ASP.Net?Core?API.deps.json
?????文件????????8192??2018-04-05?00:29??DotNetCore\ASP.Net?Core?API\bin\Debug\netcoreapp2.0\ASP.Net?Core?API.dll
?????文件????????1680??2018-04-05?00:29??DotNetCore\ASP.Net?Core?API\bin\Debug\netcoreapp2.0\ASP.Net?Core?API.pdb
?????文件?????????252??2018-04-04?22:41??DotNetCore\ASP.Net?Core?API\bin\Debug\netcoreapp2.0\ASP.Net?Core?API.runtimeconfig.dev.json
?????文件?????????221??2018-04-04?22:41??DotNetCore\ASP.Net?Core?API\bin\Debug\netcoreapp2.0\ASP.Net?Core?API.runtimeconfig.json
............此處省略109個文件信息
- 上一篇:Wpf 動態生成組件樣式并應用
- 下一篇:C# 模擬鼠標鍵盤操作
評論
共有 條評論