Morph
Morph

Reputation: 299

NHibernate mappings

If I have a customer table with fields : Address1, Address2, Address3 - Is it possible to map these fields into one array of strings? So from an implementating point of view I would want to call Customer.Address[0] ?

Thanks

Upvotes: 2

Views: 64

Answers (2)

kitsune
kitsune

Reputation: 11643

You could use dynamic components, it will however return an IDictionary

Upvotes: 0

Vinay Sajip
Vinay Sajip

Reputation: 99297

It would be easier to map to three fields and use a separate indexer property to provide access.

Upvotes: 1

Related Questions