Fabio, I dug into this some more, and if I am understanding correctly,
I would have to subclass not only ConventionModelMapper but also
SimpleModelInspector to get a hold of its
MatchNoReadOnlyPropertyPattern() class.

As an alternative, I'd like to request a change to how
IsPersistentProperty works (perhaps as a different call, so its not a
breaking change for other people). What I think would be more useful
is if the match function were fed the member info structure and the
result of the stock IsPersistentProperty calculation and then the
output could either agree or disagree. That way, I could have like

  mapper.IsPersistentProperty((info, isPersistent) => { if (info.Name
== "SkipMe") return false; else return isPersistent; });

Of course, even better would be

  mapper.Class<MyClass>(map.NotPersistentProperty(x => x.SkipMe));

I get that you were steering me towards implementing the latter for
myself, but I would submit that it would a useful feature in the core.

Thanks!!
-Michael



On May 31, 4:37 pm, Michael Teper <[email protected]> wrote:
> Fabio, what is the bool property being passed in to Func<MemberInfo,
> bool, bool> ?
>
> Thanks!
> -Michael
>
> On May 27, 5:23 am, Fabio Maulo <[email protected]> wrote:
>
>
>
> > Have a look to those IsXYZ accepting a Func<p, declared, result>
> > In your case to this
> > public void IsPersistentProperty(Func<MemberInfo, bool, bool> match)
>
> > Take care because it is just one method (not as in ConfORM), that mean that
> > you have to exclude all properties in one implementation....
> > but don't forget that this is OOP so you can:
> > - inherit from ConventionModelMapper
> > - add a method ExcludeProperty<TEntity>(Expression<Func<TEntity, object>>
> > property)
> > - in ExcludeProperty add those explicit exclusion to a collection
> > - implements IsPersistentProperty(Func<MemberInfo, bool, bool> match)
> > checking your collection- Hide quoted text -
>
> - Show quoted text -

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

Reply via email to