From: LtColRDSChauhan <rds...@gm...> - 2016-03-25 16:23:11
|
> > Message: 4 > Date: Wed, 23 Mar 2016 14:43:25 +0100 > From: Mark Rotteveel <ma...@la...> > Subject: Re: [Firebird-net-provider] How to backup the remote database > to a local hard disk > To: "For users and developers of the Firebird .NET providers" > <fir...@li...> > Message-ID: <56F...@la...> > Content-Type: text/plain; charset=utf-8; format=flowed > > On 23-3-2016 11:31, LtColRDSChauhan wrote: > > Hi, > > > > 1. Not able to back up: > > > > \\ServerMachine\C\ABC.FDB > > to > > \\TheLocalMachine\C\ABC.GBK > > Please show the code you use for the backup. You should be using > Mark, thanks for your help. I was using FBackup. FbStreamingBackup if you want to backup to your local machine. > Using FbStreamingBackup solved my problem. But the ServiceOutput event handler is now not getting called. > 2. The C drive of the TheLocalMachine is shared to Everyone with Allow > > Full Control. > > Note that Firebird does not allow you to connect to a database on a > network share (even if that share is local to the machine). > > Mark > -- > Mark Rotteveel > > > > ------------------------------ > > Message: 5 > Date: Fri, 25 Mar 2016 07:11:57 +0100 > From: "Nikolaus Kern" <par...@gm...> > Subject: [Firebird-net-provider] Entity Framework: Best practices to > work in a multiuser environment > To: "'For users and developers of the Firebird .NET providers'" > <fir...@li...> > Message-ID: <000001d1865d$3ccec780$b66c5680$@gmx.at> > Content-Type: text/plain; charset="us-ascii" > > Hello all, > > > > I am using EF 6.0 with Firebird 4.10 and have same questions about best > practices. It is an WPF/MVVM application that runs in a multiuser > environment. > > > > 1. There is a static class to create the connection string > > AppGlobals > < > http://127.0.0.1/roeder/dotnet/Default.aspx?Target=code://Support:1.0.11723 > .42736/Support.AppGlobals> .EFMetadata > < > http://127.0.0.1/roeder/dotnet/Default.aspx?Target=code://Support:1.0.11723 > .42736/Support.AppGlobals/property:EFMetadata:String> = > "res://*/LPP.csdl|res://*/LPP.ssdl|res://*/LPP.msl"; > AppGlobals > < > http://127.0.0.1/roeder/dotnet/Default.aspx?Target=code://Support:1.0.11723 > .42736/Support.AppGlobals> .CreateConnectionString > < > http://127.0.0.1/roeder/dotnet/Default.aspx?Target=code://Support:1.0.11723 > .42736/Support.AppGlobals/CreateConnectionString()> (); > > > > 2. I am using long living efcontext as protected variable in the > ViewModel to read the data > > protected lehnerEntities > < > http://127.0.0.1/roeder/dotnet/Default.aspx?Target=code://LppDataAccess:1.0 > .0.0/LppDataAccess.lehnerEntities> _ctx > < > http://127.0.0.1/roeder/dotnet/Default.aspx?Target=code://LPP:1.0.0.0/LPP.v > mEisenbiegerei/_ctx:LppDataAccess.lehnerEntities> ; > > > > 3. As long the user does not explicit reload the data I am working in > a connected mode > > > > 4. Inserts, updates and deletes use the same context > > LPP_LOGISTIK_EISENBIEGEN > < > http://127.0.0.1/roeder/dotnet/Default.aspx?Target=code://LppDataAccess:1.0 > .0.0/LppDataAccess.LPP_LOGISTIK_EISENBIEGEN> entity = new > LPP_LOGISTIK_EISENBIEGEN > < > http://127.0.0.1/roeder/dotnet/Default.aspx?Target=code://LppDataAccess:1.0 > .0.0/LppDataAccess.LPP_LOGISTIK_EISENBIEGEN/.ctor()> (); > this._ctx > < > http://127.0.0.1/roeder/dotnet/Default.aspx?Target=code://LPP:1.0.0.0/LPP.v > mEisenbiegerei/_ctx:LppDataAccess.lehnerEntities> > .LPP_LOGISTIK_EISENBIEGEN > < > http://127.0.0.1/roeder/dotnet/Default.aspx?Target=code://LppDataAccess:1.0 > > .0.0/LppDataAccess.lehnerEntities/property:LPP_LOGISTIK_EISENBIEGEN:System.D > ata.Entity.DbSet%3cLppDataAccess.LPP_LOGISTIK_EISENBIEGEN%3e> .Add > < > http://127.0.0.1/roeder/dotnet/Default.aspx?Target=code://EntityFramework:6 > > .0.0.0:b77a5c561934e089/System.Data.Entity.DbSet%3c%3e/Add(%3c!0%3e):%3c!0%3 > e> (entity); > this._ctx > < > http://127.0.0.1/roeder/dotnet/Default.aspx?Target=code://LPP:1.0.0.0/LPP.v > mEisenbiegerei/_ctx:LppDataAccess.lehnerEntities> .SaveChanges > < > http://127.0.0.1/roeder/dotnet/Default.aspx?Target=code://EntityFramework:6 > .0.0.0:b77a5c561934e089/System.Data.Entity.DbContext/SaveChanges():Int32> > (); > > > > 5. When the user wants to refresh (F5) I instanciate the context again and > use it as before > > this._ctx > < > http://127.0.0.1/roeder/dotnet/Default.aspx?Target=code://LPP:1.0.0.0/LPP.v > mEisenbiegerei/_ctx:LppDataAccess.lehnerEntities> = new lehnerEntities > < > http://127.0.0.1/roeder/dotnet/Default.aspx?Target=code://LppDataAccess:1.0 > .0.0/LppDataAccess.lehnerEntities/.ctor(String)> (AppGlobals > < > http://127.0.0.1/roeder/dotnet/Default.aspx?Target=code://Support:1.0.11723 > .42736/Support.AppGlobals> .efSB > < > http://127.0.0.1/roeder/dotnet/Default.aspx?Target=code://Support:1.0.11723 > > .42736/Support.AppGlobals/property:efSB:System.Data.EntityClient.EntityConne > ctionStringBuilder> .ConnectionString > < > http://127.0.0.1/roeder/dotnet/Default.aspx?Target=code://System.Data:4.0.0 > > .0:b77a5c561934e089/System.Data.Common.DbConnectionStringBuilder/property:Co > nnectionString:String> ); > this._auftraege > < > http://127.0.0.1/roeder/dotnet/Default.aspx?Target=code://LPP:1.0.0.0/LPP.v > > mEisenbiegerei/_auftraege:System.Linq.IQueryable%3cLppDataAccess.LPP_LOGISTI > K_EISENBIEGEN%3e> = this._ctx > < > http://127.0.0.1/roeder/dotnet/Default.aspx?Target=code://LPP:1.0.0.0/LPP.v > mEisenbiegerei/_ctx:LppDataAccess.lehnerEntities> .GetOffeneEisenAuftraege > < > http://127.0.0.1/roeder/dotnet/Default.aspx?Target=code://LppDataAccess:1.0 > > .0.0/LppDataAccess.lehnerEntities/GetOffeneEisenAuftraege():System.Linq.IQue > ryable%3cLppDataAccess.LPP_LOGISTIK_EISENBIEGEN%3e> (); > > > > Questions: > > a) Is the method described above considered as good practice? > > b) Basically it is a connected Context until the user refreshes the data. > In > this case the context is recreated. > > c) In order to manage multiuser environment, do I need to work generally > with disconnected entities? > > d) Do I need to dispose the the context on closing the window? > > > > Thanks > > > > Niko > > -------------- next part -------------- > An HTML attachment was scrubbed... > > ------------------------------ > > > ------------------------------------------------------------------------------ > 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 > > > End of Firebird-net-provider Digest, Vol 119, Issue 2 > ***************************************************** > -- Regards, Lt Col (Retd) Rajiv D.S. Chauhan in.linkedin.com/in/ltcolrdschauhan _____________________________ |