| QueryExpressionParserBuildLinqExpression Method (Type, NameValueCollection, String, DictionaryString, FuncObject, Boolean, Boolean, Boolean, Boolean) |
Build expression for specified type
Namespace:
SanteDB.Core.Model.Query
Assembly:
SanteDB.Core.Model (in SanteDB.Core.Model.dll) Version: 3.0.481-alpha
Syntax public static LambdaExpression BuildLinqExpression(
Type modelType,
NameValueCollection httpQueryParameters,
string parameterName,
Dictionary<string, Func<Object>> variables = null,
bool safeNullable = true,
bool forceLoad = false,
bool lazyExpandVariables = true,
bool relayControlVariables = false
)
Public Shared Function BuildLinqExpression (
modelType As Type,
httpQueryParameters As NameValueCollection,
parameterName As String,
Optional variables As Dictionary(Of String, Func(Of Object)) = Nothing,
Optional safeNullable As Boolean = true,
Optional forceLoad As Boolean = false,
Optional lazyExpandVariables As Boolean = true,
Optional relayControlVariables As Boolean = false
) As LambdaExpression
public:
static LambdaExpression^ BuildLinqExpression(
Type^ modelType,
NameValueCollection^ httpQueryParameters,
String^ parameterName,
Dictionary<String^, Func<Object^>^>^ variables = nullptr,
bool safeNullable = true,
bool forceLoad = false,
bool lazyExpandVariables = true,
bool relayControlVariables = false
)
static member BuildLinqExpression :
modelType : Type *
httpQueryParameters : NameValueCollection *
parameterName : string *
?variables : Dictionary<string, Func<Object>> *
?safeNullable : bool *
?forceLoad : bool *
?lazyExpandVariables : bool *
?relayControlVariables : bool
(* Defaults:
let _variables = defaultArg variables null
let _safeNullable = defaultArg safeNullable true
let _forceLoad = defaultArg forceLoad false
let _lazyExpandVariables = defaultArg lazyExpandVariables true
let _relayControlVariables = defaultArg relayControlVariables false
*)
-> LambdaExpression
Parameters
- modelType
- Type: SystemType
The type of model to which the returned LINQ expression should accept as a parameter - httpQueryParameters
- Type: System.Collections.SpecializedNameValueCollection
The HTTP query parameter collection to parse into a LINQ expression - parameterName
- Type: SystemString
The name of the parameter in the Lambda expression - variables (Optional)
- Type: System.Collections.GenericDictionaryString, FuncObject
The variable evaluators to use when expanding $variable expressions in the HDSI path - safeNullable (Optional)
- Type: SystemBoolean
When true, use coalesce operators in the Lambda expression to provide a default value. This is useful if the LINQ expression will be used on memory objects - forceLoad (Optional)
- Type: SystemBoolean
When true, use the LoadProperty(IAnnotatedResource, String, Boolean) on all calls to load values on the path. This is useful if the resulting Linq expression is intended to be executed in memory - lazyExpandVariables (Optional)
- Type: SystemBoolean
When true, all variables in variables should be called in the LINQ expression, when false the variables are evaluated when the expression is created - relayControlVariables (Optional)
- Type: SystemBoolean
When true, the WithControl(Object, String, Object) extension method should be used to convey the control variables
Return Value
Type:
LambdaExpression[Missing <returns> documentation for "M:SanteDB.Core.Model.Query.QueryExpressionParser.BuildLinqExpression(System.Type,System.Collections.Specialized.NameValueCollection,System.String,System.Collections.Generic.Dictionary{System.String,System.Func{System.Object}},System.Boolean,System.Boolean,System.Boolean,System.Boolean)"]
See Also