diff --git a/Notes/VisualStudio/HttpFiles.md b/Notes/VisualStudio/HttpFiles.md deleted file mode 100644 index a083cd7..0000000 --- a/Notes/VisualStudio/HttpFiles.md +++ /dev/null @@ -1,93 +0,0 @@ -# 使用 Visual Studio 2022 中的 .HTTP 文件 - -## 注释 - -以 # 或 // 开头的行是注释,当 Visual Studio 发送 HTTP 请求时,将忽略这些行。 - -![Alt text](https://oss.xcode.me/notes/2023-08-30-13-52-55_553ef9ac.png) - -## 变量 - -以 @ 开头的行使用语法 @VariableName=Value 定义变量。 - -```http -@hostname=localhost -@port=44320 -GET https://{{hostname}}:{{port}}/weatherforecast -``` - -## 多个请求 - -请求格式为: - -```http -[] [] -[] -[] -``` - -```http -GET https://localhost:7220/weatherforecast - -### - -GET https://localhost:7220/weatherforecast?date=2023-05-11&location=98006 - -### - -GET https://localhost:7220/weatherforecast HTTP/3 - -### -``` - -## 请求标头 - -```http -GET https://localhost:7220/weatherforecast -Date: Wed, 27 Apr 2023 07:28:00 GMT - -### - -GET https://localhost:7220/weatherforecast -Cache-Control: max-age=604800 -Age: 100 - -### -``` - -## 请求正文 - -```http -POST https://localhost:7220/weatherforecast -Content-Type: application/json - -{ - "date": "2023-05-11", - "location": "98006" -} -``` - -## 使用模板创建 HTTP 文件 - -1. 右键单击 ASP.NET Core 项目 -2. 添加>新建项 -3. ASP.NET Core>常规 -4. 选择 HTTP 文件,然后选择添加 - -## 使用终结点资源管理器 - -视图>其他窗口>终结点资源管理器 - -## 定义一个 ef core dbcontext - -```csharp -public class WeatherForecastContext : DbContext -{ - public WeatherForecastContext(DbContextOptions options) - : base(options) - { - } - - public DbSet WeatherForecasts { get; set; } -} -``` diff --git a/Notes/DotNet/UpgradeAssistant.md b/Notes/dotnet/upgrade-assistant.md similarity index 100% rename from Notes/DotNet/UpgradeAssistant.md rename to Notes/dotnet/upgrade-assistant.md diff --git a/Notes/helloshop/git-repositories.md b/Notes/helloshop/git-repositories.md new file mode 100644 index 0000000..f16b634 --- /dev/null +++ b/Notes/helloshop/git-repositories.md @@ -0,0 +1,62 @@ +# 创建代码仓库 + +## 仓库命名规范 + +在 Github 上创建一个名为 HelloShop 的代码仓库,关于代码仓库的命名规范使用,使用 SnakeCaseLower 命名法。 + + +| Naming policy | Original | Converted | +|----------------|--------------|--------------| +| PascalCase | HelloShop | HelloShop | +| CamelCase | HelloShop | helloShop | +| SnakeCaseLower | HelloShop | hello_shop | +| SnakeCaseUpper | HelloShop | HELLO_SHOP | +| KebabCaseLower | HelloShop | hello-shop | +| KebabCaseUpper | HelloShop | HELLO-SHOP | + +## 仓库文件夹结构 + +在仓库中创建一个名为 src 的文件夹,用于存放源代码。 + +## 说明文件 + +在仓库中创建一个名为 README.md 的文件,用于存放仓库的说明文档,当然如果可能每个文件夹都应该有一个说明文档。 + + +## 忽略文件 + +gitignore 文件的作用是指定不需要提交到代码仓库的文件,例如编译后的文件、日志文件等。 + +https://github.com/github/gitignore/blob/main/VisualStudio.gitignore + + +## 属性文件 + +gitattributes 文件的作用是指定文件的属性,例如文件的换行符、文件的编码等。 + +## 目录结构 + +`assets` 静态资源,包括图片,图标,视频,音频等。 + +`build` 构建脚本,包括编译脚本,打包脚本,发布脚本等。 + +`docs` 相关文档,包括设计文档,架构文档,开发文档,部署文档等。` + +`samples` 演示示例,包括代码示例,配置示例,数据示例,文档示例等。 + +`src` 源代码,包括源代码,配置文件,资源文件,脚本文件等。 + +`tests` 测试代码,包括单元测试,集成测试,端到端测试等。 + +`tools` 项目所使用的一些工具。 + + +## 仓库分支 + +仓库分支用于管理仓库的版本,例如 master,develop,release,hotfix, feature 等。 + + +## 仓库标签 + +仓库标签用于标记仓库的版本,例如 v1.0.0,v1.0.1,v1.1.0,v2.0.0 等。 + diff --git a/Notes/VisualStudio/UseHttpFile.md b/Notes/visualstudio/use-http-files.md similarity index 100% rename from Notes/VisualStudio/UseHttpFile.md rename to Notes/visualstudio/use-http-files.md diff --git a/ Blogs/abc.md b/blogs/abc.md similarity index 100% rename from Blogs/abc.md rename to blogs/abc.md