views:

11

answers:

1

I'm trying to ignore the property which is a ReadOnlyCollection and map the private property. I'm getting the following error:

Could not find a setter for property 'MyCollection' in class 'Project.Core.MyClass'

This is the automapper for that class which is a component.

mapping.IgnoreProperty(x => x.MyCollection);
mapping.HasMany<CollectionObject>(Reveal.Member<MyClass>("myCollection")).Cascade.SaveUpdate();

Hope someone can help me on this one.

Thanks, Leonardo

A: 

It seems to me that you've run into the same issue as described in this fluentnh support request, where you'll also find a workaround.

Homer1980ar

related questions