How can I map this:
public class Customer
{
private IList _orders;
public IEnumerable
GetAllOrders()
{
return _o
You can map a completely private collection using Reveal.Member()
, but it has a specific and non-obvious restriction: the Expression
that HasMany()
accepts has to return either IEnumerable
or object
.
For your class:
public class Customer
{
private IList _orders;
public IEnumerable GetAllOrders()
{
return _orders;
}
}
the following line will populate the _orders
collection:
HasMany(Reveal.Member>("_orders"));
//additional mapping behaviors
For completeness - the following line gives a compiler error:
HasMany(Reveal.Member>("_orders"));