Re: [Firebird-net-provider] EF Migrations

2014-12-30 Thread Jiří Činčura
> I'd like to do this. But when I register it in provider services, it does > not work. Not sure why. Ahh. Finally found it. IdbInterceptors are not supported for registration in DbProviderServices. So we're probably left with only DbInterception.Add. I did some research and looks it should work

Re: [Firebird-net-provider] EF Migrations

2014-12-30 Thread Jiří Činčura
> One more question, how can I register custom implementation of > IFbMigrationSqlGeneratorBehavior? Register MigrationSqlGenerator with FbMigrationSqlGenerator and pass the implementation to ctor. Something like: AddDependencyResolver(new SingletonDependencyResolver>(() => new FbMigrationSqlGe

Re: [Firebird-net-provider] EF Migrations

2014-12-30 Thread Jiří Činčura
> or maybe via AddDependencyResolver(new > SingletonDependencyResolver()) as suggested in > documentation: http://msdn.microsoft.com/ru- > ru/library/system.data.entity.dbconfiguration.addinterceptor(v=vs.113).asp > x), I'd like to do this. But when I register it in provider services, it does not

Re: [Firebird-net-provider] EF Migrations

2014-12-30 Thread Геннадий Забула
One more question, how can I register custom implementation of IFbMigrationSqlGeneratorBehavior? On Tue, Dec 30, 2014 at 12:55 PM, Геннадий Забула wrote: > According to this: > http://entityframework.codeplex.com/wikipage?title=Interception > As I understand DbConfiguration.AddInterceptor is for

Re: [Firebird-net-provider] EF Migrations

2014-12-30 Thread Геннадий Забула
According to this: http://entityframework.codeplex.com/wikipage?title=Interception As I understand DbConfiguration.AddInterceptor is for context instance interceptions. And DbInterceptors.AddInterceptor is for global-wide interceptions. I suggest moving registration MigrationsTransactionsIntercepto

Re: [Firebird-net-provider] EF Migrations

2014-12-30 Thread Jiří Činčura
Yeah, but it’s different path. The InternalConfiguration class might or might not like that (now or in the future). It’s problem waiting to happen. And please stop sending HTML emails. -- Mgr. Jiří Činčura Independent IT Specialist --

Re: [Firebird-net-provider] EF Migrations

2014-12-30 Thread Геннадий Забула
> That’s not the same as what AddInterceptor call does. As far as I see in the debugger, MigrationsTransactionsInterceptor is called successfully and failed tests are going further. I've added just one fix to filter just Firebird connections: public void BeginningTransaction(DbConnection connection

Re: [Firebird-net-provider] EF Migrations

2014-12-30 Thread Jiří Činčura
The name for index is created by EF if the explicit value is not provided. -- Mgr. Jiří Činčura Independent IT Specialist -- Dive into the World of Parallel Programming! The Go Parallel Website, sponsored by Intel and d

Re: [Firebird-net-provider] EF Migrations

2014-12-30 Thread Jiří Činčura
That’s not the same as what AddInterceptor call does. -- Mgr. Jiří Činčura Independent IT Specialist From: Геннадий Забула [mailto:zabulu...@gmail.com] Sent: Tuesday, December 30, 2014 10:36 AM To: For users and developers of the Firebird .NET providers Subject: Re: [Firebird-net-provider] EF Mig

Re: [Firebird-net-provider] EF Migrations

2014-12-30 Thread Геннадий Забула
One more thing about naming indexes conventions. Indexes namespace is global. So if you have several same fields in different tables, you'll have the same name index for both. Good example in three entities with N:M relations: Entity1: eid, name Entity2: eid, name Entity3: eid, name Entity1Entity3:

Re: [Firebird-net-provider] EF Migrations

2014-12-30 Thread Геннадий Забула
And looks like it works: public FbProviderServices() { #if (EF_6) AddDependencyResolver(new SingletonDependencyResolver(new FbConnectionFactory())); AddDependencyResolver(new SingletonDependencyResolver>(() => new FbMigrationSqlGenerator(), ProviderInvariantName)); System.Data.Entity.Infrastructur

Re: [Firebird-net-provider] EF Migrations

2014-12-30 Thread Геннадий Забула
I've found out that there is the static class: System.Data.Entity.Infrastructure.Interception.DbInterception, which adds IDbInterceptor, 2014-12-30 11:23 GMT+02:00 Jiří Činčura : > > I'm using the same Context for both MSSQL and Firebird, how deriving > from FbDbConfiguration can affect MSSQL cod

Re: [Firebird-net-provider] EF Migrations

2014-12-30 Thread Jiří Činčura
> I'm using the same Context for both MSSQL and Firebird, how deriving from > FbDbConfiguration can affect MSSQL code path? Can we override this somehow > just in Firebird provider? You can use the same context. It's just configuration. I'm waiting for reply from EF guys to see what other optio

Re: [Firebird-net-provider] EF Migrations

2014-12-30 Thread Геннадий Забула
> Your configuration for context needs to derive from FbDbConfiguration. So far there's no better solution. The migrations are run in serializable transaction and you need to insert into __MigrationHistory right after creation. Disaster. I'm using the same Context for both MSSQL and Firebird, how

[Firebird-net-provider] ADO.NET provider 4.6.0

2014-12-30 Thread Jiří Činčura
More info at: http://blog.cincura.net/233492-ado-net-provider-4-6-0-0-for-firebird-is-ready/ . Enjoy. -- Mgr. Jiří Činčura Independent IT Specialist -- Dive into the World of Parallel Programming! The Go Parallel Websi

Re: [Firebird-net-provider] EF Migrations

2014-12-30 Thread Jiří Činčura
Your configuration for context needs to derive from FbDbConfiguration. So far there's no better solution. The migrations are run in serializable transaction and you need to insert into __MigrationHistory right after creation. Disaster. -- Mgr. Jiří Činčura Independent IT Specialist From: Генна

Re: [Firebird-net-provider] EF Migrations

2014-12-30 Thread Jiří Činčura
> 1. Generator ID. One for all is bad options for me. I'll reimplement it to > have one for table. That's why it's open. > 2. Couple of errors in creating Constraints or Indexes: "unsuccessful metadata update Name longer than database column size" Constraint names are longer than it can be in sy