DaeMoohn
DaeMoohn

Reputation: 1097

Fluent NHibernate: How to map an IList<Dictionary<string, string>>

I would like to have a structure like this:

Mapping class
int ID {get;set;}
IList<KeyValuePair<string,string>> Criteria {get;set;}

Criteria class
int ID {get;set;}
int MappingID {get;set;}
string FirstCriterion {get;set;}
string SecondCriterion {get;set;}
(int index {get;set;})

How can I get this keyvaluepair mapped?

I tried with HasMany, but then it tells i reference an unmapped class (KeyValuePair). Should I use the IDictionary interface?

Upvotes: 1

Views: 545

Answers (1)

DaeMoohn
DaeMoohn

Reputation: 1097

I did build a custom type with the equivalent structure.

Upvotes: 1

Related Questions