var logger = services.GetService<ILogger<Program>>();. 上述兩種取得服務物件的方法,唯一的差異在於:. 使用 GetRequiredService() 如果找不到物件時 ...
確定! 回上一頁