From: Геннадий З. <zab...@gm...> - 2016-04-01 17:53:01
|
Keeping long-lived context instance it is something like having in-memory database. Yes you have all entities but it cost you memory. Still some apps ok with this, if user session works only with small subset of database entities. Sent from my Windows 10 phone From: Jiří Činčura Sent: Saturday, March 26, 2016 12:52 PM To: For users and developers of the Firebird .NET providers Subject: Re: [Firebird-net-provider] Entity Framework: Best practices to workin a multiuser environment > Indeed. It's EF poor design, that they try to rework in EF core. > Still there are plenty of workarounds for this. For example attaching > entities only by ids. Attaching by ID? It's still attaching... > DbContext is supposed to be used in request-response scenario (web > sites, for example), where context object is short-living object. Quite opposite. Short-living context is recommended in request-response scenarios. If you can keep the instance - like WPF, WinForms, etc. - the benefit of having the context to track what you're doing is great help. The context class itself was not designed to be used in any scenario in particular. It should work and works in all range of options .NET ecosystem offers. In fact, even just the disconnected scenario has at least like 3 options to tackle it. -- Mgr. Jiří Činčura Independent IT Specialist ------------------------------------------------------------------------------ Transform Data into Opportunity. Accelerate data analysis in your applications with Intel Data Analytics Acceleration Library. Click to learn more. http://pubads.g.doubleclick.net/gampad/clk?id=278785351&iu=/4140 _______________________________________________ Firebird-net-provider mailing list Fir...@li... https://lists.sourceforge.net/lists/listinfo/firebird-net-provider |