Hudson -
Thanks for responding.
Essentially, I have two class libraries with DTO's in them. To
illustrate, I have created a simple mapping exercise against
Northwind, having to Clas libraries with one class each: Cateogry in
one, product in the other. Fluent Configuration is:
ISessionFactory sessionFactory = Fluently.Configure()
.Database(MsSqlConfiguration.MsSql2005.ConnectionString
(c => c.Is(@"Data Source=.\sqlexpress;Initial
Catalog=Northwind;Integrated Security=True")).ShowSql())
.Mappings(m => m.AutoMappings.Add(
AutoPersistenceModel.MapEntitiesFromAssemblyOf<Product>()
.AutoMap<Category>()
.WithSetup(s => s.IsBaseType = type => type == typeof
(BaseEntity))
.Where(type => type.IsSubclassOf(typeof(BaseEntity)))
.ConventionDiscovery.AddFromAssemblyOf<PluralizeTableNameConvention>)
).BuildSessionFactory();
The AutoMap<Cateogry> after the MapEntitesFromAssemblyOf<Product> will
produce the desired mappings, and gives me a desired reference between
Category and Product (via an IList<Product> Products property in
category).
What I was hoping was instead of using AutoMap<Category> (moving
beyond the simple exercise, there could be MANY AutoMap<> appended), I
could use something similar to MapEntitesFromAssemblyOf<Product>, but
for the Category assembly. I have also played with this:
Fluently.Configure()
.Mappings(m =>
{
m.AutoMappings.Add(new AutoPersistenceModel(typeof
(Category).assembly));
m.AutoMappings.Add(new AutoPersistenceModel(typeof
(Product).assembly));
});
But was not getting it to work.
Again, thanks for the feedback and any pointers.
Cheers!
C
> > Chuck- Hide quoted text -
>
> - Show quoted text -