initialize the datacontext with a different connectionstring

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for MySQL
Post Reply
infinitep
Posts: 17
Joined: Wed 08 Jul 2009 16:31

initialize the datacontext with a different connectionstring

Post by infinitep » Sun 18 Apr 2010 08:47

How do I initialize the datacontext with a different connectionstring for Linq to MySQL?

If i pass a connectionstring to initialize the context it doesnt seem to work if the database name is different to the one the context was created with.

Thanks.

infinitep
Posts: 17
Joined: Wed 08 Jul 2009 16:31

Post by infinitep » Mon 19 Apr 2010 09:51

I can live without this feature, the multiple selection (all in one properties editing) in the Entity Developer is more important than this. Part my bad on changing the development database to do a table comparission. Will restore the other way around for future compares.

AndreyR
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Mon 19 Apr 2010 14:29

There is a solution for the problem.
You should change the code generation template in the following way:
Replace the

Code: Select all

[Table(Name = @"")]
line with this one:

Code: Select all

[Table(Name = @"")]

Post Reply