it's good to know the options. I'll try this approach, sounds like it
On Jun 2, 1:53 am, James Gregory <
jagregory....@gmail.com> wrote:
> You don't need to have unpersisted entities in the same place as persisted
> ones (although you can, but your Where clause will be trickier). The
> separate namespace for unmapped classes is the simplest approach; however,
> if you're using the class as a base-class for a mapped entity then you may
> need to let FNH know how to find it.
>
> I'd use the WithSetup method to change how the automapper is configured so
> it knows that your base-class shouldn't be mapped as an entity.
>
> WithSetup(c => c.IsBaseClass =
> type => type == typeof(MyBaseEntity));
>
> Try that first to see if it makes any difference. If it doesn't, then you
> probably do need to let the automapper know where MyBaseEntity lives. You
> could either move it back into the location of your mapped entities or
> change your Where call to include it.
>
> Something like:
>
> Where(type =>
> type.Namespace == "Mydomain.Entities" || type == typeof(MyBaseEntity));
>