Is it possible to construct a De开发者_运维问答tachedCriteria in nHibernate which queries a stored procedure? How would I accomplish such a task?
I have not done it but you can use some alternatives:
- Named Queries and SQL Queries
- Map to a view instead.
- Map to a TableValued Function (yes this I know this isn't great but it's got me out of a few jams)
No, it's not possible.
You have to use a SQLQuery to call a stored procedure.
精彩评论