Muhammad Akhtar
Muhammad Akhtar

Reputation: 52241

Getting Exception to Get record by ID using NHibernate

I am new to Nhibernate, I am trying to get record by ID and I am getting exception

Unknown entity class: DAL.Product

here is my line of code where I am getting exception..

Repository.Get<Product>(id);

What could be the issue?

Thanks for your help.

Upvotes: 0

Views: 221

Answers (1)

Claudio Redi
Claudio Redi

Reputation: 68400

What about checking if the xml mapping file is marked as "embedded resource"? If the xml is NOT marked as embedded resource you would get an error like that.

Upvotes: 3

Related Questions