I have a class like this
public SomeClass
{
private List<string> _strings = new List<string>();
public IEnumerable<string> Strings
{
{ get return _strings; }
}
}
How would I do the mapping for _strings?
I tried this, but it complains about the List typehandler not being found, which it doesn't complain about if I mapped it as an object.
<result property="_strings" column="value" />
So I searched Google and found this workaround (originally for a Java issue, no idea if it's suppose to work in C#)
<result property="_strings" resultMapping="someMapping.StringList"/>
<resultMap id="StringList" class="System.String">
<result property="" column="Value"/>
</resultMap>
This at least lets the test run, and it returns the rest of my object fine, and my list has the right number of entries, except they're all blank.
I think the problem is that the property attribute is blank, but I'm not sure whats suppose to go there. (I also tried using 'value', but that didn't work either). This seems like it should be a lot simpler and I'm just overlooking something obvious.
Thanks.