Closed yooplait closed 2 years ago
What version of Caliburn.Micro are you using? What type of app are you working on? (WPF, Xamarin.Forms, UWP) What version of .net are you using? (.net framework, .net core, .net 5 or 6)
How do you know the DbContext is not disposing?
Hi thank you for your answer.
I'm using WPF with Caliburn Micro 4.0.173 (UI), BU and DAL (EF).
I can do this to inject but it's never disposed like microsoft :
this.container.PerRequest
Of course i can call Dispose() method by myself but it's not automatically.
Thank you !
I created a sample that allows you Microsoft extension dependency inject as your old container
Wow, thank you so much for your help! 👌
Hi,
I'm asking myself if it's possible to simulate de DbContext like i do inside API :
services.AddDbContext(options => options.UseSqlServer(Configuration.GetConnectionString("XXX")))
I can do this inside Configure but it's not disposed automatically :
this.container.PerRequest();
Is it possible to simulate this ?
Thank you !