I have a question about the Criteria method, the one-to-many relationship to the database, the one to account , the many to sites when I use CreateCriteria() , something is wrong.
Example: SessionFactory.OpenSession().CreateCriteria(typeof(Account)).List().Count();
Before starting, I think SQL should be SELECT COUNT(*) FROM table , but SQL should be SELECT id, siteurl...FROM table . So what's wrong with that? How can I solve it?
And the First() method should be SELECT TOP1 ...FROM table , but this is SELECT ...FROM table
I am an unloved rookie, Please help me.
user297182
source share