I have this simple class:
public class Spare : Entity
{
protected internal virtual string RejectReason { get; protected set; }
}
And when I try to map it with this:
internal class SpareMap : ClassMapping<Spare>
{
public SpareMap ()
{
this.Table ("Spares");
this.Id (x => x.Id, map => map.Generator (Generators.Identity));
this.Property (x => x.RejectReason);
}
}
I got exception:
System.ArgumentNullException: Value cannot be null.
> Parameter name: localMember
But it's all work ok with mapping like this:
this.Property ("RejectReason", map => map.Access (Accessor.Property));
Which is clearly not the way I want mapping by code look like (all those
magic strings even if I have access to the property).
I've also tries making the field internal (without protected) and tried
specifying various access rights with the first mapping example - still no
luck.
It's a bug?
--
You received this message because you are subscribed to the Google Groups
"nhusers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/nhusers.
For more options, visit https://groups.google.com/groups/opt_out.