I'm new to NHibernate, So I'm not sure if I this is even the place to ask questions. But here goes.
This is my problem:
I am building a website using Orchard CMS. All the Orchard tables are mapped by NHibernate. I also have tables in the same database that are NOT mapped by NHibernate. These tables were provided by the client. I need to query these tables and display data on the front end using Orchard. I must keep the table schemas in tact. I have a tutorial on how to map tables using NHibernate, however everything I see in the tutorials, requires the tables to have an ID column as the Primary key. None of the tables provided to me by the client have ID as the first/Primary key column. Is it possible to map to these tables without using the ID method? Or a variation of the ID method?
Id(x => x.Id);
Instead can I map to the table using:
MyColumnName/Primarykey(x => x.Id);
Id(x => x.MyColumnname/PrimaryKey);
Again, at this point I cannot migrate the data into new tables mapped by NHibernate and also the table schema must remain in tact. As the Client is updating these tables on a nightly bases.
Any help is appreciated.