Sample SQL:
+
+ select IdentityValue
+ from dbo.MyTable
+ where @@ROWCOUNT > 0 and IdentityValue = scope_identity()
+
+ or
+
+ select TimestampValue
+ from dbo.MyTable
+ where @@ROWCOUNT > 0 and Id = 1
+
+ Note that we filter on rowcount to ensure no rows are returned if no rows were modified.
+
+ On SQL Server 2005 and up, we have an additional syntax used for non integer return types:
+
+ declare @generatedValues table(ID uniqueidentifier)
+ insert dbo.MyTable
+ output ID into @generated_values
+ values (...);
+ select ID
+ from @generatedValues as g join dbo.MyTable as t on g.ID = t.ID
+ where @@ROWCOUNT > 0;
+ Filter(
+ b = Project( c.x
+ c = Extent(foo)
+ )
+ exists (
+ Filter(
+ c = Extent(foo)
+ b.x = c.x
+ )
+ )
+ )
+ The first Filter, Project and Extent will share the same SQL select statement.
+ The alias for the Project i.e. b, will be replaced with c.
+ If the alias c for the Filter within the exists clause is not renamed,
+ we will get a = Join(InnerJoin
+ b = Join(CrossJoin
+ c = Extent(foo)
+ d = Extent(foo)
+ )
+ e = Extent(foo)
+ on b.c.x = e.x
+ )
+ If translated directly, this will be translated to
+ FROM ( SELECT c.*, d.*
+ FROM foo as c
+ CROSS JOIN foo as d) as b
+ INNER JOIN foo as e on b.x' = e.x
+ It would be better to translate this as
+ FROM foo as c
+ CROSS JOIN foo as d
+ INNER JOIN foo as e on c.x = e.x
+ This allows the optimizer to choose an appropriate join ordering for evaluation.
+ Project(b.x
+ b = Filter(
+ c = Extent(foo)
+ c.x = 5)
+ )
+ The Extent node creates a new SqlSelectStatement. This is added to the
+ symbol table by the Filter as {c, Symbol(c)}. Thus, [NOT] EXISTS( ... )
+ IS [NOT] NULL
+ -- if the input was an extent
+ FROM = [SchemaName].[TableName]
+ -- if the input was a Project
+ FROM = (SELECT ... FROM ... WHERE ...)
+ These become
+ -- if the input was an extent
+ FROM = [SchemaName].[TableName] AS alias
+ -- if the input was a Project
+ FROM = (SELECT ... FROM ... WHERE ...) AS alias
+ and look like valid FROM clauses.
+ Finally, we have to add the alias to the global list of aliases used,
+ and also to the current symbol table.
+ -- originally {expression}
+ -- change that to
+ SELECT *
+ FROM {expression} as c
+ DbLimitExpression needs to start the statement but not add the default columns
+ update Foo
+ set ComplexTypeColumn.Bar()
+ where Id = 2
+ min(random(1, 1.1) * (2 ^ retryCount - 1), maxDelay)
+ The a = b AND c = d AND e = f
+ then the output is as follows:
+ leftProperties = {a, c, e}
+ rightProperties = {b, d, f}
+ See Walker class for an explanation of this coding pattern.
+ BindingContext context = ...;
+
+ // translate a "Where" lamba expression input.Where(i => i.X > 2);
+ LambdaExpression whereLambda = ...;
+ CqtExpression inputCqt = Translate(whereLambda.Arguments[1]);
+ CqtExpression inputBinding = CreateExpressionBinding(inputCqt).Var;
+
+ // push the scope defined by the parameter
+ context.PushBindingScope(new KeyValuePair{ParameterExpression, CqtExpression}(whereLambda.Parameters[0], inputBinding));
+
+ // translate the expression in this context
+ CqtExpression result = Translate(whereLambda.Expression);
+
+ // pop the scope
+ context.PopBindingScope();
+ true which means that EF will continue with the assumption
+ that the provider has the necessary types/resources rather than failing fast.
+ /*...*/ containing the specified text.
+ /*...*/ containing the specified text.
+
+
+
+ /*...*/ containing the specified text.
+
+ Tables[0].DefaultView[0].Price in C# or
+ Tables(0).DefaultView(0).Price in Visual Basic.
+
+ Tables[0].DefaultView[0].Price in C# or
+ Tables(0).DefaultView(0).Price in Visual Basic.
+
+ A flag to indicate whether an error should be thrown if no token is found.
+
+
+
+ /*...*/ containing the specified text.
+
+
+
+
+
+ Info will exclude Verbose messages and include Info,
+ Warning and Error messages.
+ Info will exclude Verbose messages and include Info,
+ Warning and Error messages.
+ Info will exclude Verbose messages and include Info,
+ Warning and Error messages.
+