2023年4月15日 星期六
2023年4月6日 星期四
2023年3月15日 星期三
SAP ME 捉取料號各工站在途數統計數量 SQL
sql
select site, item, step_sequence, opt, sum(in_work) as in_work
from (
select so.site, i.item, ss.step_sequence, concat(o.operation ,ot.description) as opt, (ss.qty_in_queue + ss.qty_in_work) as in_work
2023年3月9日 星期四
Mogodb C# driver 使用 Atlas Search
程式代碼
var searchFilter = SearchBuilders<TEntity>.Search.Text(queryStr , columnName);
var query = collection.Aggregate().Search(searchFilter,null,indexName).ToList();
2023年1月13日 星期五
使用 System.Text.Json出現 Cannot get the value of a token type 'String' as a number
參考文章 :
System.Text.Json與 比較 Newtonsoft.Json ,並移轉至System.Text.Json
System.Text.Json: (De)serialization support for quoted numbers #30255
原本使用 Newtonsoft Json.Net 的程式是不會出現錯誤訊息,但是因為改用 System.Text.Json後執行 JsonSerializer.Deserialize 就出現這個錯誤,因為如果在 json string的數字如果是用雙引號的話就會出現,解決方式為如下
2022年12月8日 星期四
MongoDB $lookup 注意事項
2022年11月10日 星期四
初學 asp.net code blazor
剛好看到 .Net 7 發佈,剛好可以來學習 Blazor,開發環境為 VS Code,使用 EF Core簡單實作捉取 DB資料含 Sqlite及逺端 SQL Server、使用 dotnet ef dbcontext scaffold產出對應的 DbContext 及 Class物件,Blazor寫的方式很像 asp.net form或是更像我之前寫的 Adobe Flex程式,把程式碼和介面都放在同一個檔案內,跟 MVC的作法有點不同,後續學習後希望可以把更多實作所碰到的問題及解決方式跟大家分享,目前分享文章如下
为何WebAssembly方兴未艾,而JavaApplet/Flex/Silverlight走向消亡?
現有資料庫產出 DBContext及 table/view class
Blazor Server和Blazor WebAssembly的差異