Re: [Firebird-net-provider] Entity Framework: Best practices to work in a multiuser environment

2016-03-26 Thread Jiří Činčura
> > 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

Re: [Firebird-net-provider] Entity Framework: Best practices to work in a multiuser environment

2016-03-26 Thread Геннадий Забула
> 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

Re: [Firebird-net-provider] Entity Framework: Best practices to work in a multiuser environment

2016-03-26 Thread Jiří Činčura
> 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),