10 2025 档案

摘要:一个asp.net core controller这样写: [ApiController] [Route("api/[controller]/[action]")] public class OrderController : ControllerBase { [HttpPost("create") 阅读全文
posted @ 2025-10-27 09:20 Shapley 阅读(1) 评论(0) 推荐(0)
摘要:一个有意思的问题: 假设一个winform程序,需要运行异步任务进行业务处理,那么最常见的实践方式是怎样的? 那肯定是task+async呀,对,就是这样,但如果想让windows 挂载这个程序,使用命令行运行,那么原有的方法还可行吗?比如以下代码: private void Form1_Load( 阅读全文
posted @ 2025-10-19 18:58 Shapley 阅读(7) 评论(0) 推荐(0)
摘要:有一个场景: 在Task.Run中循环执行N个任务,原来的写法: var task = Task.Run(async () => { int i = 0; foreach (var item in tables) { i++; await writefileAsync(namespace1, ite 阅读全文
posted @ 2025-10-13 09:04 Shapley 阅读(4) 评论(0) 推荐(0)