So, here are the options:
1. We can use an additional identifier in the connection string (I love this
idea). Can this work with Mono requirements?
2. Otherwise we can try to identify the suitable vendor, by:
   a. Identifying for each vendor if it can handle the provided connection
string
   b. Trying to use it
   c. All of this in a preferred order (at least, this solves the
randomness, so it's not that bad ;))

Does everyone find his ideas here?

On Tue, Oct 7, 2008 at 11:07, Atsushi Eno <[EMAIL PROTECTED]> wrote:

>
> In such cases, simply the defined order in the DBProviderFactories
> configuration could take effect.
>
> Or define custom configuration sections for DBLinq itself to determine
> preferred vendor types in order.
>
> An alternative solution is to create a static class to define
> the preferred order of vendors (something like
> DBLinqConfiguration.PreferredVendors). It could be combined
> with configuration settings, and it won't suck for those who
> don't like configuration settings.
>
> Though I have to say I do not love my idea. It is sort of hack ;)
>
> Atsushi Eno
>
> Pascal Craponne wrote:
> > This is not a tool problem, this is an API problem:
> >
> > If I want to create a DataContext given a connection string (the worst
> > case), how do I know, when I type
> > "new DataContext("database=mydb")"
> > which DbLinq vendor should be used internally (I assume several vendors
> > are already registered, which is not a problem).
> >
> > Even my solution (exposed a few messages ago), can not solve it in an
> > unique way. What if two vendors can handle a given connection string?
> >
> > On Tue, Oct 7, 2008 at 10:13, Andrus <[EMAIL PROTECTED]
> > <mailto:[EMAIL PROTECTED]>> wrote:
> >
> >
> >
> >      > A better idea, someone?
> >
> >     In entity framework you need to add an entry to machine.config in the
> >     <DbProviderFactories> section.
> >
> >     For PostgreSQL It should look like this:
> >
> >          <add name="Npgsql Data Provider" invariant="Npgsql"
> >     description=".Net
> >     Framework Data Provider for PostgreSQL Server"
> >     type="Npgsql.NpgsqlFactory,
> >     Npgsql,
> >     Version=1.99.2.0 <http://1.99.2.0>, Culture=neutral,
> >     PublicKeyToken=5d8b90d52f46fda7"/>
> >
> >     Sample edmgen (dbmetal/sqlmetal analoque) to generate the model
> files:
> >
> >     edmgen.exe /provider:Npgsql /mode:fullgeneration
> >     /connectionstring:"postgresql
> >     connection string" /project:ProjectNamespace
> >
> >     Maybe it is possible to use ADO .NET dataprovider factory as shown
> >     above.
> >
> >     Andrus.
> >
> >
> >
> >
> >
> >
> > --
> > Pascal.
> >
> > jabber/gtalk: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
> > msn: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
> >
> >
> > >
>
>
> >
>


-- 
Pascal.

jabber/gtalk: [EMAIL PROTECTED]
msn: [EMAIL PROTECTED]

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"DbLinq" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/dblinq?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to