NHibernate mapping problem - Could not initialize proxy - no Session
问题 I have just started to learn NHibernate, and are following tutorials. On my own learning project, I have made up a problem for myself. I have two tables: Team: TeamId* Name Match: MatchId* TeamAId TeamBId The model entities are: Team public virtual int? TeamId { get; private set; } public virtual string Name { get; set; } public virtual IList<Match> HomeMatches { get; set; } public virtual IList<Match> AwayMatches { get; set; } Match public virtual int? MatchId { get; private set; } public