Registers a mapping from a CLR method to a server-side function.
Namespace:
Mindscape.LightSpeed.LinqAssembly: Mindscape.LightSpeed.Linq (in Mindscape.LightSpeed.Linq.dll)
Version: 4.0.0.0 (4.0.0.0)
Syntax
| C# |
|---|
public static void Register( MethodInfo clrMethod, string sqlFunctionName, int implicitArgumentIndex ) |
| Visual Basic (Declaration) |
|---|
Public Shared Sub Register ( _ clrMethod As MethodInfo, _ sqlFunctionName As String, _ implicitArgumentIndex As Integer _ ) |
Parameters
- clrMethod
- Type: System.Reflection..::.MethodInfo
The CLR method to be mapped.
- sqlFunctionName
- Type: System..::.String
The server-side function name.
- implicitArgumentIndex
- Type: System..::.Int32
The position in the server-side function's argument list at which the client-side implicit ('this') argument appears.
Remarks
To illustrate the use of implicitArgumentIndex, consider the following
client-side query: from m in uow.Members select m.UserName.IndexOf('a'). On SQL
Server this translates to CHARINDEX('a', UserName): i.e. the object to which
IndexOf was applied appears at index 1 in CHARINDEX's argument list. So the
implicitArgumentIndex should be 1.