You should be able to setup your FluentMappings with a Where method to
specify your namespace.

.Mappings(m => m.FluentMappings
      .AddFromAssemblyOf<Assembly.GetExecutingAssembly()>()
      .Where(x => x.Namespace == "MyNamespaceToMap"));

If you're using a MappingConfiguration with AutoMapping, you can also add an
override like:

public override bool ShouldMap(System.Type type)
{
  return type.BaseType.Namespace == typeof
(MyCore.BaseTypes.BaseIWant).Namespace;
}

-dl

---
David R. Longnecker
blog: http://blog.drlongnecker.com
twitter: dlongnecker




On Thu, Dec 2, 2010 at 1:35 PM, jormenz <[email protected]> wrote:

> My code is as follows:  .Mappings(m =>
> m.FluentMappings.AddFromAssemblyOf<Assembly.GetExecutingAssembly()>())
>
> I am finding that Fluent NHibernate is trying to map _all_ classes in
> the executing assembly that implement IMappingProvider,
> and a couple of other providers.  I'm wondering if there is a clean
> way to either:
>
> A) Map only entities in a specific namespace
>
> or
>
> B) Map only entities that inherit from ClassMap<T>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Fluent NHibernate" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<fluent-nhibernate%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/fluent-nhibernate?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Fluent NHibernate" 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/fluent-nhibernate?hl=en.

Reply via email to