> That doesn't make any sense. If I dispose context after query then I can't update the entities without attaching them to new context. Waste of resources.
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. DbContext is supposed to be used in request-response scenario (web sites, for example), where context object is short-living object. On 26 March 2016 at 11:20, Jiří Činčura <j...@cincura.net> wrote: >> > d) Do I need to dispose the the context on closing the window? >> Not only on that. you should create and dispose context for every >> action you do with a database: insert, delete, update, query etc. > > That doesn't make any sense. If I dispose context after query then I > can't update the entities without attaching them to new context. Waste > of resources. > >> > 3. As long the user does not explicit reload the data I am working >> > in a connected mode >> You don't have to be always connected for any reason. > > True. But for fat client type applications this is then way easier than > disconnected scenarios. > > -- > 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 > Firebird-net-provider@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/firebird-net-provider ------------------------------------------------------------------------------ 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 Firebird-net-provider@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/firebird-net-provider