Fluent NHibernate - Map 2 tables to one class
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I have a table structure something like this table Employees EmployeeID EmployeeLogin EmployeeCustID table Customers CustomerID CustomerName What i would like is to map the structure above to one single class named: Class Employee EmployeeID EmployeeLogin EmployeeName How do i do that with fluent nhibernate ? 回答1: I don't know if it is possible with fluent, but in xml you use the join element: simplified: See this post by Ayende 回答2: I agree with Frans above but if you're stuck with someone else's code and have to use the existing