Fluent NHibernate - How to map the foreign key column as a property

后端 未结 3 1632
不知归路
不知归路 2021-02-20 16:38

I am sure this is a straightforward question but consider the following: I have a reference between company and sector as follows:

public class Company {
    pub         


        
3条回答
  •  你的背包
    2021-02-20 17:06

    Steve you don't need ForeignKey property in POCO class.

    For example if you will try to get id of article author no join select will be performed.

    var authorID = Article.Author.ID

提交回复
热议问题