Kenneth Tang
Kenneth Tang
我的方案都有切專案來解耦合。所以,操作DB的專案無法注入 serviceprovider
我的意思是,您說將DBcontextFactory改用serviceprovider的地方,他在其它專案中,是沒辦法注入serviceprovider的。然後這個專案的某一層開始生命週期是 Singleton,所以被注入的元件只能依賴DBcontextFactory來create dbcontext xuejmnet ***@***.***> 於 2022年10月8日 週六 下午2:08 寫道: > @ChengYen-Tang > 不应该所有用到依赖注入的地方都可以通过注入serviceprovider,是在不行就用静态的serviceprovider.Createscope > > — > Reply to this email directly, view it on GitHub > , >...
使用DBContextFatcory的專案只要安裝EF套件就好,Iserviceprovider是worker service的專案才能使用,不然我就必須額外安裝DI套件,但是我不想讓資料庫的專案跟DI直接耦合 xuejmnet ***@***.***> 於 2022年10月8日 週六 下午4:25 寫道: > @ChengYen-Tang > IServiceProvider的root节点也是Singleton的,所以能注入DBContextFatcory的地方IServicProvider都可以,所以我才说让你注入这个或者使用静态属性IServiceProvider > > — > Reply to this email directly, view it on GitHub > , > or...
@xuejmnet 這是我的情境啦!! 不過可能有些情境是開發成套件,不會希望物件要依賴於IServiceProvider,但是又想解決我一開始提到的兩點問題 https://github.com/dotnet/efcore/blob/767bc93c6e6fca19868f486c7df8f4235bcf53cd/src/EFCore/Infrastructure/PooledDbContextFactory.cs
> @ChengYen-Tang 可以实现,至于workservice下通过serviceprovider的createscope来使用会比较好 我覺得使用createscope不太好,我這邊的情境,程式剛啟動或爬資料時需要同步狀態,會密集的查詢,這樣導致密集觸發GC,
@araffin I also got this error, may I ask which version of tensorflow you are using?
Thank you.
Hi @emgucv , How to build GStreamer in emgucv on the Windows platforms.
I have experience in building opencv+gstreamer, but I don’t know how to integrate into emgucv . thank you.
Although I didn't succeed, I can give you some pointers. step1. google search: How to compile OpenCV with Gstreamer step2. https://www.emgu.com/wiki/index.php/Download_And_Installation#Building_from_Git