I would like to create some table-value functions in SQL Server and use them from NHibernate 3 (I'm using Fluent NHibernate). What is the best way to do it? In most cases returned data will contain reference to another table and no column which can by used as primary key
1 Answer
You can give named queries a try (I say try because I must admit I never did this, but I worked with named queries).
In your case it should be a sql-query with the UDF addressed as dbo.[function name] and their must be a class in your mappings to use for the result set.