Hrm. What if we had a separate connection string builder that might have
wider applicability (outside of Fluent NHib).

 

Fluent NHib could use it, as could any one else.

 

ConnectionString.Is( new ConnectionString{ Server = "foo",
Database="bar", etc, etc} );

 

Of course, the ConnectionString object could have a fluent API as well.

 

Thoughts?

 

-c

 

From: fluent-nhibernate@googlegroups.com
[mailto:[EMAIL PROTECTED] On Behalf Of Dru Sellers
Sent: Saturday, September 13, 2008 10:35 AM
To: fluent-nhibernate@googlegroups.com
Subject: [fluent-nhib] Re: Fluent ConfigurationString

 

Q1. Do we like the idea of a connection string builder?

A1. Yes

Q2. Does it have to hang off of the NHConfig object?

A2. No

Q3. What's wrong with your lambda?

A3. ??

 

-d

 

 

 

 

 

On Sat, Sep 13, 2008 at 10:22 AM, Chad Myers <[EMAIL PROTECTED]> wrote:

The problem is, you have a sub-FI for the connection string and you're
"on that path" so there is no 'ToProperties' on the
'ConnectionStringExpression' (or whatever it'll be called)

 

Unless we put it there, but then that will end the ENTIRE config path.
What if you want to add other config properties AFTER your connection
string?

 

We could say that the connection string MUST be the last one, but I'm
not crazy about that idea, either.

 

-c

 

From: fluent-nhibernate@googlegroups.com
[mailto:[EMAIL PROTECTED] On Behalf Of Dru Sellers
Sent: Saturday, September 13, 2008 10:16 AM


To: fluent-nhibernate@googlegroups.com

Subject: [fluent-nhib] Re: Fluent ConfigurationString

 

The 'create' could be called internally when the .ToProperties is
called.

 

-d

On Sat, Sep 13, 2008 at 10:17 AM, Chad Myers <[EMAIL PROTECTED]> wrote:


Yeah, cool stuff!

I'm not super crazy about the 'Create' though.  For some reason,
dead-end paths smell to me. I'm not sure why, because it's not that bad.

How 'bout

.ConnectionString.Is(c=>c

       .Server("db-srv")
       .Database("tables")

       .Username("scott")
       .Password("tiger"))
.ToProperties();

?? Is that much better. Maybe not, I dunno.

-c


-----Original Message-----
From: fluent-nhibernate@googlegroups.com
[mailto:[EMAIL PROTECTED] On Behalf Of Stefan Lieser
Sent: Saturday, September 13, 2008 8:53 AM
To: fluent-nhibernate@googlegroups.com
Subject: [fluent-nhib] Fluent ConfigurationString


Hi,

what do you think about a fluent way to build connection strings?

MsSqlConfiguration.MsSql2005
    .ConnectionString
        .Server("db-srv")
        .Database("tables")
        .Username("toni tester")
        .Password("secret")
        .Create
    .ToProperties();

I've started to implement this and would contribute it as a patch.


Cheers,
Stefan Lieser
--
http://nhplugin.lieser-online.de




 

 

 

 

 




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

Reply via email to