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 system tables: ALTER TABLE 
ClientGroupAlerts ADD CONSTRAINT 
FK_ClientGroupAlerts_ClientGroups_ClientGroup_Id. I've figured that maximum 
name is 31 (!!!) characters. I've implemented SHA1 (maybe I will replace it 
with something faster) hashing of string names.

Yeah. Firebird's 31 characters it's goign to be hard to beat. I can shorten the 
string, but that will increase collisions. Maybe we can create - similar to 
generators - open ended method that anybody can override if needed.

-- 
Mgr. Jiří Činčura
Independent IT Specialist


--
Dive into the World of Parallel Programming! The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net
___
Firebird-net-provider mailing list
Firebird-net-provider@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider


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: Геннадий Забула [mailto:zabulu...@gmail.com] 
Sent: Tuesday, December 30, 2014 8:19 AM
To: For users and developers of the Firebird .NET providers
Subject: Re: [Firebird-net-provider] EF Migrations

Fall in next query:
EXECUTE BLOCK
AS
BEGIN
EXECUTE STATEMENT
'CREATE TABLE __MigrationHistory (
MigrationId VARCHAR(150) NOT NULL, 
ContextKey VARCHAR(300) NOT NULL, 
Model BLOB SUB_TYPE BINARY NOT NULL, 
ProductVersion VARCHAR(32) NOT NULL
)'
WITH AUTONOMOUS TRANSACTION;
END
Parameters:
With next exception:
unsuccessful metadata update
STORE RDB$RELATIONS failed
lock conflict on no wait transaction

2014-12-30 9:03 GMT+02:00 Геннадий Забула zabulu...@gmail.com:
Here are my issues/suggestions:
1. Generator ID. One for all is bad options for me. I'll reimplement it to have 
one for table.
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 system tables: ALTER TABLE 
ClientGroupAlerts ADD CONSTRAINT 
FK_ClientGroupAlerts_ClientGroups_ClientGroup_Id. I've figured that maximum 
name is 31 (!!!) characters. I've implemented SHA1 (maybe I will replace it 
with something faster) hashing of string names.

Will write about further progress.

2014-12-20 8:32 GMT+02:00 Mercea Paul paul.mer...@almexa.ro:
On 2014.11.06 3:06 PM, Jiří Činčura wrote:
 Hi *,

 Anybody here willing to give EF Migrations a try? I'm getting close to first 
 implementation.

I'm trying to add support for Firebird db for existing app on SQL
Express, and, first run of the application was with no errors and
created the database.
I'll going to try migrations steps and give feedback.

Thanks Jiri

Paul MERCEA
___
E-mail: paul.mer...@almexa.ro
___


--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration  more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151iu=/4140/ostg.clktrk
___
Firebird-net-provider mailing list
Firebird-net-provider@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider


--
Dive into the World of Parallel Programming! The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net
___
Firebird-net-provider mailing list
Firebird-net-provider@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider


[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 Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net
___
Firebird-net-provider mailing list
Firebird-net-provider@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider


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 deriving from
FbDbConfiguration can affect MSSQL code path? Can we override this somehow
just in Firebird provider?

 Yeah. Firebird's 31 characters it's goign to be hard to beat. I can
shorten the string, but that will increase collisions. Maybe we can create
- similar to generators - open ended method that anybody can override if
needed.

I like this.


2014-12-30 10:06 GMT+02:00 Jiří Činčura j...@cincura.net:

 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: Геннадий Забула [mailto:zabulu...@gmail.com]
 Sent: Tuesday, December 30, 2014 8:19 AM
 To: For users and developers of the Firebird .NET providers
 Subject: Re: [Firebird-net-provider] EF Migrations

 Fall in next query:
 EXECUTE BLOCK
 AS
 BEGIN
 EXECUTE STATEMENT
 'CREATE TABLE __MigrationHistory (
 MigrationId VARCHAR(150) NOT NULL,
 ContextKey VARCHAR(300) NOT NULL,
 Model BLOB SUB_TYPE BINARY NOT NULL,
 ProductVersion VARCHAR(32) NOT NULL
 )'
 WITH AUTONOMOUS TRANSACTION;
 END
 Parameters:
 With next exception:
 unsuccessful metadata update
 STORE RDB$RELATIONS failed
 lock conflict on no wait transaction

 2014-12-30 9:03 GMT+02:00 Геннадий Забула zabulu...@gmail.com:
 Here are my issues/suggestions:
 1. Generator ID. One for all is bad options for me. I'll reimplement it to
 have one for table.
 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 system tables: ALTER TABLE
 ClientGroupAlerts ADD CONSTRAINT
 FK_ClientGroupAlerts_ClientGroups_ClientGroup_Id. I've figured that
 maximum name is 31 (!!!) characters. I've implemented SHA1 (maybe I will
 replace it with something faster) hashing of string names.

 Will write about further progress.

 2014-12-20 8:32 GMT+02:00 Mercea Paul paul.mer...@almexa.ro:
 On 2014.11.06 3:06 PM, Jiří Činčura wrote:
  Hi *,
 
  Anybody here willing to give EF Migrations a try? I'm getting close to
 first implementation.
 
 I'm trying to add support for Firebird db for existing app on SQL
 Express, and, first run of the application was with no errors and
 created the database.
 I'll going to try migrations steps and give feedback.

 Thanks Jiri

 Paul MERCEA
 ___
 E-mail: paul.mer...@almexa.ro
 ___



 --
 Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
 from Actuate! Instantly Supercharge Your Business Reports and Dashboards
 with Interactivity, Sharing, Native Excel Exports, App Integration  more
 Get technology previously reserved for billion-dollar corporations, FREE

 http://pubads.g.doubleclick.net/gampad/clk?id=164703151iu=/4140/ostg.clktrk
 ___
 Firebird-net-provider mailing list
 Firebird-net-provider@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/firebird-net-provider



 --
 Dive into the World of Parallel Programming! The Go Parallel Website,
 sponsored by Intel and developed in partnership with Slashdot Media, is
 your
 hub for all things parallel software development, from weekly thought
 leadership blogs to news, videos, case studies, tutorials and more. Take a
 look and join the conversation now. http://goparallel.sourceforge.net
 ___
 Firebird-net-provider mailing list
 Firebird-net-provider@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/firebird-net-provider

--
Dive into the World of Parallel Programming! The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net___
Firebird-net-provider mailing list
Firebird-net-provider@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider


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 j...@cincura.net:

  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 options are.

 --
 Mgr. Jiří Činčura
 Independent IT Specialist



 --
 Dive into the World of Parallel Programming! The Go Parallel Website,
 sponsored by Intel and developed in partnership with Slashdot Media, is
 your
 hub for all things parallel software development, from weekly thought
 leadership blogs to news, videos, case studies, tutorials and more. Take a
 look and join the conversation now. http://goparallel.sourceforge.net
 ___
 Firebird-net-provider mailing list
 Firebird-net-provider@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/firebird-net-provider

--
Dive into the World of Parallel Programming! The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net___
Firebird-net-provider mailing list
Firebird-net-provider@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider


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: Entity1_eid, Entity3_eid
Entity1Entity2: Entity1_eid, Entity2_eid
Will try to create index IX_Entity1_eid for both tables and fail on this.
I've added the table name to the index name: IX_Entity1Entity3_Entity1_eid,
and as I mentioned before I've experienced long name error.

2014-12-30 11:35 GMT+02:00 Геннадий Забула zabulu...@gmail.com:

 And looks like it works:
 public FbProviderServices()
 {
 #if (EF_6)
 AddDependencyResolver(new
 SingletonDependencyResolverIDbConnectionFactory(new
 FbConnectionFactory()));
 AddDependencyResolver(new
 SingletonDependencyResolverFuncMigrationSqlGenerator(() = new
 FbMigrationSqlGenerator(), ProviderInvariantName));

 System.Data.Entity.Infrastructure.Interception.DbInterception.Add(new
 MigrationsTransactionsInterceptor());
 #endif
 }

 2014-12-30 11:29 GMT+02:00 Геннадий Забула zabulu...@gmail.com:

 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 j...@cincura.net:

  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 options are.

 --
 Mgr. Jiří Činčura
 Independent IT Specialist



 --
 Dive into the World of Parallel Programming! The Go Parallel Website,
 sponsored by Intel and developed in partnership with Slashdot Media, is
 your
 hub for all things parallel software development, from weekly thought
 leadership blogs to news, videos, case studies, tutorials and more. Take
 a
 look and join the conversation now. http://goparallel.sourceforge.net
 ___
 Firebird-net-provider mailing list
 Firebird-net-provider@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/firebird-net-provider




--
Dive into the World of Parallel Programming! The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net___
Firebird-net-provider mailing list
Firebird-net-provider@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider


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 Migrations

And looks like it works:
public FbProviderServices()
  {
#if (EF_6)
  AddDependencyResolver(new 
SingletonDependencyResolverIDbConnectionFactory(new FbConnectionFactory()));
  AddDependencyResolver(new 
SingletonDependencyResolverFuncMigrationSqlGenerator(() = new 
FbMigrationSqlGenerator(), ProviderInvariantName));

System.Data.Entity.Infrastructure.Interception.DbInterception.Add(new 
MigrationsTransactionsInterceptor());
#endif
  }

2014-12-30 11:29 GMT+02:00 Геннадий Забула 
zabulu...@gmail.commailto:zabulu...@gmail.com:
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 
j...@cincura.netmailto:j...@cincura.net:
 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 options are.

--
Mgr. Jiří Činčura
Independent IT Specialist

--
Dive into the World of Parallel Programming! The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net
___
Firebird-net-provider mailing list
Firebird-net-provider@lists.sourceforge.netmailto:Firebird-net-provider@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider


--
Dive into the World of Parallel Programming! The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net___
Firebird-net-provider mailing list
Firebird-net-provider@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider


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 developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net
___
Firebird-net-provider mailing list
Firebird-net-provider@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider


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,
BeginTransactionInterceptionContext interceptionContext)
{
if (connection is FbConnection
 interceptionContext.IsolationLevel ==
IsolationLevel.Serializable
 IsInMigrations())
{
interceptionContext.Result =
connection.BeginTransaction(IsolationLevel.ReadCommitted);
}
}
 The name for index is created by EF if the explicit value is not provided.
Name conventions of EF is slightly different from Firebird. We need to
override this in the provider.

2014-12-30 11:57 GMT+02:00 Jiří Činčura j...@cincura.net:

 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 developed in partnership with Slashdot Media, is
 your
 hub for all things parallel software development, from weekly thought
 leadership blogs to news, videos, case studies, tutorials and more. Take a
 look and join the conversation now. http://goparallel.sourceforge.net
 ___
 Firebird-net-provider mailing list
 Firebird-net-provider@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/firebird-net-provider

--
Dive into the World of Parallel Programming! The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net___
Firebird-net-provider mailing list
Firebird-net-provider@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider


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

--
Dive into the World of Parallel Programming! The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net
___
Firebird-net-provider mailing list
Firebird-net-provider@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider


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 MigrationsTransactionsInterceptor to the
DbInterceptors (or maybe via AddDependencyResolver(new
SingletonDependencyResolverIDbInterceptor()) as suggested in
documentation: 
http://msdn.microsoft.com/ru-ru/library/system.data.entity.dbconfiguration.addinterceptor(v=vs.113).aspx),
because it is provider-specific crutch.

On Tue, Dec 30, 2014 at 12:15 PM, Jiří Činčura j...@cincura.net wrote:

 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

 --
 Dive into the World of Parallel Programming! The Go Parallel Website,
 sponsored by Intel and developed in partnership with Slashdot Media, is your
 hub for all things parallel software development, from weekly thought
 leadership blogs to news, videos, case studies, tutorials and more. Take a
 look and join the conversation now. http://goparallel.sourceforge.net
 ___
 Firebird-net-provider mailing list
 Firebird-net-provider@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/firebird-net-provider

--
Dive into the World of Parallel Programming! The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net
___
Firebird-net-provider mailing list
Firebird-net-provider@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider


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, Геннадий Забула zabulu...@gmail.com wrote:
 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 MigrationsTransactionsInterceptor to the
 DbInterceptors (or maybe via AddDependencyResolver(new
 SingletonDependencyResolverIDbInterceptor()) as suggested in
 documentation: 
 http://msdn.microsoft.com/ru-ru/library/system.data.entity.dbconfiguration.addinterceptor(v=vs.113).aspx),
 because it is provider-specific crutch.

 On Tue, Dec 30, 2014 at 12:15 PM, Jiří Činčura j...@cincura.net wrote:

 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

 --
 Dive into the World of Parallel Programming! The Go Parallel Website,
 sponsored by Intel and developed in partnership with Slashdot Media, is your
 hub for all things parallel software development, from weekly thought
 leadership blogs to news, videos, case studies, tutorials and more. Take a
 look and join the conversation now. http://goparallel.sourceforge.net
 ___
 Firebird-net-provider mailing list
 Firebird-net-provider@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/firebird-net-provider

--
Dive into the World of Parallel Programming! The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net
___
Firebird-net-provider mailing list
Firebird-net-provider@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider


Re: [Firebird-net-provider] EF Migrations

2014-12-30 Thread Jiří Činčura
 or maybe via AddDependencyResolver(new
 SingletonDependencyResolverIDbInterceptor()) 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 
work. Not sure why.

-- 
Mgr. Jiří Činčura
Independent IT Specialist


--
Dive into the World of Parallel Programming! The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net
___
Firebird-net-provider mailing list
Firebird-net-provider@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider


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 
SingletonDependencyResolverFuncMigrationSqlGenerator(() = new 
FbMigrationSqlGenerator(...

EF does not allow to plug custom services. :(

-- 
Mgr. Jiří Činčura
Independent IT Specialist


--
Dive into the World of Parallel Programming! The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net
___
Firebird-net-provider mailing list
Firebird-net-provider@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider


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 fine. Better than forcing people to 
derive from custom class, I think.

-- 
Mgr. Jiří Činčura
Independent IT Specialist


--
Dive into the World of Parallel Programming! The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net
___
Firebird-net-provider mailing list
Firebird-net-provider@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider