I have a settings table without a primary key that I want to be able to select one column/one row from without any mappings.
How can I do this?
We can still use raw SQL (underlying DB Engine related):
var session = ... ; // standard session, with access to other mapped stuff
var sql = "SELECT settingCol FROM dbo.myTable WHERE ... ";
var result = session
.CreateSQLQuery(sql)
.UniqueResult<string>(); // or <int>
and work with that result without being mapped to any entity. Check the