Linq to NHibernate and Group By
问题 I'm using the current Linq provider for NHibernate (version 2.1). I have two entities: VideoGame and GameDeveloper, with a many-to-one relationship between them. I'm trying to perform a query of this sort, which counts the number of video games each game developer has: from v in session.Linq<VideoGame>() group by v.Developer into developerGroup select new {developerGroup.Key.Name, Count = developerGroup.Count()} Enumerating this query causes an exception - "could not resolve property Key of