This question is locked. New answers and comments are not allowed.
Hi all!
I'm using fluent mapping and I'm trying to map a class that derive from KeyedCollection:
I try to apply the Dictionary property mapping approach, but I get the following exception:
Not implemented: No SCO factory registered for type: RangeCollection .
Class: ReferenceTable Field: ranges
Here is my code:
Is there a way to achieve this?
Thanks
I'm using fluent mapping and I'm trying to map a class that derive from KeyedCollection:
public
class
RangeCollection : KeyedCollection<Parameter, ReferenceTableRange>
{
protected
override
Parameter GetKeyForItem(ReferenceTableRange item)
{
return
item.Parameter;
}
}
I try to apply the Dictionary property mapping approach, but I get the following exception:
Not implemented: No SCO factory registered for type: RangeCollection .
Class: ReferenceTable Field: ranges
Here is my code:
MappingConfiguration<ReferenceTable> referenceTableConfiguration =
new
MappingConfiguration<ReferenceTable>();
referenceTableConfiguration.MapType().ToTable(
"ReferenceTable"
);
referenceTableConfiguration.HasProperty(referenceTable => referenceTable.Id).IsIdentity();
referenceTableConfiguration.HasProperty(p => p.IsValid).AsTransient();
referenceTableConfiguration.HasAssociation(r => r.Ranges).MapJoinTable(
"RefTableJoin"
);
mappingConfigurations.Add(referenceTableConfiguration);
MappingConfiguration<ReferenceTableRange> referenceTableRangeConfiguration =
new
MappingConfiguration<ReferenceTableRange>();
referenceTableRangeConfiguration.MapType().ToTable(
"ReferenceTableRange"
);
referenceTableConfiguration.HasProperty(r=>r.Id).IsIdentity();
referenceTableRangeConfiguration.HasProperty(range => range.ReferenceTableRangeId).IsIdentity();
mappingConfigurations.Add(referenceTableRangeConfiguration);
Is there a way to achieve this?
Thanks