From 07d034ac6e045dc1f5a9f57bf403df23e1913720 Mon Sep 17 00:00:00 2001 From: qp1931000 <2209891622@qq.com> Date: Sun, 7 Jun 2026 22:45:45 +0800 Subject: [PATCH 1/2] 1 --- .../20260601\347\254\224\350\256\260.md" | 9 +++++++ .../20260603\347\254\224\350\256\260.md" | 12 +++++++++ .../20260604\347\254\224\350\256\260.md" | 15 +++++++++++ .../20260605\347\254\224\350\256\260.md" | 25 +++++++++++++++++++ 4 files changed, 61 insertions(+) create mode 100644 "\351\231\210\346\272\220/20260601\347\254\224\350\256\260.md" create mode 100644 "\351\231\210\346\272\220/20260603\347\254\224\350\256\260.md" create mode 100644 "\351\231\210\346\272\220/20260604\347\254\224\350\256\260.md" create mode 100644 "\351\231\210\346\272\220/20260605\347\254\224\350\256\260.md" diff --git "a/\351\231\210\346\272\220/20260601\347\254\224\350\256\260.md" "b/\351\231\210\346\272\220/20260601\347\254\224\350\256\260.md" new file mode 100644 index 0000000..a8d8e02 --- /dev/null +++ "b/\351\231\210\346\272\220/20260601\347\254\224\350\256\260.md" @@ -0,0 +1,9 @@ +# 笔记 + +## 安装SDK + +### Windows 系统 + +- 右键“此电脑”或“我的电脑”,选择“属性” > “高级系统设置” > “环境变量”。 + +- 添加以下变量: ANDROID_HOME:设置为 Android SDK 的安装路径,例如 C:\Users\YourName\AppData\Local\Android\Sdk。 Path:在 Path 中添加以下路径: %ANDROID_HOME%\platform-tools %ANDROID_HOME%\tools \ No newline at end of file diff --git "a/\351\231\210\346\272\220/20260603\347\254\224\350\256\260.md" "b/\351\231\210\346\272\220/20260603\347\254\224\350\256\260.md" new file mode 100644 index 0000000..23c88de --- /dev/null +++ "b/\351\231\210\346\272\220/20260603\347\254\224\350\256\260.md" @@ -0,0 +1,12 @@ +# 笔记 + +## NuGet包雨全局工具 + +``` +dotnet add package Microsoft.EntityFrameworkCore.Sqlite +dotnet add package Microsoft.EntityFrameworkCore.Design +``` + +``` +dotnet tool install --global dotnet-ef +``` \ No newline at end of file diff --git "a/\351\231\210\346\272\220/20260604\347\254\224\350\256\260.md" "b/\351\231\210\346\272\220/20260604\347\254\224\350\256\260.md" new file mode 100644 index 0000000..e2b2331 --- /dev/null +++ "b/\351\231\210\346\272\220/20260604\347\254\224\350\256\260.md" @@ -0,0 +1,15 @@ +# 笔记 + +## SQLite 文件 + +### 编写AppDbContext + +``` +public class AppDbContext : DbContext +{ + public AppDbContext(DbContextOptions options) : base(options) { } + + public DbSet Categories => Set(); + public DbSet Products => Set(); +} +``` \ No newline at end of file diff --git "a/\351\231\210\346\272\220/20260605\347\254\224\350\256\260.md" "b/\351\231\210\346\272\220/20260605\347\254\224\350\256\260.md" new file mode 100644 index 0000000..50c6717 --- /dev/null +++ "b/\351\231\210\346\272\220/20260605\347\254\224\350\256\260.md" @@ -0,0 +1,25 @@ +# 笔记 + +## crud风格项目 + +``` +//新增客户 +private void btnAdd_Click(object sender, EventArgs e) +{ +  _Mode = "Add"; +   +  //创建客户实体对象 +   _Current = new Entity_Customer(); +  _Current.CreatedBy = "admin"; +  _Current.CreationDate = DateTime.Now; +   +  //绑定主表文本框数据源 +   DoBindingEditorPanel(panel3, _Current); +   +  //设置按钮状态 +   SetButtonState(); +   +  tabControl1.SelectedTab = tabPage2; +  txtCustomerCode.ReadOnly = false; +} +``` \ No newline at end of file -- Gitee From 4ebb59d358e0d4e08d3b4e911e9c3df7ceaa8840 Mon Sep 17 00:00:00 2001 From: qp1931000 <2209891622@qq.com> Date: Sun, 14 Jun 2026 19:41:31 +0800 Subject: [PATCH 2/2] 1 --- .../20260608\347\254\224\350\256\260.md" | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 "\351\231\210\346\272\220/20260608\347\254\224\350\256\260.md" diff --git "a/\351\231\210\346\272\220/20260608\347\254\224\350\256\260.md" "b/\351\231\210\346\272\220/20260608\347\254\224\350\256\260.md" new file mode 100644 index 0000000..eee0b04 --- /dev/null +++ "b/\351\231\210\346\272\220/20260608\347\254\224\350\256\260.md" @@ -0,0 +1,27 @@ +# 笔记 + +## 分页查询 + +``` + public IEnumerable Get([FromQuery] int pageIndex = 1, [FromQuery] int pageSize = 5) + { + + if (pageIndex < 1) + { + pageIndex = 1; + } + // 页大小不能小于5 + if (pageSize < 5) + { + pageSize = 5; + } + // 页大小不能大于100 + if (pageSize > 100) + { + pageSize = 100; + } + + var list = _db.Students.OrderBy(t => t.Id).Skip((pageIndex - 1) * pageSize).Take(pageSize); + return list; + } +``` \ No newline at end of file -- Gitee