Very interessent. Could you please open an issue at donjon and add a patch
to it. I'll have a look at it.

-Markus

2009/3/11 Karron Qiu <[email protected]>

> I like fluent nhibernate project very much. It provides a fluent api to
> configure nhibernate. I tried to port the configuration to ar. This is still
> a very rough implementation yet.
>
> I created a ARCfgSourceAdapter that implement IConfigurationSource. And
> created a PersistenceConfiguration to configure all the information.
>
> how to use it? there is some sample codes.
>
> var cfg = new ARFluentConfiguration();
>
>             cfg.Database(MsSqlConfiguration<ActiveRecordBase>
>                               .MsSql2005()
>
> .FromConnectionStringWithKey("TestConnection")
>                               .Driver<ExtSqlClientDriver>()
>                               .ShowSql()
>                               .QuerySubstitutions("true 1, false 0, yes
> 'Y', no 'N'")
>                               .AdoNetBatchSize(100)
>                 );
>
>             //If there is another database, you should config like this
>
> //cfg.Database<AnotherEntityBase>(MsSqlConfiguration<AnotherEntityBase>
>             //
> .MsSql2005<AnotherEntityBase>(cfg.ConfigurationSource)
>             //
> .FromConnectionStringWithKey("AnotherTestConnection")
>             //                  .Driver<ExtSqlClientDriver>()
>             //                  .ShowSql()
>             //                  .QuerySubstitutions("true 1, false 0, yes
> 'Y', no 'N'")
>             //                  .AdoNetBatchSize(100)
>             //    );
>
>             cfg.ConfigureConfigurationSource(c =>
>                                              c.AddFromAssemblyOf<Parent>()
>                                                  .SetIsWeb(false)
>
> .SetPluralizeTableNames(true)
>                 );
>
> ActiveRecordStarter.Initialize(cfg.ConfigurationSource.Assemblies.ToArray()
>                 , cfg.ConfigurationSource);
>
>
> I attached my codes for your reference.
>
>
> --
> Regards,
> Karron
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Castle Project Development List" 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/castle-project-devel?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to