Using built-in sql functions in a LINQ query?
c#, linq, t-sql
Solution
It depends on the provider. For example, in LINQ to Entities against SQL Server you can use `SqlFunctions` - which has a `UserName` method which corresponds to `USER_NAME()` in Transact-SQL. (There are many other methods and properties. For the current user, you can just use the `CurrentUser` property, for example.)
Problem
Is it possible to use buillt-in sql functions like user_name() in a LINQ query? If not, can I use something else?