Commit Graph

5 Commits

Author SHA1 Message Date
27f916eb9c 修正多處 LINQ-to-Entities 查詢,避免 Nullable .Contains()、.ToString()、Request[] 直接使用造成翻譯失敗。
API 查詢同步改寫 .Contains()、.OrderBy()、複雜 GroupBy/Math.Round,必要時 materialize 或加 HasValue。
Participation rate / kind breakdown 改在記憶體計算,同時檢查整數陣列 .Contains() 的型別安全性。
2025-11-14 23:40:55 +08:00
ae09a6f487 STAGE 3-4 2025-11-12 18:57:51 +08:00
9a0d5ae700 修復 Batch 1 中 IEnumerable.Contains 的型別轉換問題
問題:
- Split().Select(int.Parse) 返回 IEnumerable<int>
- LINQ to Entities 中使用 Contains 需要具體集合類型

修復:
- 在所有 Split().Select() 後加 .ToList()
- 確保 EF 可以將 Contains 轉換為 SQL IN 子句

影響文件:
- memberController.cs (2 處)
- accountingController.cs (1 處)
- FollowerController.cs (1 處)
- stockController.cs (1 處)

技術說明:
LINQ to Entities 要求 Contains 的集合參數是具體化的集合(List/Array),
而不能是延遲執行的 IEnumerable,以便正確生成 SQL 查詢。
2025-11-12 17:01:49 +08:00
79b7dd114f 修復 Batch 1: FollowerController, memberController, accountingController, stockController
- FollowerController.cs: 8 處修復
- memberController.cs: 9 處修復
- accountingController.cs: 8 處修復
- stockController.cs: 8 處修復

總計 33 處,覆蓋會員、財務、庫存核心功能
2025-11-12 16:37:59 +08:00
af2c152ef6 migrate to new git 2025-08-29 01:27:25 +08:00