How can I select a column within a dictionary value with nhibernate?
问题 I have structure similar to this: public class Entity { public int Id { get; set; } public IDictionary<string, EntityLocale> Locales { get; set; } } public class EntityLocale { public string Name { get; set; } } public class EntityMap : ClassMap<Entity> { public EntityMap() { HasMany(x => x.Locales) .AsMap<string>("Locale") .Component( c => { c.Map(x => x.Name); } ); } } And I want to recieve all names of product locales with a "en" key. With linq it will be: var names = Session.QueryOver