CodeFluent Entities allows developers to specify SQL specific hints on its methods.
For instance, doing as so:
<cf:project xmlns:cf=“http://www.softfluent.com/codefluent/2005/1″ xmlns:cfps=“http://www.softfluent.com/codefluent/producers.sqlserver/2005/1″> <Customer> <Id /> <Name /> <cf:method name=“LoadByName” body=“load(string name) Where Name=@name” cfps:tableHint=“NOLOCK“ /> </Customer> </cf:project>
Will generate a T-SQL stored procedure with the NOLOCK hint applied to the Customer table.
A recurring question that we have is “which SQL Server hints does CodeFluent support?“. Well the answer is very straightforward: all of them! Since, the applied hint isn’t inferred from the specified value, it means that regarding CodeFluent, you could specify anything! All that matters is that the specified hint is actually supported by the targeted platform.
For an exhaustive hint list, please check-out your SQL Server’s corresponding documentation:
- SQL 2008: http://msdn.microsoft.com/en-us/library/ms181714.aspx
- SQL 2005: http://msdn.microsoft.com/en-us/library/ms181714(SQL.90).aspx
- SQL 2000: http://msdn.microsoft.com/en-us/library/aa213026(SQL.80).aspx
CodeFluent Entities R&D Team