EntityFramework
Serializes an that conforms to the restrictions of a single
CSDL schema file to an XML writer. The model to be serialized must contain a single
.
Serialize the to the XmlWriter.
The EdmModel to serialize.
The XmlWriter to serialize to
Occurs when an error is encountered serializing the model.
Information about an error that occurred processing an Entity Framework model.
Gets an optional value indicating which property of the source item caused the event to be raised.
Gets an optional descriptive message the describes the error that is being raised.
Gets a value indicating the that caused the event to be raised.
Contains additional attributes and properties of the
Note that objects are short lived and exist only to
make initialization easier. Instance of this type are not
compared to each other and arrays returned by array properties are copied to internal
collections in the ctor. Therefore it is fine to suppress the
Code Analysis messages.
Gets or sets the function schema.
The function schema.
Gets or sets the store function name.
The store function name.
Gets or sets the command text associated with the function.
The command text associated with the function.
Gets or sets the entity sets for the function.
The entity sets for the function.
Gets a value that indicates whether this is an aggregate function.
true if this is an aggregate function; otherwise, false.
Gets or sets whether this function is a built-in function.
true if this function is a built-in function; otherwise, false.
Gets or sets whether the function contains no arguments.
true if the function contains no arguments; otherwise, false.
Gets or sets whether this function can be composed.
true if this function can be composed; otherwise, false.
Gets or sets whether this function is from a provider manifest.
true if this function is from a provider manifest; otherwise, false.
Gets or sets whether this function is a cached store function.
true if this function is a cached store function; otherwise, false.
Gets or sets whether this function is a function import.
true if this function is a function import; otherwise, false.
Gets or sets the return parameters.
The return parameters.
Gets or sets the parameter type semantics.
The parameter type semantics.
Gets or sets the function parameters.
The function parameters.
author/email
author/name
author/uri
published
rights
summary
title
contributor/email
contributor/name
contributor/uri
category/@label
Plaintext
HTML
XHTML
updated
link/@href
link/@rel
link/@type
link/@hreflang
link/@title
link/@length
category/@term
category/@scheme
Serialize the to the XmlWriter
The DbModel to serialize
The XmlWriter to serialize to
Serializes the storage (database) section of an to XML.
Serialize the to the
The EdmModel to serialize
Provider information on the Schema element
ProviderManifestToken information on the Schema element
The XmlWriter to serialize to
true if model can be serialized, otherwise false
Serialize the to the
The EdmModel to serialize
Namespace name on the Schema element
Provider information on the Schema element
ProviderManifestToken information on the Schema element
The XmlWriter to serialize to
true if model can be serialized, otherwise false
Occurs when an error is encountered serializing the model.
A class derived from this class can be placed in the same assembly as a class derived from
to define Entity Framework configuration for an application.
Configuration is set by calling protected methods and setting protected properties of this
class in the constructor of your derived type.
The type to use can also be registered in the config file of the application.
See http://go.microsoft.com/fwlink/?LinkId=260883 for more information about Entity Framework configuration.
Any class derived from must have a public parameterless constructor
and that constructor should call this constructor.
The Singleton instance of for this app domain. This can be
set at application start before any Entity Framework features have been used and afterwards
should be treated as read-only.
Attempts to discover and load the associated with the given
type. This method is intended to be used by tooling to ensure that
the correct configuration is loaded into the app domain. Tooling should use this method
before accessing the property.
A type to use for configuration discovery.
Attempts to discover and load the from the given assembly.
This method is intended to be used by tooling to ensure that the correct configuration is loaded into
the app domain. Tooling should use this method before accessing the
property. If the tooling knows the type being used, then the
method should be used since it gives a greater chance that
the correct configuration will be found.
An to use for configuration discovery.
Call this method from the constructor of a class derived from to
add a instance to the Chain of Responsibility of resolvers that
are used to resolve dependencies needed by the Entity Framework.
Resolvers are asked to resolve dependencies in reverse order from which they are added. This means
that a resolver can be added to override resolution of a dependency that would already have been
resolved in a different way.
The exceptions to this is that any dependency registered in the application's config file
will always be used in preference to using a dependency resolver added here.
The resolver to add.
Call this method from the constructor of a class derived from to
add a instance to the Chain of Responsibility of resolvers that
are used to resolve dependencies needed by the Entity Framework. Unlike the AddDependencyResolver
method, this method puts the resolver at the bottom of the Chain of Responsibility such that it will only
be used to resolve a dependency that could not be resolved by any of the other resolvers.
A implementation is automatically registered as a default resolver
when it is added with a call to . This allows EF providers to act as
resolvers for other services that may need to be overridden by the provider.
The resolver to add.
Call this method from the constructor of a class derived from to register
an Entity Framework provider.
Note that the provider is both registered as a service itself and also registered as a default resolver with
a call to AddDefaultResolver. This allows EF providers to act as resolvers for other services that
may need to be overridden by the provider.
This method is provided as a convenient and discoverable way to add configuration to the Entity Framework.
Internally it works in the same way as using AddDependencyResolver to add an appropriate resolver for
and also using AddDefaultResolver to add the provider as a default
resolver. This means that, if desired, the same functionality can be achieved using a custom resolver or a
resolver backed by an Inversion-of-Control container.
The ADO.NET provider invariant name indicating the type of ADO.NET connection for which this provider will be used.
The provider instance.
Call this method from the constructor of a class derived from to register
an ADO.NET provider.
This method is provided as a convenient and discoverable way to add configuration to the Entity Framework.
Internally it works in the same way as using AddDependencyResolver to add an appropriate resolvers for
and . This means that, if desired,
the same functionality can be achieved using a custom resolver or a resolver backed by an
Inversion-of-Control container.
The ADO.NET provider invariant name indicating the type of ADO.NET connection for which this provider will be used.
The provider instance.
Call this method from the constructor of a class derived from to register an
for use with the provider represented by the given invariant name.
This method is provided as a convenient and discoverable way to add configuration to the Entity Framework.
Internally it works in the same way as using AddDependencyResolver to add an appropriate resolver for
. This means that, if desired, the same functionality can be achieved using
a custom resolver or a resolver backed by an Inversion-of-Control container.
The ADO.NET provider invariant name indicating the type of ADO.NET connection for which this execution strategy will be used.
A function that returns a new instance of an execution strategy.
Call this method from the constructor of a class derived from to register an
for use with the provider represented by the given invariant name and for a given server name.
This method is provided as a convenient and discoverable way to add configuration to the Entity Framework.
Internally it works in the same way as using AddDependencyResolver to add an appropriate resolver for
. This means that, if desired, the same functionality can be achieved using
a custom resolver or a resolver backed by an Inversion-of-Control container.
The ADO.NET provider invariant name indicating the type of ADO.NET connection for which this execution strategy will be used.
A function that returns a new instance of an execution strategy.
A string that will be matched against the server name in the connection string.
Sets the that is used to create connections by convention if no other
connection string or connection is given to or can be discovered by .
Note that a default connection factory is set in the app.config or web.config file whenever the
EntityFramework NuGet package is installed. As for all config file settings, the default connection factory
set in the config file will take precedence over any setting made with this method. Therefore the setting
must be removed from the config file before calling this method will have any effect.
Call this method from the constructor of a class derived from to change
the default connection factory being used.
This method is provided as a convenient and discoverable way to add configuration to the Entity Framework.
Internally it works in the same way as using AddDependencyResolver to add an appropriate resolver for
. This means that, if desired, the same functionality can be achieved using
a custom resolver or a resolver backed by an Inversion-of-Control container.
The connection factory.
Call this method from the constructor of a class derived from to
set the pluralization service.
The pluralization service to use.
Call this method from the constructor of a class derived from to
set the database initializer to use for the given context type. The database initializer is called when a
the given type is used to access a database for the first time.
The default strategy for Code First contexts is an instance of .
Calling this method is equivalent to calling .
This method is provided as a convenient and discoverable way to add configuration to the Entity Framework.
Internally it works in the same way as using AddDependencyResolver to add an appropriate resolver for
. This means that, if desired, the same functionality can be achieved using
a custom resolver or a resolver backed by an Inversion-of-Control container.
The type of the context.
The initializer to use, or null to disable initialization for the given context type.
Call this method from the constructor of a class derived from to register a
for use with the provider represented by the given invariant name.
This method is typically used by providers to register an associated SQL generator for Code First Migrations.
It is different from setting the generator in the because it allows
EF to use the Migrations pipeline to create a database even when there is no Migrations configuration in the project
and/or Migrations are not being explicitly used.
This method is provided as a convenient and discoverable way to add configuration to the Entity Framework.
Internally it works in the same way as using AddDependencyResolver to add an appropriate resolver for
. This means that, if desired, the same functionality can be achieved using
a custom resolver or a resolver backed by an Inversion-of-Control container.
The invariant name of the ADO.NET provider for which this generator should be used.
A delegate that returns a new instance of the SQL generator each time it is called.
Call this method from the constructor of a class derived from to set
an implementation of which allows provider manifest tokens to
be obtained from connections without necessarily opening the connection.
This method is provided as a convenient and discoverable way to add configuration to the Entity Framework.
Internally it works in the same way as using AddDependencyResolver to add an appropriate resolver for
. This means that, if desired, the same functionality can be achieved using
a custom resolver or a resolver backed by an Inversion-of-Control container.
The manifest token resolver.
Call this method from the constructor of a class derived from to set
an implementation of which allows a
to be obtained from a in cases where the default implementation is not
sufficient.
This method is provided as a convenient and discoverable way to add configuration to the Entity Framework.
Internally it works in the same way as using AddDependencyResolver to add an appropriate resolver for
. This means that, if desired, the same functionality can be achieved using
a custom resolver or a resolver backed by an Inversion-of-Control container.
The provider factory service.
Call this method from the constructor of a class derived from to set
a as the model cache key factory which allows the key
used to cache the model behind a to be changed.
This method is provided as a convenient and discoverable way to add configuration to the Entity Framework.
Internally it works in the same way as using AddDependencyResolver to add an appropriate resolver for
. This means that, if desired, the same functionality can
be achieved using a custom resolver or a resolver backed by an Inversion-of-Control container.
The key factory.
Call this method from the constructor of a class derived from to set
a delegate which which be used for
creation of the default for a any
. This default factory will only be used if no factory is
set explicitly in the and if no factory has been registered
for the provider in use using the
method.
This method is provided as a convenient and discoverable way to add configuration to the Entity Framework.
Internally it works in the same way as using AddDependencyResolver to add an appropriate resolver for
. This means that, if desired, the same functionality
can be achieved using a custom resolver or a resolver backed by an Inversion-of-Control container.
A factory for creating instances for a given and
representing the default schema.
Call this method from the constructor of a class derived from to set
a delegate which allows for creation of a customized
for the given provider for any
that does not have an explicit factory set.
This method is provided as a convenient and discoverable way to add configuration to the Entity Framework.
Internally it works in the same way as using AddDependencyResolver to add an appropriate resolver for
. This means that, if desired, the same functionality
can be achieved using a custom resolver or a resolver backed by an Inversion-of-Control container.
The invariant name of the ADO.NET provider for which this generator should be used.
A factory for creating instances for a given and
representing the default schema.
Call this method from the constructor of a class derived from to set
the global instance of which will be used whenever a spatial provider is
required and a provider-specific spatial provider cannot be found. Normally, a provider-specific spatial provider
is obtained from the a implementation which is in turn returned by resolving
a service for passing the provider invariant name as a key. However, this
cannot work for stand-alone instances of and since
it is impossible to know the spatial provider to use. Therefore, when creating stand-alone instances
of and the global spatial provider is always used.
This method is provided as a convenient and discoverable way to add configuration to the Entity Framework.
Internally it works in the same way as using AddDependencyResolver to add an appropriate resolver for
. This means that, if desired, the same functionality can be achieved using
a custom resolver or a resolver backed by an Inversion-of-Control container.
The spatial provider.
Call this method from the constructor of a class derived from to set
an implementation of to use for a specific provider and provider
manifest token.
Use
to register spatial services for use only when a specific manifest token is returned by the provider.
Use to register global
spatial services to be used when provider information is not available or no provider-specific
spatial services are found.
This method is provided as a convenient and discoverable way to add configuration to the Entity Framework.
Internally it works in the same way as using AddDependencyResolver to add an appropriate resolver for
. This means that, if desired, the same functionality can be achieved using
a custom resolver or a resolver backed by an Inversion-of-Control container.
The indicating the type of ADO.NET connection for which this spatial provider will be used.
The spatial provider.
Call this method from the constructor of a class derived from to set
an implementation of to use for a specific provider with any
manifest token.
Use
to register spatial services for use when any manifest token is returned by the provider.
Use to register global
spatial services to be used when provider information is not available or no provider-specific
spatial services are found.
This method is provided as a convenient and discoverable way to add configuration to the Entity Framework.
Internally it works in the same way as using AddDependencyResolver to add an appropriate resolver for
. This means that, if desired, the same functionality can be achieved using
a custom resolver or a resolver backed by an Inversion-of-Control container.
The ADO.NET provider invariant name indicating the type of ADO.NET connection for which this spatial provider will be used.
The spatial provider.
Call this method from the constructor of a class derived from to set
a factory for the type of to use with .
Note that setting the type of formatter to use with this method does change the way command are
logged when is used. It is still necessary to set a
instance onto before any commands will be logged.
For more low-level control over logging/interception see and
.
This method is provided as a convenient and discoverable way to add configuration to the Entity Framework.
Internally it works in the same way as using AddDependencyResolver to add an appropriate resolver for
. This means that, if desired, the same functionality can be achieved using
a custom resolver or a resolver backed by an Inversion-of-Control container.
A delegate that will create formatter instances.
Call this method from the constructor of a class derived from to
register an at application startup. Note that interceptors can also
be added and removed at any time using .
This method is provided as a convenient and discoverable way to add configuration to the Entity Framework.
Internally it works in the same way as using AddDependencyResolver to add an appropriate resolver for
. This means that, if desired, the same functionality can be achieved using
a custom resolver or a resolver backed by an Inversion-of-Control container.
The interceptor to register.
Gets the of the current instance.
The exact runtime type of the current instance.
Creates a shallow copy of the current .
A shallow copy of the current .
Occurs during EF initialization after the DbConfiguration has been constructed but just before
it is locked ready for use. Use this event to inspect and/or override services that have been
registered before the configuration is locked. Note that this event should be used carefully
since it may prevent tooling from discovering the same configuration that is used at runtime.
Handlers can only be added before EF starts to use the configuration and so handlers should
generally be added as part of application initialization. Do not access the DbConfiguration
static methods inside the handler; instead use the the members of
to get current services and/or add overrides.
Gets the that is being used to resolve service
dependencies in the Entity Framework.
This attribute can be placed on a subclass of to indicate that the subclass of
representing the code-based configuration for the application is in a different
assembly than the context type.
Normally a subclass of should be placed in the same assembly as
the subclass of used by the application. It will then be discovered automatically.
However, if this is not possible or if the application contains multiple context types in different
assemblies, then this attribute can be used to direct DbConfiguration discovery to the appropriate type.
An alternative to using this attribute is to specify the DbConfiguration type to use in the application's
config file. See http://go.microsoft.com/fwlink/?LinkId=260883 for more information.
Indicates that the given subclass of should be used for code-based configuration
for this application.
The type to use.
Indicates that the subclass of represented by the given assembly-qualified
name should be used for code-based configuration for this application.
The type to use.
Gets the subclass of that should be used for code-based configuration
for this application.
Implements the basic functionality required by aggregates in a GroupBy clause.
Gets the result type of this .
The result type of this .
Gets the list of expressions that define the arguments to this
.
The list of expressions that define the arguments to this
.
Represents the logical AND of two Boolean arguments. This class cannot be inherited.
Implements the basic functionality required by expressions that accept two expression operands.
Represents the base type for all expressions.
Implements the visitor pattern for expressions that do not produce a result value.
An instance of .
Implements the visitor pattern for expressions that produce a result value of a specific type.
The type of the result produced by .
An instance of .
The type of the result produced by visitor.
Determines whether the specified is equal to the current DbExpression instance.
True if the specified is equal to the current DbExpression instance; otherwise, false.
The object to compare to the current .
Serves as a hash function for the type.
A hash code for the current expression.
Creates a that represents the specified binary value, which may be null
A that represents the specified binary value.
The binary value on which the returned expression should be based.
Enables implicit casting from a byte array.
The value to be converted.
The converted value.
Creates a that represents the specified (nullable) Boolean value.
A that represents the specified Boolean value.
The Boolean value on which the returned expression should be based.
Enables implicit casting from .
The value to be converted.
The converted value.
Creates a that represents the specified (nullable) byte value.
A that represents the specified byte value.
The byte value on which the returned expression should be based.
Enables implicit casting from .
The value to be converted.
The converted value.
Creates a that represents the specified (nullable)
value.
A that represents the specified DateTime value.
The DateTime value on which the returned expression should be based.
Enables implicit casting from .
The expression to be converted.
The converted value.
Creates a that represents the specified (nullable)
value.
A that represents the specified DateTimeOffset value.
The DateTimeOffset value on which the returned expression should be based.
Enables implicit casting from .
The value to be converted.
The converted value.
Creates a that represents the specified (nullable) decimal value.
A that represents the specified decimal value.
The decimal value on which the returned expression should be based.
Enables implicit casting from .
The value to be converted.
The converted value.
Creates a that represents the specified (nullable) double value.
A that represents the specified double value.
The double value on which the returned expression should be based.
Enables implicit casting from .
The value to be converted.
The converted value.
Creates a that represents the specified
value, which may be null.
A that represents the specified DbGeography value.
The DbGeography value on which the returned expression should be based.
Enables implicit casting from .
The value to be converted.
The converted value.
Creates a that represents the specified
value, which may be null.
A that represents the specified DbGeometry value.
The DbGeometry value on which the returned expression should be based.
Enables implicit casting from .
The value to be converted.
The converted value.
Creates a that represents the specified (nullable)
value.
A that represents the specified Guid value.
The Guid value on which the returned expression should be based.
Enables implicit casting from .
The value to be converted.
The converted value.
Creates a that represents the specified (nullable) Int16 value.
A that represents the specified Int16 value.
The Int16 value on which the returned expression should be based.
Enables implicit casting from .
The value to be converted.
The converted value.
Creates a that represents the specified (nullable) Int32 value.
A that represents the specified Int32 value.
The Int32 value on which the returned expression should be based.
Enables implicit casting from .
The value to be converted.
The converted value.
Creates a that represents the specified (nullable) Int64 value.
A that represents the specified Int64 value.
The Int64 value on which the returned expression should be based.
Enables implicit casting from .
The value to be converted.
The converted value.
Creates a that represents the specified (nullable) Single value.
A that represents the specified Single value.
The Single value on which the returned expression should be based.
Enables implicit casting from .
The value to be converted.
The converted value.
Creates a that represents the specified string value.
A that represents the specified string value.
The string value on which the returned expression should be based.
Enables implicit casting from .
The value to be converted.
The converted value.
Gets the type metadata for the result type of the expression.
The type metadata for the result type of the expression.
Gets the kind of the expression, which indicates the operation of this expression.
The kind of the expression, which indicates the operation of this expression.
Gets the that defines the left argument.
The that defines the left argument.
The expression is null.
The expression is not associated with the command tree of the
,or its result type is not equal or promotable to the required type for the left argument.
Gets the that defines the right argument.
The that defines the right argument.
The expression is null.
The expression is not associated with the command tree of the
,or its result type is not equal or promotable to the required type for the right argument.
Implements the visitor pattern for expressions that do not produce a result value.
An instance of .
visitor is null.
Implements the visitor pattern for expressions that produce a result value of a specific type.
A result value of a specific type produced by
.
An instance of a typed that produces a result value of a specific type.
The type of the result produced by the visitor .
visitor is null.
Represents an apply operation, which is the invocation of the specified function for each element in the specified input set. This class cannot be inherited.
Implements the visitor pattern for expressions that do not produce a result value.
An instance of .
visitor is null.
Implements the visitor pattern for expressions that produce a result value of a specific type.
A result value of a specific type produced by
.
An instance of a typed that produces a result value of a specific type.
The type of the result produced by the visitor .
visitor is null.
Gets the that specifies the function that is invoked for each element in the input set.
The that specifies the function that is invoked for each element in the input set.
Gets the that specifies the input set.
The that specifies the input set.
Represents an arithmetic operation applied to numeric arguments.
Addition, subtraction, multiplication, division, modulo, and negation are arithmetic operations.
This class cannot be inherited.
Implements the visitor pattern for expressions that do not produce a result value.
An instance of .
visitor is null.
Implements the visitor pattern for expressions that produce a result value of a specific type.
A result value of a specific type produced by
.
An instance of a typed that produces a result value of a specific type.
The type of the result produced by visitor .
visitor is null.
Gets the list of elements that define the current arguments.
A fixed-size list of elements.
Represents the When, Then, and Else clauses of the
. This class cannot be inherited.
Implements the visitor pattern for expressions that do not produce a result value.
An instance of .
visitor is null.
Implements the visitor pattern for expressions that produce a result value of a specific type.
A result value of a specific type produced by
.
An instance of a typed that produces a result value of a specific type.
The type of the result produced by visitor.
visitor is null.
Gets the When clauses of this .
The When clauses of this .
Gets the Then clauses of this .
The Then clauses of this .
Gets the Else clause of this .
The Else clause of this .
The expression is null.
The expression is not associated with the command tree of the
,or its result type is not equal or promotable to the result type of the
.
Represents the type conversion of a single argument to the specified type. This class cannot be inherited.
Implements the basic functionality required by expressions that accept a single expression argument.
Gets the that defines the argument.
The that defines the argument.
The expression is null.
The expression is not associated with the command tree of a
, or its result type is not equal or promotable to the required type for the argument.
Implements the visitor pattern for expressions that do not produce a result value.
An instance of .
visitor is null.
Implements the visitor pattern for expressions that produce a result value of a specific type.
A result value of a specific type produced by
.
An instance of a typed that produces a result value of a specific type.
The type of the result produced by visitor.
visitor is null.
Describes the different "kinds" (classes) of command trees.
A query to retrieve data
Update existing data
Insert new data
Deleted existing data
Call a function
Represents a comparison operation applied to two arguments. Equality, greater than, greater than or equal, less than, less than or equal, and inequality are comparison operations. This class cannot be inherited.
DbComparisonExpression requires that its arguments have a common result type
that is equality comparable (for .Equals and .NotEquals),
order comparable (for .GreaterThan and .LessThan),
or both (for .GreaterThanOrEquals and .LessThanOrEquals).
Implements the visitor pattern for expressions that do not produce a result value.
An instance of .
visitor is null.
Implements the visitor pattern for expressions that produce a result value of a specific type.
A result value of a specific type produced by
.
An instance of a typed that produces a result value of a specific type.
The type of the result produced by visitor.
visitor is null.
Represents different kinds of constants (literals). This class cannot be inherited.
Provides direct access to the constant value, even for byte[] constants.
The object value contained by this constant expression, not a copy.
Implements the visitor pattern for expressions that do not produce a result value.
An instance of .
visitor is null.
Implements the visitor pattern for expressions that produce a result value of a specific type.
A result value of a specific type produced by
.
An instance of a typed that produces a result value of a specific type.
The type of the result produced by visitor.
visitor is null.
Gets the constant value.
The constant value.
Represents an unconditional join operation between the given collection arguments. This class cannot be inherited.
Implements the visitor pattern for expressions that do not produce a result value.
An instance of .
visitor is null.
Implements the visitor pattern for expressions that produce a result value of a specific type.
A result value of a specific type produced by
.
An instance of a typed that produces a result value of a specific type.
The type of the result produced by visitor.
visitor is null.
Gets a list that provides the input sets to the join.
A list that provides the input sets to the join.
Represents the an expression that retrieves an entity based on the specified reference. This class cannot be inherited.
Implements the visitor pattern for expressions that do not produce a result value.
An instance of .
visitor is null.
Implements the visitor pattern for expressions that produce a result value of a specific type.
A result value of a specific type produced by
.
An instance of a typed that produces a result value of a specific type.
The type of the result produced by visitor.
visitor is null.
Removes duplicate elements from the specified set argument. This class cannot be inherited.
Implements the visitor pattern for expressions that do not produce a result value.
An instance of .
visitor is null.
Implements the visitor pattern for expressions that produce a result value of a specific type.
A result value of a specific type produced by
.
An instance of a typed that produces a result value of a specific type.
The type of the result produced by visitor.
visitor is null.
Represents the conversion of the specified set argument to a singleton. This class cannot be inherited.
Implements the visitor pattern for expressions that do not produce a result value.
An instance of .
visitor is null.
Implements the visitor pattern for expressions that produce a result value of a specific type.
A result value of a specific type produced by
.
An instance of a typed that produces a result value of a specific type.
The type of the result produced by visitor.
visitor is null.
Is the result type of the element equal to the result type of the single property
of the element of its operand?
Represents an expression that extracts a reference from the underlying entity instance. This class cannot be inherited.
Implements the visitor pattern for expressions that do not produce a result value.
An instance of .
visitor is null.
Implements the visitor pattern for expressions that produce a result value of a specific type.
A result value of a specific type produced by
.
An instance of a typed that produces a result value of a specific type.
The type of the result produced by visitor.
visitor is null.
Represents the set subtraction operation between the left and right operands. This class cannot be inherited.
Implements the visitor pattern for expressions that do not produce a result value.
An instance of .
visitor is null.
Implements the visitor pattern for expressions that produce a result value of a specific type.
A result value of a specific type produced by
.
An instance of a typed that produces a result value of a specific type.
The type of the result produced by visitor.
visitor is null.
Describes a binding for an expression. Conceptually similar to a foreach loop
in C#. The DbExpression property defines the collection being iterated over,
while the Var property provides a means to reference the current element
of the collection during the iteration. DbExpressionBinding is used to describe the set arguments
to relational expressions such as ,
and .
Gets the that defines the input set.
The that defines the input set.
The expression is null.
The expression is not associated with the command tree of the binding, or its result type is not equal or promotable to the result type of the current value of the property.
Gets the name assigned to the element variable.
The name assigned to the element variable.
Gets the type metadata of the element variable.
The type metadata of the element variable.
Gets the that references the element variable.
The variable reference.
Represents a predicate applied to filter an input set. This produces the set of elements that satisfy the predicate. This class cannot be inherited.
Implements the visitor pattern for expressions that do not produce a result value.
An instance of .
visitor is null.
Implements the visitor pattern for expressions that produce a result value of a specific type.
A result value of a specific type produced by
.
An instance of a typed that produces a result value of a specific type.
The type of the result produced by visitor .
visitor is null.
Gets the that specifies the input set.
The that specifies the input set.
Gets the that specifies the predicate used to filter the input set.
The that specifies the predicate used to filter the input set.
The expression is null.
The expression is not associated with the command tree of the
, or its result type is not a Boolean type.
Represents an invocation of a function. This class cannot be inherited.
Implements the visitor pattern for expressions that do not produce a result value.
An instance of .
visitor is null.
Implements the visitor pattern for expressions that produce a result value of a specific type.
A result value of a specific type produced by
.
An instance of a typed that produces a result value of a specific type.
The type of the result produced by visitor .
visitor is null.
Gets the metadata for the function to invoke.
The metadata for the function to invoke.
Gets an list that provides the arguments to the function.
An list that provides the arguments to the function.
Represents a collection of elements that compose a group.
Represents a group by operation. A group by operation is a grouping of the elements in the input set based on the specified key expressions followed by the application of the specified aggregates. This class cannot be inherited.
Implements the visitor pattern for expressions that do not produce a result value.
An instance of .
visitor is null.
Implements the visitor pattern for expressions that produce a result value of a specific type.
A result value of a specific type produced by
.
An instance of a typed that produces a result value of a specific type.
The type of the result produced by visitor .
visitor is null.
Gets the that specifies the input set and provides access to the set element and group element variables.
The that specifies the input set and provides access to the set element and group element variables.
Gets a list that provides grouping keys.
A list that provides grouping keys.
Gets a list that provides the aggregates to apply.
A list that provides the aggregates to apply.
Represents the set intersection operation between the left and right operands. This class cannot be inherited.
DbIntersectExpression requires that its arguments have a common collection result type
Implements the visitor pattern for expressions that do not produce a result value.
An instance of .
visitor is null.
Implements the visitor pattern for expressions that produce a result value of a specific type.
A result value of a specific type produced by
.
An instance of a typed that produces a result value of a specific type.
The type of the result produced by visitor .
visitor is null.
Represents an empty set determination applied to a single set argument. This class cannot be inherited.
Implements the visitor pattern for expressions that do not produce a result value.
An instance of .
visitor is null.
Implements the visitor pattern for expressions that produce a result value of a specific type.
A result value of a specific type produced by
.
An instance of a typed that produces a result value of a specific type.
The type of the result produced by visitor .
visitor is null.
Represents null determination applied to a single argument. This class cannot be inherited.
Implements the visitor pattern for expressions that do not produce a result value.
An instance of .
visitor is null.
Implements the visitor pattern for expressions that produce a result value of a specific type.
A result value of a specific type produced by
.
An instance of a typed that produces a result value of a specific type.
The type of the result produced by visitor .
visitor is null.
Represents the type comparison of a single argument against the specified type. This class cannot be inherited.
Implements the visitor pattern for expressions that do not produce a result value.
An instance of .
visitor is null.
Implements the visitor pattern for expressions that produce a result value of a specific type.
A result value of a specific type produced by
.
An instance of a typed that produces a result value of a specific type.
The type of the result produced by visitor .
visitor is null.
Gets the type metadata that the type metadata of the argument should be compared to.
The type metadata that the type metadata of the argument should be compared to.
Represents an inner, left outer, or full outer join operation between the given collection arguments on the specified join condition.
Implements the visitor pattern for expressions that do not produce a result value.
An instance of .
visitor is null.
Implements the visitor pattern for expressions that produce a result value of a specific type.
A result value of a specific type produced by
.
An instance of a typed that produces a result value of a specific type.
The type of the result produced by visitor .
visitor is null.
Gets the that provides the left input.
The that provides the left input.
Gets the that provides the right input.
The that provides the right input.
Gets the join condition to apply.
The join condition to apply.
The expression is null.
The expression is not associated with the command tree of the
, or its result type is not a Boolean type.
Allows the application of a lambda function to arguments represented by
objects.
The visitor pattern method for expression visitors that do not produce a result value.
An instance of .
visitor is null
The visitor pattern method for expression visitors that produce a result value of a specific type.
The type of the result produced by the expression visitor.
An instance of a typed that produces a result value of type TResultType.
The type of the result produced by visitor
visitor is null
Gets the representing the Lambda function applied by this expression.
The representing the Lambda function applied by this expression.
Gets a list that provides the arguments to which the Lambda function should be applied.
The list.
Represents a string comparison against the specified pattern with an optional escape string. This class cannot be inherited.
Implements the visitor pattern for expressions that do not produce a result value.
An instance of .
visitor is null.
Implements the visitor pattern for expressions that produce a result value of a specific type.
A result value of a specific type produced by
.
An instance of a typed that produces a result value of a specific type.
The type of the result produced by visitor .
visitor is null.
Gets an expression that specifies the string to compare against the given pattern.
An expression that specifies the string to compare against the given pattern.
The expression is null.
The expression is not associated with the command tree of
, or its result type is not a string type.
Gets an expression that specifies the pattern against which the given string should be compared.
An expression that specifies the pattern against which the given string should be compared.
The expression is null.
The expression is not associated with the command tree of
, or its result type is not a string type.
Gets an expression that provides an optional escape string to use for the comparison.
An expression that provides an optional escape string to use for the comparison.
The expression is null.
The expression is not associated with the command tree of
, or its result type is not a string type.
Represents the restriction of the number of elements in the argument collection to the specified limit value.
Implements the visitor pattern for expressions that do not produce a result value.
An instance of .
visitor is null.
Implements the visitor pattern for expressions that produce a result value of a specific type.
A result value of a specific type produced by
.
An instance of a typed that produces a result value of a specific type.
The type of the result produced by visitor .
visitor is null.
Gets an expression that specifies the input collection.
An expression that specifies the input collection.
The expression is null.
The expression is not associated with the command tree of the
, or its result type is not a collection type.
Gets an expression that specifies the limit on the number of elements returned from the input collection.
An expression that specifies the limit on the number of elements returned from the input collection.
The expression is null.
The expression is not associated with the command tree of the
, or is not one of
or
, or its result type is not equal or promotable to a 64-bit integer type.
Gets whether the limit operation will include tied results. Including tied results might produce more results than specified by the
value.
true if the limit operation will include tied results; otherwise, false. The default is false.
Represents the construction of a new instance of a given type, including set and record types. This class cannot be inherited.
Implements the visitor pattern for expressions that do not produce a result value.
An instance of .
visitor is null.
Implements the visitor pattern for expressions that produce a result value of a specific type.
A result value of a specific type produced by
.
An instance of a typed that produces a result value of a specific type.
The type of the result produced by visitor .
visitor is null.
Gets an list that provides the property/column values or set elements for the new instance.
An list that provides the property/column values or set elements for the new instance.
Gets the related entity references (if any) for an entity constructor.
May be null if no related entities were specified - use the property to determine this.
Represents the logical NOT of a single Boolean argument. This class cannot be inherited.
Implements the visitor pattern for expressions that do not produce a result value.
An instance of .
visitor is null.
Implements the visitor pattern for expressions that produce a result value of a specific type.
A result value of a specific type produced by
.
An instance of a typed that produces a result value of a specific type.
The type of the result produced by visitor .
visitor is null.
Represents a reference to a typed null literal. This class cannot be inherited.
Implements the visitor pattern for expressions that do not produce a result value.
An instance of .
visitor is null.
Implements the visitor pattern for expressions that produce a result value of a specific type.
A result value of a specific type produced by
.
An instance of a typed that produces a result value of a specific type.
The type of the result produced by visitor .
visitor is null.
Represents the retrieval of elements of the specified type from the given set argument. This class cannot be inherited.
Implements the visitor pattern for expressions that do not produce a result value.
An instance of .
visitor is null.
Implements the visitor pattern for expressions that produce a result value of a specific type.
A result value of a specific type produced by
.
An instance of a typed that produces a result value of a specific type.
The type of the result produced by visitor .
visitor is null.
Gets the metadata of the type of elements that should be retrieved from the set argument.
The metadata of the type of elements that should be retrieved from the set argument.
Represents the logical OR of two Boolean arguments. This class cannot be inherited.
Implements the visitor pattern for expressions that do not produce a result value.
An instance of .
visitor is null.
Implements the visitor pattern for expressions that produce a result value of a specific type.
A result value of a specific type produced by
.
An instance of a typed that produces a result value of a specific type.
The type of the result produced by visitor .
visitor is null.
Represents a reference to a parameter declared on the command tree that contains this expression. This class cannot be inherited.
Implements the visitor pattern for expressions that do not produce a result value.
An instance of .
visitor is null.
Implements the visitor pattern for expressions that produce a result value of a specific type.
A result value of a specific type produced by
.
An instance of a typed that produces a result value of a specific type.
The type of the result produced by visitor .
visitor is null.
Gets the name of the referenced parameter.
The name of the referenced parameter.
Represents the projection of a given input set over the specified expression. This class cannot be inherited.
Implements the visitor pattern for expressions that do not produce a result value.
An instance of .
visitor is null.
Implements the visitor pattern for expressions that produce a result value of a specific type.
A result value of a specific type produced by
.
An instance of a typed that produces a result value of a specific type.
The type of the result produced by visitor .
visitor is null.
Gets the that specifies the input set.
The that specifies the input set.
Gets the that defines the projection.
The that defines the projection.
The expression is null.
The expression is not associated with the command tree of the
, or its result type is not equal or promotable to the reference type of the current projection.
Provides methods and properties for retrieving an instance property. This class cannot be inherited.
Implements the visitor pattern for expressions that do not produce a result value.
An instance of .
visitor is null.
Implements the visitor pattern for expressions that produce a result value of a specific type.
A result value of a specific type produced by
.
An instance of a typed that produces a result value of a specific type.
The type of the result produced by visitor .
visitor is null.
Creates a new key/value pair based on this property expression.
A new key/value pair with the key and value derived from the
.
Enables implicit casting to .
The expression to be converted.
The converted value.
Gets the property metadata for the property to retrieve.
The property metadata for the property to retrieve.
Gets a that defines the instance from which the property should be retrieved.
A that defines the instance from which the property should be retrieved.
The expression is null.
The expression is not associated with the command tree of the
, or its result type is not equal or promotable to the type that defines the property.
Represents a quantifier operation of the specified kind over the elements of the specified input set. This class cannot be inherited.
Implements the visitor pattern for expressions that do not produce a result value.
An instance of .
visitor is null.
Implements the visitor pattern for expressions that produce a result value of a specific type.
A result value of a specific type produced by
.
An instance of a typed that produces a result value of a specific type.
The type of the result produced by visitor .
visitor is null.
Gets the that specifies the input set.
The that specifies the input set.
Gets the Boolean predicate that should be evaluated for each element in the input set.
The Boolean predicate that should be evaluated for each element in the input set.
The expression is null.
The expression is not associated with the command tree for the
,or its result type is not a Boolean type.
Represents a strongly typed reference to a specific instance within an entity set. This class cannot be inherited.
Implements the visitor pattern for expressions that do not produce a result value.
An instance of .
visitor is null.
Implements the visitor pattern for expressions that produce a result value of a specific type.
A result value of a specific type produced by
.
An instance of a typed that produces a result value of a specific type.
The type of the result produced by visitor .
visitor is null.
Gets the metadata for the entity set that contains the instance.
The metadata for the entity set that contains the instance.
Encapsulates the result (represented as a Ref to the resulting Entity) of navigating from
the specified source end of a relationship to the specified target end. This class is intended
for use only with , where an 'owning' instance of that class
represents the source Entity involved in the relationship navigation.
Instances of DbRelatedEntityRef may be specified when creating a that
constructs an Entity, allowing information about Entities that are related to the newly constructed Entity to be captured.
Retrieves the 'source' end of the relationship navigation satisfied by this related entity Ref
Retrieves the 'target' end of the relationship navigation satisfied by this related entity Ref
Retrieves the entity Ref that is the result of navigating from the source to the target end of this related entity Ref
Represents the navigation of a relationship. This class cannot be inherited.
Implements the visitor pattern for expressions that do not produce a result value.
An instance of .
visitor is null.
Implements the visitor pattern for expressions that produce a result value of a specific type.
A result value of a specific type produced by
.
An instance of a typed that produces a result value of a specific type.
The type of the result produced by visitor .
visitor is null.
Gets the metadata for the relationship over which navigation occurs.
The metadata for the relationship over which navigation occurs.
Gets the metadata for the relationship end to navigate from.
The metadata for the relationship end to navigate from.
Gets the metadata for the relationship end to navigate to.
The metadata for the relationship end to navigate to.
Gets an that specifies the starting point of the navigation and must be a reference to an entity instance.
An that specifies the instance of the source relationship end from which navigation should occur.
The expression is null.
The expression is not associated with the command tree of the
, or its result type is not equal or promotable to the reference type of the
property.
Skips a specified number of elements in the input set.
can only be used after the input collection has been sorted as specified by the sort keys.
Implements the visitor pattern for expressions that do not produce a result value.
An instance of .
visitor is null.
Implements the visitor pattern for expressions that produce a result value of a specific type.
A result value of a specific type produced by
.
An instance of a typed that produces a result value of a specific type.
The type of the result produced by visitor .
visitor is null.
Gets the that specifies the input set.
The that specifies the input set.
Gets a list that defines the sort order.
A list that defines the sort order.
Gets an expression that specifies the number of elements to skip from the input collection.
An expression that specifies the number of elements to skip from the input collection.
The expression is null.
The expression is not associated with the command tree of the
; the expression is not either a
or a
; or the result type of the expression is not equal or promotable to a 64-bit integer type.
Specifies a sort key that can be used as part of the sort order in a
. This class cannot be inherited.
Gets a Boolean value indicating whether or not this sort key uses an ascending sort order.
true if this sort key uses an ascending sort order; otherwise, false.
Gets a string value that specifies the collation for this sort key.
A string value that specifies the collation for this sort key.
Gets the that provides the value for this sort key.
The that provides the value for this sort key.
Represents a sort operation applied to the elements of the specified input set based on the given sort keys. This class cannot be inherited.
Implements the visitor pattern for expressions that do not produce a result value.
An instance of .
visitor is null.
Implements the visitor pattern for expressions that produce a result value of a specific type.
A result value of a specific type produced by
.
An instance of a typed that produces a result value of a specific type.
The type of the result produced by
visitor
visitor
is null.
Gets the that specifies the input set.
The that specifies the input set.
Gets a list that defines the sort order.
A list that defines the sort order.
Represents a type conversion operation applied to a polymorphic argument. This class cannot be inherited.
Implements the visitor pattern for expressions that do not produce a result value.
An instance of .
visitor is null.
Implements the visitor pattern for expressions that produce a result value of a specific type.
A result value of a specific type produced by
.
An instance of a typed that produces a result value of a specific type.
The type of the result produced by visitor .
visitor is null.
Supports standard aggregate functions, such as MIN, MAX, AVG, SUM, and so on. This class cannot be inherited.
Gets a value indicating whether this aggregate is a distinct aggregate.
true if the aggregate is a distinct aggregate; otherwise, false.
Gets the method metadata that specifies the aggregate function to invoke.
The method metadata that specifies the aggregate function to invoke.
An abstract base type for types that implement the IExpressionVisitor interface to derive from.
An abstract base type for types that implement the IExpressionVisitor interface to derive from.
Defines the basic functionality that should be implemented by visitors that do not return a result value.
When overridden in a derived class, handles any expression of an unrecognized type.
The expression to be handled.
When overridden in a derived class, implements the visitor pattern for
.
The that is visited.
When overridden in a derived class, implements the visitor pattern for
.
The that is visited.
When overridden in a derived class, implements the visitor pattern for
.
The that is visited.
When overridden in a derived class, implements the visitor pattern for
.
The that is visited.
When overridden in a derived class, implements the visitor pattern for
.
The that is visited.
When overridden in a derived class, implements the visitor pattern for
.
The that is visited.
When overridden in a derived class, implements the visitor pattern for
.
The that is visited.
When overridden in a derived class, implements the visitor pattern for
.
The that is visited.
When overridden in a derived class, implements the visitor pattern for
.
The that is visited.
When overridden in a derived class, implements the visitor pattern for
.
The that is visited.
When overridden in a derived class, implements the visitor pattern for
.
The that is visited.
When overridden in a derived class, implements the visitor pattern for
.
The that is visited.
When overridden in a derived class, implements the visitor pattern for
.
The that is visited.
When overridden in a derived class, implements the visitor pattern for
.
The that is visited.
When overridden in a derived class, implements the visitor pattern for
.
The that is visited.
When overridden in a derived class, implements the visitor pattern for
.
The that is visited.
When overridden in a derived class, implements the visitor pattern for
.
The that is visited.
When overridden in a derived class, implements the visitor pattern for
.
The that is visited.
When overridden in a derived class, implements the visitor pattern for
.
The that is visited.
When overridden in a derived class, implements the visitor pattern for
.
The that is visited.
When overridden in a derived class, implements the visitor pattern for
.
The that is visited.
When overridden in a derived class, implements the visitor pattern for
.
The that is visited.
When overridden in a derived class, implements the visitor pattern for
.
The that is visited.
When overridden in a derived class, implements the visitor pattern for
.
The that is visited.
When overridden in a derived class, implements the visitor pattern for
.
The that is visited.
When overridden in a derived class, implements the visitor pattern for
.
The that is visited.
When overridden in a derived class, implements the visitor pattern for
.
The that is visited.
When overridden in a derived class, implements the visitor pattern for
.
The that is visited.
When overridden in a derived class, implements the visitor pattern for
.
The that is visited.
When overridden in a derived class, implements the visitor pattern for
.
The that is visited.
When overridden in a derived class, implements the visitor pattern for
.
The that is visited.
When overridden in a derived class, implements the visitor pattern for
.
The that is visited.
When overridden in a derived class, implements the visitor pattern for
.
The that is visited.
When overridden in a derived class, implements the visitor pattern for
.
The that is visited.
When overridden in a derived class, implements the visitor pattern for
.
The that is visited.
When overridden in a derived class, implements the visitor pattern for
.
The that is visited.
When overridden in a derived class, implements the visitor pattern for
.
The that is visited.
When overridden in a derived class, implements the visitor pattern for
.
The that is visited.
When overridden in a derived class, implements the visitor pattern for
.
The that is visited.
When overridden in a derived class, implements the visitor pattern for
.
The that is visited.
When overridden in a derived class, implements the visitor pattern for
.
The that is visited.
When overridden in a derived class, implements the visitor pattern for
.
The that is visited.
Visitor pattern method for DbInExpression.
The DbInExpression that is being visited.
Convenience method to visit the specified .
The DbUnaryExpression to visit.
is null
Convenience method to visit the specified .
The DbBinaryExpression to visit.
is null
Convenience method to visit the specified .
The DbExpressionBinding to visit.
is null
Convenience method for post-processing after a DbExpressionBinding has been visited.
The previously visited DbExpressionBinding.
Convenience method to visit the specified .
The DbGroupExpressionBinding to visit.
is null
Convenience method indicating that the grouping keys of a have been visited and the aggregates are now about to be visited.
The DbGroupExpressionBinding of the DbGroupByExpression
Convenience method for post-processing after a DbGroupExpressionBinding has been visited.
The previously visited DbGroupExpressionBinding.
Convenience method indicating that the body of a Lambda is now about to be visited.
The DbLambda that is about to be visited
is null
Convenience method for post-processing after a DbLambda has been visited.
The previously visited DbLambda.
Convenience method to visit the specified , if non-null.
The expression to visit.
is null
Convenience method to visit each in the given list, if the list is non-null.
The list of expressions to visit.
is null
Convenience method to visit each in the list, if the list is non-null.
The list of aggregates to visit.
is null
Convenience method to visit the specified .
The aggregate to visit.
is null
Called when an of an otherwise unrecognized type is encountered.
The expression
is null
Always thrown if this method is called, since it indicates that
is of an unsupported type
Visitor pattern method for .
The DbConstantExpression that is being visited.
is null
Visitor pattern method for .
The DbNullExpression that is being visited.
is null
Visitor pattern method for .
The DbVariableReferenceExpression that is being visited.
is null
Visitor pattern method for .
The DbParameterReferenceExpression that is being visited.
is null
Visitor pattern method for .
The DbFunctionExpression that is being visited.
is null
Visitor pattern method for .
The DbLambdaExpression that is being visited.
is null
Visitor pattern method for .
The DbPropertyExpression that is being visited.
is null
Visitor pattern method for .
The DbComparisonExpression that is being visited.
is null
Visitor pattern method for .
The DbLikeExpression that is being visited.
is null
Visitor pattern method for .
The DbLimitExpression that is being visited.
is null
Visitor pattern method for .
The DbIsNullExpression that is being visited.
is null
Visitor pattern method for .
The DbArithmeticExpression that is being visited.
is null
Visitor pattern method for .
The DbAndExpression that is being visited.
is null
Visitor pattern method for .
The DbOrExpression that is being visited.
is null
Visitor pattern method for .
The DbInExpression that is being visited.
is null
Visitor pattern method for .
The DbNotExpression that is being visited.
is null
Visitor pattern method for .
The DbDistinctExpression that is being visited.
is null
Visitor pattern method for .
The DbElementExpression that is being visited.
is null
Visitor pattern method for .
The DbIsEmptyExpression that is being visited.
is null
Visitor pattern method for .
The DbUnionAllExpression that is being visited.
is null
Visitor pattern method for .
The DbIntersectExpression that is being visited.
is null
Visitor pattern method for .
The DbExceptExpression that is being visited.
is null
Visitor pattern method for .
The DbOfTypeExpression that is being visited.
is null
Visitor pattern method for .
The DbTreatExpression that is being visited.
is null
Visitor pattern method for .
The DbCastExpression that is being visited.
is null
Visitor pattern method for .
The DbIsOfExpression that is being visited.
is null
Visitor pattern method for .
The DbCaseExpression that is being visited.
is null
Visitor pattern method for .
The DbNewInstanceExpression that is being visited.
is null
Visitor pattern method for .
The DbRefExpression that is being visited.
is null
Visitor pattern method for .
The DbRelationshipNavigationExpression that is being visited.
is null
Visitor pattern method for .
The DeRefExpression that is being visited.
is null
Visitor pattern method for .
The DbRefKeyExpression that is being visited.
is null
Visitor pattern method for .
The DbEntityRefExpression that is being visited.
is null
Visitor pattern method for .
The DbScanExpression that is being visited.
is null
Visitor pattern method for .
The DbFilterExpression that is being visited.
is null
Visitor pattern method for .
The DbProjectExpression that is being visited.
is null
Visitor pattern method for .
The DbCrossJoinExpression that is being visited.
is null
Visitor pattern method for .
The DbJoinExpression that is being visited.
is null
Visitor pattern method for .
The DbApplyExpression that is being visited.
is null
Visitor pattern method for .
The DbExpression that is being visited.
is null
Visitor pattern method for .
The DbSkipExpression that is being visited.
is null
Visitor pattern method for .
The DbSortExpression that is being visited.
is null
Visitor pattern method for .
The DbQuantifierExpression that is being visited.
is null
Implements the visitor pattern for the set clause.
The set clause.
Implements the visitor pattern for the modification clause.
The modification clause.
Implements the visitor pattern for the collection of modification clauses.
The modification clauses.
Implements the visitor pattern for the command tree.
The command tree.
Implements the visitor pattern for the delete command tree.
The delete command tree.
Implements the visitor pattern for the function command tree.
The function command tree.
Implements the visitor pattern for the insert command tree.
The insert command tree.
Implements the visitor pattern for the query command tree.
The query command tree.
Implements the visitor pattern for the update command tree.
The update command tree.
An immutable class that implements the basic functionality for the Query, Insert, Update, Delete, and function invocation command tree types.
Initializes a new command tree with a given metadata workspace.
The metadata workspace against which the command tree should operate.
The logical 'space' that metadata in the expressions used in this command tree must belong to.
Gets the name and type of each parameter declared on the command tree.
Returns a that represents this command.
A that represents this command.
Gets the name and corresponding type of each parameter that can be referenced within this
.
The name and corresponding type of each parameter that can be referenced within this
.
Gets the kind of this command tree.
Gets the metadata workspace used by this command tree.
Gets the data space in which metadata used by this command tree must reside.
Represents a single row delete operation expressed as a command tree. This class cannot be inherited.
Represents a data manipulation language (DML) operation expressed as a command tree.
Gets the that specifies the target table for the data manipulation language (DML) operation.
The that specifies the target table for the DML operation.
Returns true if this modification command returns a reader (for instance, to return server generated values)
Initializes a new instance of the class.
The model this command will operate on.
The data space.
The target table for the data manipulation language (DML) operation.
A predicate used to determine which members of the target collection should be deleted.
Gets an that specifies the predicate used to determine which members of the target collection should be deleted.
The predicate can include only the following elements:
- Equality expression
- Constant expression
- IsNull expression
- Property expression
- Reference expression to the target
- And expression
- Or expression
- Not expression
An that specifies the predicate used to determine which members of the target collection should be deleted.
Gets the kind of this command tree.
The kind of this command tree.
Contains values that each expression class uses to denote the operation it represents. The
property of an
can be retrieved to determine which operation that expression represents.
True for all.
Logical And.
True for any.
Conditional case statement.
Polymorphic type cast.
A constant value.
Cross apply
Cross join
Dereference.
Duplicate removal.
Division.
Set to singleton conversion.
Entity ref value retrieval.
Equality
Set subtraction
Restriction.
Full outer join
Invocation of a stand-alone function
Greater than.
Greater than or equal.
Grouping.
Inner join
Set intersection.
Empty set determination.
Null determination.
Type comparison (specified Type or Subtype).
Type comparison (specified Type only).
Left outer join
Less than.
Less than or equal.
String comparison.
Result count restriction (TOP n).
Subtraction.
Modulo.
Multiplication.
Instance, row, and set construction.
Logical Not.
Inequality.
Null.
Set members by type (or subtype).
Set members by (exact) type.
Logical Or.
Outer apply.
A reference to a parameter.
Addition.
Projection.
Retrieval of a static or instance property.
Reference.
Ref key value retrieval.
Navigation of a (composition or association) relationship.
Entity or relationship set scan.
Skip elements of an ordered collection.
Sorting.
Type conversion.
Negation.
Set union (with duplicates).
A reference to a variable.
Application of a lambda function
In.
The last value in the DbExpressionKind enumeration.
Defines the basic functionality that should be implemented by visitors that return a result value of a specific type.
The type of the result produced by the visitor.
When overridden in a derived class, handles any expression of an unrecognized type.
A result value of a specific type.
The that is being visited.
When overridden in a derived class, implements the visitor pattern for
.
A result value of a specific type.
The that is being visited.
When overridden in a derived class, implements the visitor pattern for
.
A result value of a specific type.
The that is being visited.
When overridden in a derived class, implements the visitor pattern for
.
A result value of a specific type.
The that is being visited.
When overridden in a derived class, implements the visitor pattern for
.
A result value of a specific type.
The that is being visited.
When overridden in a derived class, implements the visitor pattern for
.
A result value of a specific type.
The that is being visited.
When overridden in a derived class, implements the visitor pattern for
.
A result value of a specific type.
The that is being visited.
When overridden in a derived class, implements the visitor pattern for
.
A result value of a specific type.
The that is being visited.
When overridden in a derived class, implements the visitor pattern for
.
A result value of a specific type.
The that is being visited.
When overridden in a derived class, implements the visitor pattern for
.
A result value of a specific type.
The that is being visited.
When overridden in a derived class, implements the visitor pattern for
.
A result value of a specific type.
The that is being visited.
When overridden in a derived class, implements the visitor pattern for
.
A result value of a specific type.
The that is being visited.
When overridden in a derived class, implements the visitor pattern for
.
A result value of a specific type.
The that is being visited.
When overridden in a derived class, implements the visitor pattern for
.
A result value of a specific type.
The that is being visited.
When overridden in a derived class, implements the visitor pattern for
.
A result value of a specific type.
The that is being visited.
When overridden in a derived class, implements the visitor pattern for
.
A result value of a specific type.
The that is being visited.
When overridden in a derived class, implements the visitor pattern for
.
A result value of a specific type.
The that is being visited.
When overridden in a derived class, implements the visitor pattern for
.
A result value of a specific type.
The that is being visited.
When overridden in a derived class, implements the visitor pattern for
.
A result value of a specific type.
The that is being visited.
When overridden in a derived class, implements the visitor pattern for
.
A result value of a specific type.
The that is being visited.
When overridden in a derived class, implements the visitor pattern for
.
A result value of a specific type.
The that is being visited.
When overridden in a derived class, implements the visitor pattern for
.
A result value of a specific type.
The that is being visited.
When overridden in a derived class, implements the visitor pattern for
.
A result value of a specific type.
The that is being visited.
When overridden in a derived class, implements the visitor pattern method for
.
A result value of a specific type.
The that is being visited.
When overridden in a derived class, implements the visitor pattern for
.
A result value of a specific type.
The that is being visited.
When overridden in a derived class, implements the visitor pattern for
.
A result value of a specific type.
The that is being visited.
When overridden in a derived class, implements the visitor pattern for
.
A result value of a specific type.
The that is being visited.
When overridden in a derived class, implements the visitor pattern for
.
A result value of a specific type.
The that is being visited.
When overridden in a derived class, implements the visitor pattern for
.
A result value of a specific type.
The that is being visited.
When overridden in a derived class, implements the visitor pattern for
.
A result value of a specific type.
The that is being visited.
When overridden in a derived class, implements the visitor pattern for
.
A result value of a specific type.
The that is being visited.
When overridden in a derived class, implements the visitor pattern for
.
A result value of a specific type.
The that is being visited.
When overridden in a derived class, implements the visitor pattern for
.
A result value of a specific type.
The that is being visited.
When overridden in a derived class, implements the visitor pattern for
.
A result value of a specific type.
The that is being visited.
When overridden in a derived class, implements the visitor pattern for
.
A result value of a specific type.
The that is being visited.
When overridden in a derived class, implements the visitor pattern for
.
A result value of a specific type.
The that is being visited.
When overridden in a derived class, implements the visitor pattern for
.
A result value of a specific type.
The that is being visited.
When overridden in a derived class, implements the visitor pattern for
.
A result value of a specific type.
The that is being visited.
When overridden in a derived class, implements the visitor pattern for
.
A result value of a specific type.
The that is being visited.
When overridden in a derived class, implements the visitor pattern for
.
A result value of a specific type.
The that is being visited.
When overridden in a derived class, implements the visitor pattern for
.
A result value of a specific type.
The that is being visited.
When overridden in a derived class, implements the visitor pattern for
.
A result value of a specific type.
The that is being visited.
When overridden in a derived class, implements the visitor pattern for
.
A result value of a specific type.
The that is being visited.
Typed visitor pattern method for DbInExpression.
The DbInExpression that is being visited.
An instance of TResultType.
Represents the invocation of a database function.
Constructs a new DbFunctionCommandTree that uses the specified metadata workspace, data space and function metadata
The metadata workspace that the command tree should use.
The logical 'space' that metadata in the expressions used in this command tree must belong to.
, or is null
does not represent a valid data space or
is a composable function
Gets the that represents the function that is being invoked.
The that represents the function that is being invoked.
Gets the expected result type for the function’s first result set.
The expected result type for the function’s first result set.
Gets or sets the command tree kind.
The command tree kind.
Represents a single row insert operation expressed as a command tree. This class cannot be inherited.
Represents a single row insert operation expressed as a canonical command tree.
When the property is set, the command returns a reader; otherwise,
it returns a scalar value indicating the number of rows affected.
Initializes a new instance of the class.
The model this command will operate on.
The data space.
The target table for the data manipulation language (DML) operation.
The list of insert set clauses that define the insert operation. .
A that specifies a projection of results to be returned, based on the modified rows.
Gets the list of insert set clauses that define the insert operation.
The list of insert set clauses that define the insert operation.
Gets an that specifies a projection of results to be returned based on the modified rows.
An that specifies a projection of results to be returned based on the modified rows. null indicates that no results should be returned from this command.
Gets the command tree kind.
The command tree kind.
Represents a Lambda function that can be invoked to produce a
.
Creates a with the specified inline Lambda function implementation and formal parameters.
A new DbLambda that describes an inline Lambda function with the specified body and formal parameters
An expression that defines the logic of the Lambda function
A collection that represents the formal parameters to the Lambda function. These variables are valid for use in the body expression.
is null or contains null, or
is null
contains more than one element with the same variable name.
Creates a with the specified inline Lambda function implementation and formal parameters.
A new DbLambda that describes an inline Lambda function with the specified body and formal parameters
An expression that defines the logic of the Lambda function
A collection that represents the formal parameters to the Lambda function. These variables are valid for use in the body expression.
is null or contains null, or
is null.
contains more than one element with the same variable name.
Creates a new with a single argument of the specified type, as defined by the specified function.
A new DbLambda that describes an inline Lambda function with the specified body and single formal parameter.
A that defines the EDM type of the argument to the Lambda function
A function that defines the logic of the Lambda function as a
is null, or
is null or produces a result of null.
Creates a new with arguments of the specified types, as defined by the specified function.
A new DbLambda that describes an inline Lambda function with the specified body and formal parameters.
A that defines the EDM type of the first argument to the Lambda function
A that defines the EDM type of the second argument to the Lambda function
A function that defines the logic of the Lambda function as a
is null,
is null, or
is null or produces a result of null.
Creates a new with arguments of the specified types, as defined by the specified function.
A new DbLambda that describes an inline Lambda function with the specified body and formal parameters.
A that defines the EDM type of the first argument to the Lambda function
A that defines the EDM type of the second argument to the Lambda function
A that defines the EDM type of the third argument to the Lambda function
A function that defines the logic of the Lambda function as a
is null,
is null,
is null, or
is null or produces a result of null.
Creates a new with arguments of the specified types, as defined by the specified function.
A new DbLambda that describes an inline Lambda function with the specified body and formal parameters.
A that defines the EDM type of the first argument to the Lambda function
A that defines the EDM type of the second argument to the Lambda function
A that defines the EDM type of the third argument to the Lambda function
A that defines the EDM type of the fourth argument to the Lambda function
A function that defines the logic of the Lambda function as a
is null,
is null,
is null,
is null, or
is null or produces a result of null.
Creates a new with arguments of the specified types, as defined by the specified function.
A new DbLambda that describes an inline Lambda function with the specified body and formal parameters.
A that defines the EDM type of the first argument to the Lambda function
A that defines the EDM type of the second argument to the Lambda function
A that defines the EDM type of the third argument to the Lambda function
A that defines the EDM type of the fourth argument to the Lambda function
A that defines the EDM type of the fifth argument to the Lambda function
A function that defines the logic of the Lambda function as a
is null,
is null,
is null,
is null,
is null, or
is null or produces a result of null.
Creates a new with arguments of the specified types, as defined by the specified function.
A new DbLambda that describes an inline Lambda function with the specified body and formal parameters.
A that defines the EDM type of the first argument to the Lambda function
A that defines the EDM type of the second argument to the Lambda function
A that defines the EDM type of the third argument to the Lambda function
A that defines the EDM type of the fourth argument to the Lambda function
A that defines the EDM type of the fifth argument to the Lambda function
A that defines the EDM type of the sixth argument to the Lambda function
A function that defines the logic of the Lambda function as a
is null,
is null,
is null,
is null,
is null,
is null, or
is null or produces a result of null.
Creates a new with arguments of the specified types, as defined by the specified function.
A new DbLambda that describes an inline Lambda function with the specified body and formal parameters.
A that defines the EDM type of the first argument to the Lambda function
A that defines the EDM type of the second argument to the Lambda function
A that defines the EDM type of the third argument to the Lambda function
A that defines the EDM type of the fourth argument to the Lambda function
A that defines the EDM type of the fifth argument to the Lambda function
A that defines the EDM type of the sixth argument to the Lambda function
A that defines the EDM type of the seventh argument to the Lambda function
A function that defines the logic of the Lambda function as a
is null,
is null,
is null,
is null,
is null,
is null,
is null, or
is null or produces a result of null.
Creates a new with arguments of the specified types, as defined by the specified function.
A new DbLambda that describes an inline Lambda function with the specified body and formal parameters.
A that defines the EDM type of the first argument to the Lambda function
A that defines the EDM type of the second argument to the Lambda function
A that defines the EDM type of the third argument to the Lambda function
A that defines the EDM type of the fourth argument to the Lambda function
A that defines the EDM type of the fifth argument to the Lambda function
A that defines the EDM type of the sixth argument to the Lambda function
A that defines the EDM type of the seventh argument to the Lambda function
A that defines the EDM type of the eighth argument to the Lambda function
A function that defines the logic of the Lambda function as a
is null,
is null,
is null,
is null,
is null,
is null,
is null,
is null, or
is null or produces a result of null.
Creates a new with arguments of the specified types, as defined by the specified function.
A new DbLambda that describes an inline Lambda function with the specified body and formal parameters.
A that defines the EDM type of the first argument to the Lambda function
A that defines the EDM type of the second argument to the Lambda function
A that defines the EDM type of the third argument to the Lambda function
A that defines the EDM type of the fourth argument to the Lambda function
A that defines the EDM type of the fifth argument to the Lambda function
A that defines the EDM type of the sixth argument to the Lambda function
A that defines the EDM type of the seventh argument to the Lambda function
A that defines the EDM type of the eighth argument to the Lambda function
A that defines the EDM type of the ninth argument to the Lambda function
A function that defines the logic of the Lambda function as a
is null,
is null,
is null,
is null,
is null,
is null,
is null,
is null,
is null, or
is null or produces a result of null.
Creates a new with arguments of the specified types, as defined by the specified function.
A new DbLambda that describes an inline Lambda function with the specified body and formal parameters.
A that defines the EDM type of the first argument to the Lambda function
A that defines the EDM type of the second argument to the Lambda function
A that defines the EDM type of the third argument to the Lambda function
A that defines the EDM type of the fourth argument to the Lambda function
A that defines the EDM type of the fifth argument to the Lambda function
A that defines the EDM type of the sixth argument to the Lambda function
A that defines the EDM type of the seventh argument to the Lambda function
A that defines the EDM type of the eighth argument to the Lambda function
A that defines the EDM type of the ninth argument to the Lambda function
A that defines the EDM type of the tenth argument to the Lambda function
A function that defines the logic of the Lambda function as a
is null,
is null,
is null,
is null,
is null,
is null,
is null,
is null,
is null,
is null, or
is null or produces a result of null.
Creates a new with arguments of the specified types, as defined by the specified function.
A new DbLambda that describes an inline Lambda function with the specified body and formal parameters.
A that defines the EDM type of the first argument to the Lambda function
A that defines the EDM type of the second argument to the Lambda function
A that defines the EDM type of the third argument to the Lambda function
A that defines the EDM type of the fourth argument to the Lambda function
A that defines the EDM type of the fifth argument to the Lambda function
A that defines the EDM type of the sixth argument to the Lambda function
A that defines the EDM type of the seventh argument to the Lambda function
A that defines the EDM type of the eighth argument to the Lambda function
A that defines the EDM type of the ninth argument to the Lambda function
A that defines the EDM type of the tenth argument to the Lambda function
A that defines the EDM type of the eleventh argument to the Lambda function
A function that defines the logic of the Lambda function as a
is null,
is null,
is null,
is null,
is null,
is null,
is null,
is null,
is null,
is null,
is null, or
is null or produces a result of null.
Creates a new with arguments of the specified types, as defined by the specified function.
A new DbLambda that describes an inline Lambda function with the specified body and formal parameters.
A that defines the EDM type of the first argument to the Lambda function
A that defines the EDM type of the second argument to the Lambda function
A that defines the EDM type of the third argument to the Lambda function
A that defines the EDM type of the fourth argument to the Lambda function
A that defines the EDM type of the fifth argument to the Lambda function
A that defines the EDM type of the sixth argument to the Lambda function
A that defines the EDM type of the seventh argument to the Lambda function
A that defines the EDM type of the eighth argument to the Lambda function
A that defines the EDM type of the ninth argument to the Lambda function
A that defines the EDM type of the tenth argument to the Lambda function
A that defines the EDM type of the eleventh argument to the Lambda function
A that defines the EDM type of the twelfth argument to the Lambda function
A function that defines the logic of the Lambda function as a
is null,
is null,
is null,
is null,
is null,
is null,
is null,
is null,
is null,
is null,
is null,
is null, or
is null or produces a result of null.
Creates a new with arguments of the specified types, as defined by the specified function.
A new DbLambda that describes an inline Lambda function with the specified body and formal parameters.
A that defines the EDM type of the first argument to the Lambda function
A that defines the EDM type of the second argument to the Lambda function
A that defines the EDM type of the third argument to the Lambda function
A that defines the EDM type of the fourth argument to the Lambda function
A that defines the EDM type of the fifth argument to the Lambda function
A that defines the EDM type of the sixth argument to the Lambda function
A that defines the EDM type of the seventh argument to the Lambda function
A that defines the EDM type of the eighth argument to the Lambda function
A that defines the EDM type of the ninth argument to the Lambda function
A that defines the EDM type of the tenth argument to the Lambda function
A that defines the EDM type of the eleventh argument to the Lambda function
A that defines the EDM type of the twelfth argument to the Lambda function
A that defines the EDM type of the thirteenth argument to the Lambda function
A function that defines the logic of the Lambda function as a
is null,
is null,
is null,
is null,
is null,
is null,
is null,
is null,
is null,
is null,
is null,
is null,
is null, or
is null or produces a result of null.
Creates a new with arguments of the specified types, as defined by the specified function.
A new DbLambda that describes an inline Lambda function with the specified body and formal parameters.
A that defines the EDM type of the first argument to the Lambda function
A that defines the EDM type of the second argument to the Lambda function
A that defines the EDM type of the third argument to the Lambda function
A that defines the EDM type of the fourth argument to the Lambda function
A that defines the EDM type of the fifth argument to the Lambda function
A that defines the EDM type of the sixth argument to the Lambda function
A that defines the EDM type of the seventh argument to the Lambda function
A that defines the EDM type of the eighth argument to the Lambda function
A that defines the EDM type of the ninth argument to the Lambda function
A that defines the EDM type of the tenth argument to the Lambda function
A that defines the EDM type of the eleventh argument to the Lambda function
A that defines the EDM type of the twelfth argument to the Lambda function
A that defines the EDM type of the thirteenth argument to the Lambda function
A that defines the EDM type of the fourteenth argument to the Lambda function
A function that defines the logic of the Lambda function as a
is null,
is null,
is null,
is null,
is null,
is null,
is null,
is null,
is null,
is null,
is null,
is null,
is null,
is null, or
is null or produces a result of null.
Creates a new with arguments of the specified types, as defined by the specified function.
A new DbLambda that describes an inline Lambda function with the specified body and formal parameters.
A that defines the EDM type of the first argument to the Lambda function
A that defines the EDM type of the second argument to the Lambda function
A that defines the EDM type of the third argument to the Lambda function
A that defines the EDM type of the fourth argument to the Lambda function
A that defines the EDM type of the fifth argument to the Lambda function
A that defines the EDM type of the sixth argument to the Lambda function
A that defines the EDM type of the seventh argument to the Lambda function
A that defines the EDM type of the eighth argument to the Lambda function
A that defines the EDM type of the ninth argument to the Lambda function
A that defines the EDM type of the tenth argument to the Lambda function
A that defines the EDM type of the eleventh argument to the Lambda function
A that defines the EDM type of the twelfth argument to the Lambda function
A that defines the EDM type of the thirteenth argument to the Lambda function
A that defines the EDM type of the fourteenth argument to the Lambda function
A that defines the EDM type of the fifteenth argument to the Lambda function
A function that defines the logic of the Lambda function as a
is null,
is null,
is null,
is null,
is null,
is null,
is null,
is null,
is null,
is null,
is null,
is null,
is null,
is null,
is null,
or
is null or produces a result of null.
Creates a new with arguments of the specified types, as defined by the specified function.
A new DbLambda that describes an inline Lambda function with the specified body and formal parameters.
A that defines the EDM type of the first argument to the Lambda function
A that defines the EDM type of the second argument to the Lambda function
A that defines the EDM type of the third argument to the Lambda function
A that defines the EDM type of the fourth argument to the Lambda function
A that defines the EDM type of the fifth argument to the Lambda function
A that defines the EDM type of the sixth argument to the Lambda function
A that defines the EDM type of the seventh argument to the Lambda function
A that defines the EDM type of the eighth argument to the Lambda function
A that defines the EDM type of the ninth argument to the Lambda function
A that defines the EDM type of the tenth argument to the Lambda function
A that defines the EDM type of the eleventh argument to the Lambda function
A that defines the EDM type of the twelfth argument to the Lambda function
A that defines the EDM type of the thirteenth argument to the Lambda function
A that defines the EDM type of the fourteenth argument to the Lambda function
A that defines the EDM type of the fifteenth argument to the Lambda function
A that defines the EDM type of the sixteenth argument to the Lambda function
A function that defines the logic of the Lambda function as a
is null,
is null,
is null,
is null,
is null,
is null,
is null,
is null,
is null,
is null,
is null,
is null,
is null,
is null,
is null,
is null, or
is null or produces a result of null.
Gets the body of the lambda expression.
A that represents the body of the lambda function.
Gets the parameters of the lambda expression.
The list of lambda function parameters represented as DbVariableReferenceExpression objects.
Specifies a single clause in an insert or update modification operation, see
and
An abstract base class allows the possibility of patterns other than
Property = Value in future versions, e.g.,
update Foo
set ComplexTypeColumn.Bar()
where Id = 2
Represents a query operation expressed as a command tree. This class cannot be inherited.
Constructs a new DbQueryCommandTree that uses the specified metadata workspace.
The metadata workspace that the command tree should use.
The logical 'space' that metadata in the expressions used in this command tree must belong to.
A that defines the logic of the query.
When set to false the validation of the tree is turned off.
or
is null
does not represent a valid data space
Constructs a new DbQueryCommandTree that uses the specified metadata workspace.
The metadata workspace that the command tree should use.
The logical 'space' that metadata in the expressions used in this command tree must belong to.
A that defines the logic of the query.
or
is null
does not represent a valid data space
Gets an that defines the logic of the query operation.
An that defines the logic of the query operation.
The expression is null.
The expression is associated with a different command tree.
Gets the kind of this command tree.
The kind of this command tree.
Specifies the clause in a modification operation that sets the value of a property. This class cannot be inherited.
Gets an that specifies the property that should be updated.
An that specifies the property that should be updated.
Gets an that specifies the new value with which to update the property.
An that specifies the new value with which to update the property.
Represents a single-row update operation expressed as a command tree. This class cannot be inherited.
Represents a single-row update operation expressed as a canonical command tree.
When the property is set, the command returns a reader; otherwise,
it returns a scalar indicating the number of rows affected.
Initializes a new instance of the class.
The model this command will operate on.
The data space.
The target table for the data manipulation language (DML) operation.
A predicate used to determine which members of the target collection should be updated.
The list of update set clauses that define the update operation.
A that specifies a projection of results to be returned, based on the modified rows.
Gets the list of update set clauses that define the update operation.
The list of update set clauses that define the update operation.
Gets an that specifies a projection of results to be returned, based on the modified rows.
An that specifies a projection of results to be returned based, on the modified rows. null indicates that no results should be returned from this command.
Gets an that specifies the predicate used to determine which members of the target collection should be updated.
An that specifies the predicate used to determine which members of the target collection should be updated.
Gets the kind of this command tree.
The kind of this command tree.
Represents a reference to a variable that is currently in scope. This class cannot be inherited.
Implements the visitor pattern for expressions that do not produce a result value.
An instance of .
visitor is null.
Implements the visitor pattern for expressions that produce a result value of a specific type.
A result value of a specific type produced by
.
An instance of a typed that produces a result value of a specific type.
The type of the result produced by visitor .
visitor is null.
Gets the name of the referenced variable.
The name of the referenced variable.
Visits each element of an expression tree from a given root expression. If any element changes, the tree is rebuilt back to the root and the new root expression is returned; otherwise the original root expression is returned.
Initializes a new instance of the
class.
Replaces an old expression with a new one for the expression visitor.
The old expression.
The new expression.
Represents an event when the variable is rebound for the expression visitor.
The location of the variable.
The reference of the variable where it is rebounded.
Represents an event when entering the scope for the expression visitor with specified scope variables.
The collection of scope variables.
Exits the scope for the expression visitor.
Implements the visitor pattern for the expression.
The implemented visitor pattern.
The expression.
Implements the visitor pattern for the expression list.
The implemented visitor pattern.
The expression list.
Implements the visitor pattern for expression binding.
The implemented visitor pattern.
The expression binding.
Implements the visitor pattern for the expression binding list.
The implemented visitor pattern.
The expression binding list.
Implements the visitor pattern for the group expression binding.
The implemented visitor pattern.
The binding.
Implements the visitor pattern for the sort clause.
The implemented visitor pattern.
The sort clause.
Implements the visitor pattern for the sort order.
The implemented visitor pattern.
The sort order.
Implements the visitor pattern for the aggregate.
The implemented visitor pattern.
The aggregate.
Implements the visitor pattern for the function aggregate.
The implemented visitor pattern.
The aggregate.
Implements the visitor pattern for the group aggregate.
The implemented visitor pattern.
The aggregate.
Implements the visitor pattern for the Lambda function.
The implemented visitor pattern.
The lambda function.
Implements the visitor pattern for the type.
The implemented visitor pattern.
The type.
Implements the visitor pattern for the type usage.
The implemented visitor pattern.
The type.
Implements the visitor pattern for the entity set.
The implemented visitor pattern.
The entity set.
Implements the visitor pattern for the function.
The implemented visitor pattern.
The function metadata.
Implements the visitor pattern for the basic functionality required by expression types.
The implemented visitor.
The expression.
Implements the visitor pattern for the different kinds of constants.
The implemented visitor.
The constant expression.
Implements the visitor pattern for a reference to a typed null literal.
The implemented visitor.
The expression.
Implements the visitor pattern for a reference to a variable that is currently in scope.
The implemented visitor.
The expression.
Implements the visitor pattern for a reference to a parameter declared on the command tree that contains this expression.
The implemented visitor.
The expression.
Implements the visitor pattern for an invocation of a function.
The implemented visitor.
The function expression.
Implements the visitor pattern for the application of a lambda function to arguments represented by DbExpression objects.
The implemented visitor.
The expression.
Implements the visitor pattern for retrieving an instance property.
The implemented visitor.
The expression.
Implements the visitor pattern for the comparison operation applied to two arguments.
The implemented visitor.
The cast expression.
Implements the visitor pattern for a string comparison against the specified pattern with an optional escape string.
The implemented visitor.
The expression.
Implements the visitor pattern for the restriction of the number of elements in the argument collection to the specified limit value.
The implemented visitor.
The expression.
Implements the visitor pattern for the null determination applied to a single argument.
The implemented visitor.
The expression.
Implements the visitor pattern for the arithmetic operation applied to numeric arguments.
The implemented visitor.
The arithmetic expression.
Implements the visitor pattern for the logical AND expression.
The implemented visitor.
The logical AND expression.
Implements the visitor pattern for the logical OR of two Boolean arguments.
The implemented visitor.
The expression.
Implements the visitor pattern for the DbInExpression.
The implemented visitor.
The DbInExpression that is being visited.
Implements the visitor pattern for the logical NOT of a single Boolean argument.
The implemented visitor.
The expression.
Implements the visitor pattern for the removed duplicate elements from the specified set argument.
The implemented visitor.
The distinct expression.
Implements the visitor pattern for the conversion of the specified set argument to a singleton the conversion of the specified set argument to a singleton.
The implemented visitor.
The element expression.
Implements the visitor pattern for an empty set determination applied to a single set argument.
The implemented visitor.
The expression.
Implements the visitor pattern for the set union operation between the left and right operands.
The implemented visitor.
The expression.
Implements the visitor pattern for the set intersection operation between the left and right operands.
The implemented visitor.
The expression.
Implements the visitor pattern for the set subtraction operation between the left and right operands.
The implemented visitor.
The expression.
Implements the visitor pattern for a type conversion operation applied to a polymorphic argument.
The implemented visitor.
The expression.
Implements the visitor pattern for the type comparison of a single argument against the specified type.
The implemented visitor.
The expression.
Implements the visitor pattern for the type conversion of a single argument to the specified type.
The implemented visitor.
The cast expression.
Implements the visitor pattern for the When, Then, and Else clauses.
The implemented visitor.
The case expression.
Implements the visitor pattern for the retrieval of elements of the specified type from the given set argument.
The implemented visitor.
The expression.
Implements the visitor pattern for the construction of a new instance of a given type, including set and record types.
The implemented visitor.
The expression.
Implements the visitor pattern for a strongly typed reference to a specific instance within an entity set.
The implemented visitor.
The expression.
Implements the visitor pattern for the navigation of a relationship.
The implemented visitor.
The expression.
Implements the visitor pattern for the expression that retrieves an entity based on the specified reference.
The implemented visitor.
The DEREF expression.
Implements the visitor pattern for the retrieval of the key value from the underlying reference value.
The implemented visitor.
The expression.
Implements the visitor pattern for the expression that extracts a reference from the underlying entity instance.
The implemented visitor.
The entity reference expression.
Implements the visitor pattern for a scan over an entity set or relationship set, as indicated by the Target property.
The implemented visitor.
The expression.
Implements the visitor pattern for a predicate applied to filter an input set.
The implemented visitor.
The filter expression.
Implements the visitor pattern for the projection of a given input set over the specified expression.
The implemented visitor.
The expression.
Implements the visitor pattern for the unconditional join operation between the given collection arguments.
The implemented visitor.
The join expression.
Implements the visitor pattern for an inner, left outer, or full outer join operation between the given collection arguments on the specified join condition.
The implemented visitor.
The expression.
Implements the visitor pattern for the invocation of the specified function for each element in the specified input set.
The implemented visitor.
The APPLY expression.
Implements the visitor pattern for a group by operation.
The implemented visitor.
The expression.
Implements the visitor pattern for the skip expression.
The implemented visitor.
The expression.
Implements the visitor pattern for a sort key that can be used as part of the sort order.
The implemented visitor.
The expression.
Implements the visitor pattern for a quantifier operation of the specified kind over the elements of the specified input set.
The implemented visitor.
The expression.
Defines the binding for the input set to a .
In addition to the properties of , DbGroupExpressionBinding
also provides access to the group element via the variable reference
and to the group aggregate via the property.
Gets the that defines the input set.
The that defines the input set.
The expression is null.
The expression is not associated with the command tree of the
, or its result type is not equal or promotable to the result type of the current value of the property.
Gets the name assigned to the element variable.
The name assigned to the element variable.
Gets the type metadata of the element variable.
The type metadata of the element variable.
Gets the that references the element variable.
A reference to the element variable.
Gets the name assigned to the group element variable.
The name assigned to the group element variable.
Gets the type metadata of the group element variable.
The type metadata of the group element variable.
Gets the that references the group element variable.
A reference to the group element variable.
Gets the that represents the collection of elements in the group.
The elements in the group.
Provides an API to construct s and allows that API to be accessed as extension methods on the expression type itself.
Returns the specified arguments as a key/value pair object.
A key/value pair object.
The value in the key/value pair.
The key in the key/value pair.
Returns the specified arguments as a key/value pair object.
A key/value pair object.
The value in the key/value pair.
The key in the key/value pair.
Creates a new that uses a generated variable name to bind the given expression.
A new expression binding with the specified expression and a generated variable name.
The expression to bind.
input is null.
input does not have a collection result.
Creates a new that uses the specified variable name to bind the given expression
A new expression binding with the specified expression and variable name.
The expression to bind.
The variable name that should be used for the binding.
input or varName is null.
input does not have a collection result.
Creates a new group expression binding that uses generated variable and group variable names to bind the given expression.
A new group expression binding with the specified expression and a generated variable name and group variable name.
The expression to bind.
input is null.
input does not have a collection result type.
Creates a new that uses the specified variable name and group variable names to bind the given expression.
A new group expression binding with the specified expression, variable name and group variable name.
The expression to bind.
The variable name that should be used for the binding.
The variable name that should be used to refer to the group when the new group expression binding is used in a group-by expression.
input, varName or groupVarName is null.
input does not have a collection result type.
Creates a new .
A new function aggregate with a reference to the given function and argument. The function aggregate's Distinct property will have the value false.
The function that defines the aggregate operation.
The argument over which the aggregate function should be calculated.
function or argument null.
function is not an aggregate function or has more than one argument, or the result type of argument is not equal or promotable to the parameter type of function.
Creates a new that is applied in a distinct fashion.
A new function aggregate with a reference to the given function and argument. The function aggregate's Distinct property will have the value true.
The function that defines the aggregate operation.
The argument over which the aggregate function should be calculated.
function or argument is null.
function is not an aggregate function or has more than one argument, or the result type of argument is not equal or promotable to the parameter type of function.
Creates a new over the specified argument
The argument over which to perform the nest operation
A new group aggregate representing the elements of the group referenced by the given argument.
is null
Creates a with the specified inline Lambda function implementation and formal parameters.
A new expression that describes an inline Lambda function with the specified body and formal parameters.
An expression that defines the logic of the Lambda function.
A collection that represents the formal parameters to the Lambda function. These variables are valid for use in the body expression.
variables is null or contains null, or body is null.
variables contains more than one element with the same variable name.
Creates a with the specified inline Lambda function implementation and formal parameters.
A new expression that describes an inline Lambda function with the specified body and formal parameters.
An expression that defines the logic of the Lambda function.
A collection that represents the formal parameters to the Lambda function. These variables are valid for use in the body expression.
variables is null or contains null, or body is null.
variables contains more than one element with the same variable name.
Creates a new with an ascending sort order and default collation.
A new sort clause with the given sort key and ascending sort order.
The expression that defines the sort key.
key is null.
key does not have an order-comparable result type.
Creates a new with a descending sort order and default collation.
A new sort clause with the given sort key and descending sort order.
The expression that defines the sort key.
key is null.
key does not have an order-comparable result type.
Creates a new with an ascending sort order and the specified collation.
A new sort clause with the given sort key and collation, and ascending sort order.
The expression that defines the sort key.
The collation to sort under.
key is null.
collation is empty or contains only space characters.
key does not have an order-comparable result type.
Creates a new with a descending sort order and the specified collation.
A new sort clause with the given sort key and collation, and descending sort order.
The expression that defines the sort key.
The collation to sort under.
key is null.
collation is empty or contains only space characters.
key does not have an order-comparable result type.
Creates a new that determines whether the given predicate holds for all elements of the input set.
A new DbQuantifierExpression that represents the All operation.
An expression binding that specifies the input set.
An expression representing a predicate to evaluate for each member of the input set.
input or predicate is null.
predicate does not have a Boolean result type.
Creates a new that determines whether the given predicate holds for any element of the input set.
A new DbQuantifierExpression that represents the Any operation.
An expression binding that specifies the input set.
An expression representing a predicate to evaluate for each member of the input set.
input or predicate is null.
The expression produced by predicate does not have a Boolean result type.
Creates a new that evaluates the given apply expression once for each element of a given input set, producing a collection of rows with corresponding input and apply columns. Rows for which apply evaluates to an empty set are not included.
An new DbApplyExpression with the specified input and apply bindings and an
of CrossApply.
An that specifies the input set.
An that specifies logic to evaluate once for each member of the input set.
input or apply is null.
Creates a new that evaluates the given apply expression once for each element of a given input set, producing a collection of rows with corresponding input and apply columns. Rows for which apply evaluates to an empty set have an apply column value of null.
An new DbApplyExpression with the specified input and apply bindings and an
of OuterApply.
An that specifies the input set.
An that specifies logic to evaluate once for each member of the input set.
input or apply is null.
Creates a new that unconditionally joins the sets specified by the list of input expression bindings.
A new DbCrossJoinExpression, with an of CrossJoin, that represents the unconditional join of the input sets.
A list of expression bindings that specifies the input sets.
inputs is null or contains null element.
inputs contains fewer than 2 expression bindings.
Creates a new that joins the sets specified by the left and right expression bindings, on the specified join condition, using InnerJoin as the
.
A new DbJoinExpression, with an of InnerJoin, that represents the inner join operation applied to the left and right input sets under the given join condition.
An that specifies the left set argument.
An that specifies the right set argument.
An expression that specifies the condition on which to join.
left, right or joinCondition is null.
joinCondition does not have a Boolean result type.
Creates a new that joins the sets specified by the left and right expression bindings, on the specified join condition, using LeftOuterJoin as the
.
A new DbJoinExpression, with an of LeftOuterJoin, that represents the left outer join operation applied to the left and right input sets under the given join condition.
An that specifies the left set argument.
An that specifies the right set argument.
An expression that specifies the condition on which to join.
left, right or joinCondition is null.
joinCondition does not have a Boolean result type.
Creates a new that joins the sets specified by the left and right expression bindings, on the specified join condition, using FullOuterJoin as the
.
A new DbJoinExpression, with an of FullOuterJoin, that represents the full outer join operation applied to the left and right input sets under the given join condition.
An that specifies the left set argument.
An that specifies the right set argument.
An expression that specifies the condition on which to join.
left, right or joinCondition is null.
The expression produced by joinCondition does not have a Boolean result type.
Creates a new that filters the elements in the given input set using the specified predicate.
A new DbFilterExpression that produces the filtered set.
An expression binding that specifies the input set.
An expression representing a predicate to evaluate for each member of the input set.
input or predicate is null.
predicate does not have a Boolean result type.
Creates a new that groups the elements of the input set according to the specified group keys and applies the given aggregates.
A new DbGroupByExpression with the specified input set, grouping keys and aggregates.
A that specifies the input set.
A list of string-expression pairs that define the grouping columns.
A list of expressions that specify aggregates to apply.
input, keys or aggregates is null, keys contains a null column key or expression, or aggregates contains a null aggregate column name or aggregate.
Both keys and aggregates are empty, or an invalid or duplicate column name was specified.
Creates a new that projects the specified expression over the given input set.
A new DbProjectExpression that represents the projection operation.
An expression binding that specifies the input set.
An expression to project over the set.
input or projection is null.
Creates a new that sorts the given input set by the given sort specifications before skipping the specified number of elements.
A new DbSkipExpression that represents the skip operation.
An expression binding that specifies the input set.
A list of sort specifications that determine how the elements of the input set should be sorted.
An expression the specifies how many elements of the ordered set to skip.
input, sortOrder or count is null, or sortOrder contains null.
sortOrder is empty, or count is not or
or has a result type that is not equal or promotable to a 64-bit integer type.
Creates a new that sorts the given input set by the specified sort specifications.
A new DbSortExpression that represents the sort operation.
An expression binding that specifies the input set.
A list of sort specifications that determine how the elements of the input set should be sorted.
input or sortOrder is null, or sortOrder contains null.
sortOrder is empty.
Creates a new , which represents a typed null value.
An instance of DbNullExpression.
The type of the null value.
nullType is null.
Creates a new with the given constant value.
A new DbConstantExpression with the given value.
The constant value to represent.
value is null.
value is not an instance of a valid constant type.
Creates a new of the specified primitive type with the given constant value.
A new DbConstantExpression with the given value and a result type of constantType.
The type of the constant value.
The constant value to represent.
value or constantType is null.
value is not an instance of a valid constant type, constantType does not represent a primitive type, or value is of a different primitive type than that represented by constantType.
Creates a new that references a parameter with the specified name and type.
A DbParameterReferenceExpression that represents a reference to a parameter with the specified name and type. The result type of the expression will be the same as type.
The type of the referenced parameter.
The name of the referenced parameter.
Creates a new that references a variable with the specified name and type.
A DbVariableReferenceExpression that represents a reference to a variable with the specified name and type. The result type of the expression will be the same as type.
The type of the referenced variable.
The name of the referenced variable.
Creates a new that references the specified entity or relationship set.
A new DbScanExpression based on the specified entity or relationship set.
Metadata for the entity or relationship set to reference.
targetSet is null.
Creates an that performs the logical And of the left and right arguments.
A new DbAndExpression with the specified arguments.
A Boolean expression that specifies the left argument.
A Boolean expression that specifies the right argument.
left or right is null.
left and right does not have a Boolean result type.
Creates an that performs the logical Or of the left and right arguments.
A new DbOrExpression with the specified arguments.
A Boolean expression that specifies the left argument.
A Boolean expression that specifies the right argument.
left or right is null.
left or right does not have a Boolean result type.
Creates a that matches the result of the specified
expression with the results of the constant expressions in the specified list.
A DbExpression to be matched.
A list of DbConstantExpression to test for a match.
A new DbInExpression with the specified arguments.
or
is null.
The result type of
is different than the result type of an expression from
.
Creates a that performs the logical negation of the given argument.
A new DbNotExpression with the specified argument.
A Boolean expression that specifies the argument.
argument is null.
argument does not have a Boolean result type.
Creates a new that divides the left argument by the right argument.
A new DbArithmeticExpression representing the division operation.
An expression that specifies the left argument.
An expression that specifies the right argument.
left or right is null.
No common numeric result type exists between left or right.
Creates a new that subtracts the right argument from the left argument.
A new DbArithmeticExpression representing the subtraction operation.
An expression that specifies the left argument.
An expression that specifies the right argument.
left or right is null.
No common numeric result type exists between left and right.
Creates a new that computes the remainder of the left argument divided by the right argument.
A new DbArithmeticExpression representing the modulo operation.
An expression that specifies the left argument.
An expression that specifies the right argument.
left or right is null.
No common numeric result type exists between left and right.
Creates a new that multiplies the left argument by the right argument.
A new DbArithmeticExpression representing the multiplication operation.
An expression that specifies the left argument.
An expression that specifies the right argument.
left or right is null.
No common numeric result type exists between left and right.
Creates a new that adds the left argument to the right argument.
A new DbArithmeticExpression representing the addition operation.
An expression that specifies the left argument.
An expression that specifies the right argument.
left or right is null.
No common numeric result type exists between left and right.
Creates a new that negates the value of the argument.
A new DbArithmeticExpression representing the negation operation.
An expression that specifies the argument.
argument is null.
No numeric result type exists for argument.
Creates a new that negates the value of the argument.
A new DbArithmeticExpression representing the negation operation.
An expression that specifies the argument.
argument is null.
No numeric result type exists for argument.
Creates a new that compares the left and right arguments for equality.
A new DbComparisonExpression representing the equality comparison.
An expression that specifies the left argument.
An expression that specifies the right argument.
left or right is null.
No common equality-comparable result type exists between left and right.
Creates a new that compares the left and right arguments for inequality.
A new DbComparisonExpression representing the inequality comparison.
An expression that specifies the left argument.
An expression that specifies the right argument.
left or right is null.
No common equality-comparable result type exists between left and right.
Creates a new that determines whether the left argument is greater than the right argument.
A new DbComparisonExpression representing the greater-than comparison.
An expression that specifies the left argument.
An expression that specifies the right argument.
left or right is null.
No common order-comparable result type exists between left and right.
Creates a new that determines whether the left argument is less than the right argument.
A new DbComparisonExpression representing the less-than comparison.
An expression that specifies the left argument.
An expression that specifies the right argument.
left or right is null.
No common order-comparable result type exists between left and right.
Creates a new that determines whether the left argument is greater than or equal to the right argument.
A new DbComparisonExpression representing the greater-than-or-equal-to comparison.
An expression that specifies the left argument.
An expression that specifies the right argument.
left or right is null.
No common order-comparable result type exists between left and right.
Creates a new that determines whether the left argument is less than or equal to the right argument.
A new DbComparisonExpression representing the less-than-or-equal-to comparison.
An expression that specifies the left argument.
An expression that specifies the right argument.
left or right is null.
No common result type that is both equality- and order-comparable exists between left and right.
Creates a new that determines whether the specified argument is null.
A new DbIsNullExpression with the specified argument.
An expression that specifies the argument.
argument is null.
argument has a collection result type.
Creates a new that compares the specified input string to the given pattern.
A new DbLikeExpression with the specified input, pattern and a null escape.
An expression that specifies the input string.
An expression that specifies the pattern string.
Argument or pattern is null.
Argument or pattern does not have a string result type.
Creates a new that compares the specified input string to the given pattern using the optional escape.
A new DbLikeExpression with the specified input, pattern and escape.
An expression that specifies the input string.
An expression that specifies the pattern string.
An optional expression that specifies the escape string.
argument, pattern or escape is null.
argument, pattern or escape does not have a string result type.
Creates a new that applies a cast operation to a polymorphic argument.
A new DbCastExpression with the specified argument and target type.
The argument to which the cast should be applied.
Type metadata that specifies the type to cast to.
Argument or toType is null.
The specified cast is not valid.
Creates a new .
A new DbTreatExpression with the specified argument and type.
An expression that specifies the instance.
Type metadata for the treat-as type.
argument or treatType is null.
treatType is not in the same type hierarchy as the result type of argument.
Creates a new that produces a set consisting of the elements of the given input set that are of the specified type.
A new DbOfTypeExpression with the specified set argument and type, and an ExpressionKind of
.
A that specifies the input set.
Type metadata for the type that elements of the input set must have to be included in the resulting set.
argument or type is null.
argument does not have a collection result type, or type is not a type in the same type hierarchy as the element type of the collection result type of argument.
Creates a new that produces a set consisting of the elements of the given input set that are of exactly the specified type.
A new DbOfTypeExpression with the specified set argument and type, and an ExpressionKind of
.
An that specifies the input set.
Type metadata for the type that elements of the input set must match exactly to be included in the resulting set.
argument or type is null.
argument does not have a collection result type, or type is not a type in the same type hierarchy as the element type of the collection result type of argument.
Creates a new that determines whether the given argument is of the specified type or a subtype.
A new DbIsOfExpression with the specified instance and type and DbExpressionKind IsOf.
An expression that specifies the instance.
Type metadata that specifies the type that the instance's result type should be compared to.
argument or type is null.
type is not in the same type hierarchy as the result type of argument.
Creates a new expression that determines whether the given argument is of the specified type, and only that type (not a subtype).
A new DbIsOfExpression with the specified instance and type and DbExpressionKind IsOfOnly.
An expression that specifies the instance.
Type metadata that specifies the type that the instance's result type should be compared to.
argument or type is null.
type is not in the same type hierarchy as the result type of argument.
Creates a new that retrieves a specific Entity given a reference expression.
A new DbDerefExpression that retrieves the specified Entity.
An that provides the reference. This expression must have a reference Type.
argument is null.
argument does not have a reference result type.
Creates a new that retrieves the ref of the specifed entity in structural form.
A new DbEntityRefExpression that retrieves a reference to the specified entity.
The expression that provides the entity. This expression must have an entity result type.
argument is null.
argument does not have an entity result type.
Creates a new that encodes a reference to a specific entity based on key values.
A new DbRefExpression that references the element with the specified key values in the given entity set.
The entity set in which the referenced element resides.
A collection of s that provide the key values. These expressions must match (in number, type, and order) the key properties of the referenced entity type.
entitySet is null, or keyValues is null or contains null.
The count of keyValues does not match the count of key members declared by the entitySet’s element type, or keyValues contains an expression with a result type that is not compatible with the type of the corresponding key member.
Creates a new that encodes a reference to a specific entity based on key values.
A new DbRefExpression that references the element with the specified key values in the given entity set.
The entity set in which the referenced element resides.
A collection of s that provide the key values. These expressions must match (in number, type, and order) the key properties of the referenced entity type.
entitySet is null, or keyValues is null or contains null.
The count of keyValues does not match the count of key members declared by the entitySet’s element type, or keyValues contains an expression with a result type that is not compatible with the type of the corresponding key member.
Creates a new that encodes a reference to a specific entity of a given type based on key values.
A new DbRefExpression that references the element with the specified key values in the given entity set.
The entity set in which the referenced element resides.
The specific type of the referenced entity. This must be an entity type from the same hierarchy as the entity set's element type.
A collection of s that provide the key values. These expressions must match (in number, type, and order) the key properties of the referenced entity type.
entitySet or entityType is null, or keyValues is null or contains null.
entityType is not from the same type hierarchy (a subtype, supertype, or the same type) as entitySet's element type.
The count of keyValues does not match the count of key members declared by the entitySet’s element type, or keyValues contains an expression with a result type that is not compatible with the type of the corresponding key member.
Creates a new that encodes a reference to a specific entity of a given type based on key values.
A new DbRefExpression that references the element with the specified key values in the given entity set.
The entity set in which the referenced element resides.
The specific type of the referenced entity. This must be an entity type from the same hierarchy as the entity set's element type.
A collection of s that provide the key values. These expressions must match (in number, type, and order) the key properties of the referenced entity type.
entitySet or entityType is null, or keyValues is null or contains null.
entityType is not from the same type hierarchy (a subtype, supertype, or the same type) as entitySet's element type.
The count of keyValues does not match the count of key members declared by the entitySet’s element type, or keyValues contains an expression with a result type that is not compatible with the type of the corresponding key member.
Creates a new that encodes a reference to a specific Entity based on key values.
A new DbRefExpression that references the element with the specified key values in the given Entity set.
The Entity set in which the referenced element resides.
A that constructs a record with columns that match (in number, type, and order) the Key properties of the referenced Entity type.
entitySet or keyRow is null.
keyRow does not have a record result type that matches the key properties of the referenced entity set's entity type.
Creates a new that encodes a reference to a specific Entity based on key values.
A new DbRefExpression that references the element with the specified key values in the given Entity set.
The Entity set in which the referenced element resides.
A that constructs a record with columns that match (in number, type, and order) the Key properties of the referenced Entity type.
The type of the Entity that the reference should refer to.
entitySet, keyRow or entityType is null.
entityType is not in the same type hierarchy as the entity set's entity type, or keyRow does not have a record result type that matches the key properties of the referenced entity set's entity type.
Creates a new that retrieves the key values of the specifed reference in structural form.
A new DbRefKeyExpression that retrieves the key values of the specified reference.
The expression that provides the reference. This expression must have a reference Type with an Entity element type.
argument is null.
argument does not have a reference result type.
Creates a new representing the navigation of a composition or association relationship.
A new DbRelationshipNavigationExpression representing the navigation of the specified from and to relation ends of the specified relation type from the specified navigation source instance.
An expression that specifies the instance from which navigation should occur.
Metadata for the property that represents the end of the relationship from which navigation should occur.
Metadata for the property that represents the end of the relationship to which navigation should occur.
fromEnd, toEnd or navigateFrom is null.
fromEnd and toEnd are not declared by the same relationship type, or navigateFrom has a result type that is not compatible with the property type of fromEnd.
Creates a new representing the navigation of a composition or association relationship.
A new DbRelationshipNavigationExpression representing the navigation of the specified from and to relation ends of the specified relation type from the specified navigation source instance.
Metadata for the relation type that represents the relationship.
The name of the property of the relation type that represents the end of the relationship from which navigation should occur.
The name of the property of the relation type that represents the end of the relationship to which navigation should occur.
An expression the specifies the instance from which naviagtion should occur.
type, fromEndName, toEndName or navigateFrom is null.
type is not associated with this command tree's metadata workspace or navigateFrom is associated with a different command tree, or type does not declare a relation end property with name toEndName or fromEndName, or navigateFrom has a result type that is not compatible with the property type of the relation end property with name fromEndName.
Creates a new that removes duplicates from the given set argument.
A new DbDistinctExpression that represents the distinct operation applied to the specified set argument.
An expression that defines the set over which to perfom the distinct operation.
argument is null.
argument does not have a collection result type.
Creates a new that converts a set into a singleton.
A DbElementExpression that represents the conversion of the set argument to a singleton.
An expression that specifies the input set.
argument is null.
argument does not have a collection result type.
Creates a new that determines whether the specified set argument is an empty set.
A new DbIsEmptyExpression with the specified argument.
An expression that specifies the input set.
argument is null.
argument does not have a collection result type.
Creates a new that computes the subtraction of the right set argument from the left set argument.
A new DbExceptExpression that represents the difference of the left argument from the right argument.
An expression that defines the left set argument.
An expression that defines the right set argument.
left or right is null.
No common collection result type exists between left and right.
Creates a new that computes the intersection of the left and right set arguments.
A new DbIntersectExpression that represents the intersection of the left and right arguments.
An expression that defines the left set argument.
An expression that defines the right set argument.
left or right is null.
No common collection result type exists between left or right.
Creates a new that computes the union of the left and right set arguments and does not remove duplicates.
A new DbUnionAllExpression that union, including duplicates, of the the left and right arguments.
An expression that defines the left set argument.
An expression that defines the right set argument.
left or right is null.
No common collection result type with an equality-comparable element type exists between left and right.
Creates a new that restricts the number of elements in the Argument collection to the specified count Limit value. Tied results are not included in the output.
A new DbLimitExpression with the specified argument and count limit values that does not include tied results.
An expression that specifies the input collection.
An expression that specifies the limit value.
argument or count is null.
argument does not have a collection result type, or count does not have a result type that is equal or promotable to a 64-bit integer type.
Creates a new .
A new DbCaseExpression with the specified cases and default result.
A list of expressions that provide the conditional for of each case.
A list of expressions that provide the result of each case.
An expression that defines the result when no case is matched.
whenExpressions or thenExpressions is null or contains null, or elseExpression is null.
whenExpressions or thenExpressions is empty or whenExpressions contains an expression with a non-Boolean result type, or no common result type exists for all expressions in thenExpressions and elseExpression.
Creates a new representing the invocation of the specified function with the given arguments.
A new DbFunctionExpression representing the function invocation.
Metadata for the function to invoke.
A list of expressions that provide the arguments to the function.
function is null, or arguments is null or contains null.
The count of arguments does not equal the number of parameters declared by function, or arguments contains an expression that has a result type that is not equal or promotable to the corresponding function parameter type.
Creates a new representing the invocation of the specified function with the given arguments.
A new DbFunctionExpression representing the function invocation.
Metadata for the function to invoke.
Expressions that provide the arguments to the function.
function is null, or arguments is null or contains null.
The count of arguments does not equal the number of parameters declared by function, or arguments contains an expression that has a result type that is not equal or promotable to the corresponding function parameter type.
Creates a new representing the application of the specified Lambda function to the given arguments.
A new Expression representing the Lambda function application.
A instance representing the Lambda function to apply.
A list of expressions that provide the arguments.
lambda or arguments is null.
The count of arguments does not equal the number of variables declared by lambda, or arguments contains an expression that has a result type that is not equal or promotable to the corresponding variable type.
Creates a new representing the application of the specified Lambda function to the given arguments.
A new expression representing the Lambda function application.
A instance representing the Lambda function to apply.
Expressions that provide the arguments.
lambda or arguments is null.
The count of arguments does not equal the number of variables declared by lambda, or arguments contains an expression that has a result type that is not equal or promotable to the corresponding variable type.
Creates a new . If the type argument is a collection type, the arguments specify the elements of the collection. Otherwise the arguments are used as property or column values in the new instance.
A new DbNewInstanceExpression with the specified type and arguments.
The type of the new instance.
Expressions that specify values of the new instances, interpreted according to the instance's type.
instanceType or arguments is null, or arguments contains null.
arguments is empty or the result types of the contained expressions do not match the requirements of instanceType (as explained in the remarks section).
Creates a new . If the type argument is a collection type, the arguments specify the elements of the collection. Otherwise the arguments are used as property or column values in the new instance.
A new DbNewInstanceExpression with the specified type and arguments.
The type of the new instance.
Expressions that specify values of the new instances, interpreted according to the instance's type.
instanceType or arguments is null, or arguments contains null.
arguments is empty or the result types of the contained expressions do not match the requirements of instanceType (as explained in the remarks section).
Creates a new that constructs a collection containing the specified elements. The type of the collection is based on the common type of the elements. If no common element type exists an exception is thrown.
A new DbNewInstanceExpression with the specified collection type and arguments.
A list of expressions that provide the elements of the collection.
elements is null, or contains null.
elements is empty or contains expressions for which no common result type exists.
Creates a new that constructs a collection containing the specified elements. The type of the collection is based on the common type of the elements. If no common element type exists an exception is thrown.
A new DbNewInstanceExpression with the specified collection type and arguments.
A list of expressions that provide the elements of the collection.
elements is null, or contains null..
elements is empty or contains expressions for which no common result type exists.
Creates a new that constructs an empty collection of the specified collection type.
A new DbNewInstanceExpression with the specified collection type and an empty Arguments list.
The type metadata for the collection to create
collectionType is null.
collectionType is not a collection type.
Creates a new that produces a row with the specified named columns and the given values, specified as expressions.
A new DbNewInstanceExpression that represents the construction of the row.
A list of string-DbExpression key-value pairs that defines the structure and values of the row.
columnValues is null or contains an element with a null column name or expression.
columnValues is empty, or contains a duplicate or invalid column name.
Creates a new representing the retrieval of the specified property.
A new DbPropertyExpression representing the property retrieval.
The instance from which to retrieve the property. May be null if the property is static.
Metadata for the property to retrieve.
propertyMetadata is null or instance is null and the property is not static.
Creates a new representing the retrieval of the specified navigation property.
A new DbPropertyExpression representing the navigation property retrieval.
The instance from which to retrieve the navigation property.
Metadata for the navigation property to retrieve.
navigationProperty or instance is null.
Creates a new representing the retrieval of the specified relationship end member.
A new DbPropertyExpression representing the relationship end member retrieval.
The instance from which to retrieve the relationship end member.
Metadata for the relationship end member to retrieve.
relationshipEnd is null or instance is null and the property is not static.
Creates a new representing the retrieval of the instance property with the specified name from the given instance.
A new DbPropertyExpression that represents the property retrieval.
The instance from which to retrieve the property.
The name of the property to retrieve.
propertyName is null or instance is null and the property is not static.
No property with the specified name is declared by the type of instance.
Creates a new that determines whether the given predicate holds for all elements of the input set.
A new DbQuantifierExpression that represents the All operation.
An expression that specifies the input set.
A method representing a predicate to evaluate for each member of the input set. This method must produce an expression with a Boolean result type that provides the predicate logic.
source or predicate is null.
The expression produced by predicate is null.
source does not have a collection result type.
The expression produced by Predicate does not have a Boolean result type.
Creates a new that determines whether the specified set argument is non-empty.
A new applied to a new
with the specified argument.
An expression that specifies the input set.
source is null.
source does not have a collection result type.
Creates a new that determines whether the specified set argument is non-empty.
A new applied to a new
with the specified argument.
An expression that specifies the input set.
argument is null.
argument does not have a collection result type.
Creates a new that determines whether the given predicate holds for any element of the input set.
A new DbQuantifierExpression that represents the Any operation.
An expression that specifies the input set.
A method representing the predicate to evaluate for each member of the input set. This method must produce an expression with a Boolean result type that provides the predicate logic.
source or predicate is null.
The expression produced by predicate is null.
source does not have a collection result type.
The expression produced by predicate does not have a Boolean result type.
Creates a new that evaluates the given apply expression once for each element of a given input set, producing a collection of rows with corresponding input and apply columns. Rows for which apply evaluates to an empty set are not included.
An new DbApplyExpression with the specified input and apply bindings and an
of CrossApply.
A that specifies the input set.
A method that specifies the logic to evaluate once for each member of the input set.
source or apply is null.
source does not have a collection result type.
The result of apply contains a name or expression that is null.
The result of apply contains a name or expression that is not valid in an expression binding.
Creates a new that evaluates the given apply expression once for each element of a given input set, producing a collection of rows with corresponding input and apply columns. Rows for which apply evaluates to an empty set have an apply column value of null.
An new DbApplyExpression with the specified input and apply bindings and an
of OuterApply.
A that specifies the input set.
A method that specifies the logic to evaluate once for each member of the input set.
source or apply is null.
Source does not have a collection result type.
The result of apply contains a name or expression that is null.
The result of apply contains a name or expression that is not valid in an expression binding.
Creates a new that joins the sets specified by the left and right expressions, on the specified join condition, using FullOuterJoin as the
.
A new DbJoinExpression, with an of FullOuterJoin, that represents the full outer join operation applied to the left and right input sets under the given join condition.
A that specifies the left set argument.
A that specifies the right set argument.
A method representing the condition on which to join. This method must produce an expression with a Boolean result type that provides the logic of the join condition.
left, right or joinCondition is null.
left or right does not have a collection result type.
The expression produced by joinCondition is null.
The expression produced by joinCondition does not have a Boolean result type.
Creates a new that joins the sets specified by the left and right expressions, on the specified join condition, using InnerJoin as the
.
A new DbJoinExpression, with an of InnerJoin, that represents the inner join operation applied to the left and right input sets under the given join condition.
A that specifies the left set argument.
A that specifies the right set argument.
A method representing the condition on which to join. This method must produce an expression with a Boolean result type that provides the logic of the join condition.
left, right or joinCondition is null.
left or right does not have a collection result type.
The expression produced by joinCondition is null.
The expression produced by joinCondition does not have a Boolean result type.
Creates a new that joins the sets specified by the left and right expressions, on the specified join condition, using LeftOuterJoin as the
.
A new DbJoinExpression, with an of LeftOuterJoin, that represents the left outer join operation applied to the left and right input sets under the given join condition.
A that specifies the left set argument.
A that specifies the right set argument.
A method representing the condition on which to join. This method must produce an expression with a Boolean result type that provides the logic of the join condition.
left, right or joinCondition is null.
left or right does not have a collection result type.
The expression produced by joinCondition is null.
The expression produced by joinCondition does not have a Boolean result type.
Creates a new that joins the sets specified by the outer and inner expressions, on an equality condition between the specified outer and inner keys, using InnerJoin as the
.
A new DbJoinExpression, with an of InnerJoin, that represents the inner join operation applied to the left and right input sets under a join condition that compares the outer and inner key values for equality.
A that specifies the outer set argument.
A that specifies the inner set argument.
A method that specifies how the outer key value should be derived from an element of the outer set.
A method that specifies how the inner key value should be derived from an element of the inner set.
outer, inner, outerKey or innerKey is null.
outer or inner does not have a collection result type.
The expression produced by outerKey or innerKey is null.
The expressions produced by outerKey and innerKey are not comparable for equality.
Creates a new that projects the specified selector over the sets specified by the outer and inner expressions, joined on an equality condition between the specified outer and inner keys, using InnerJoin as the
.
A new DbProjectExpression with the specified selector as its projection, and a new DbJoinExpression as its input. The input DbJoinExpression is created with an
of InnerJoin, that represents the inner join operation applied to the left and right input sets under a join condition that compares the outer and inner key values for equality.
A that specifies the outer set argument.
A that specifies the inner set argument.
A method that specifies how the outer key value should be derived from an element of the outer set.
A method that specifies how the inner key value should be derived from an element of the inner set.
A method that specifies how an element of the result set should be derived from elements of the inner and outer sets. This method must produce an instance of a type that is compatible with Join and can be resolved into a
. Compatibility requirements for TSelector are described in remarks.
The type of the selector .
outer, inner, outerKey, innerKey or selector is null.
outer or inner does not have a collection result type.
The expression produced by outerKey or innerKey is null.
The result of selector is null after conversion to DbExpression.
The expressions produced by outerKey and innerKey is not comparable for equality.
The result of Selector is not compatible with SelectMany.
Creates a new that sorts the given input set by the specified sort key, with ascending sort order and default collation.
A new DbSortExpression that represents the order-by operation.
An expression that specifies the input set.
A method that specifies how to derive the sort key expression given a member of the input set. This method must produce an expression with an order-comparable result type that provides the sort key definition.
source or sortKey is null.
The expression produced by sortKey is null.
source does not have a collection result type.
The expression produced by sortKey does not have an order-comparable result type.
Creates a new that sorts the given input set by the specified sort key, with ascending sort order and the specified collation.
A new DbSortExpression that represents the order-by operation.
An expression that specifies the input set.
A method that specifies how to derive the sort key expression given a member of the input set. This method must produce an expression with an order-comparable result type that provides the sort key definition.
The collation to sort under.
source, sortKey or collation is null.
The expression produced by sortKey is null.
source does not have a collection result type.
The expression produced by sortKey does not have an order-comparable string result type.
collation is empty or contains only space characters.
Creates a new that sorts the given input set by the specified sort key, with descending sort order and default collation.
A new DbSortExpression that represents the order-by operation.
An expression that specifies the input set.
A method that specifies how to derive the sort key expression given a member of the input set. This method must produce an expression with an order-comparable result type that provides the sort key definition.
source or sortKey is null.
The expression produced by sortKey is null.
source does not have a collection result type.
The expression produced by sortKey does not have an order-comparable result type.
Creates a new that sorts the given input set by the specified sort key, with descending sort order and the specified collation.
A new DbSortExpression that represents the order-by operation.
An expression that specifies the input set.
A method that specifies how to derive the sort key expression given a member of the input set. This method must produce an expression with an order-comparable result type that provides the sort key definition.
The collation to sort under.
source, sortKey or collation is null.
The expression produced by sortKey is null.
source does not have a collection result type.
The expression produced by sortKey does not have an order-comparable string result type.
collation is empty or contains only space characters.
Creates a new that selects the specified expression over the given input set.
A new DbProjectExpression that represents the select operation.
An expression that specifies the input set.
A method that specifies how to derive the projected expression given a member of the input set. This method must produce an instance of a type that is compatible with Select and can be resolved into a
. Compatibility requirements for TProjection are described in remarks.
The method result type of projection.
source or projection is null.
The result of projection is null.
Creates a new that evaluates the given apply expression once for each element of a given input set, producing a collection of rows with corresponding input and apply columns. Rows for which apply evaluates to an empty set are not included. A
is then created that selects the apply column from each row, producing the overall collection of apply results.
An new DbProjectExpression that selects the apply column from a new DbApplyExpression with the specified input and apply bindings and an
of CrossApply.
A that specifies the input set.
A method that represents the logic to evaluate once for each member of the input set.
source or apply is null.
The expression produced by apply is null.
source does not have a collection result type.
The expression produced by apply does not have a collection type.
Creates a new that evaluates the given apply expression once for each element of a given input set, producing a collection of rows with corresponding input and apply columns. Rows for which apply evaluates to an empty set are not included. A
is then created that selects the specified selector over each row, producing the overall collection of results.
An new DbProjectExpression that selects the result of the given selector from a new DbApplyExpression with the specified input and apply bindings and an
of CrossApply.
A that specifies the input set.
A method that represents the logic to evaluate once for each member of the input set.
A method that specifies how an element of the result set should be derived given an element of the input and apply sets. This method must produce an instance of a type that is compatible with SelectMany and can be resolved into a
. Compatibility requirements for TSelector are described in remarks.
The method result type of selector.
source, apply or selector is null.
The expression produced by apply is null.
The result of selector is null on conversion to DbExpression.
source does not have a collection result type.
The expression produced by apply does not have a collection type. does not have a collection type.
Creates a new that skips the specified number of elements from the given sorted input set.
A new DbSkipExpression that represents the skip operation.
A that specifies the sorted input set.
An expression the specifies how many elements of the ordered set to skip.
argument or count is null.
count is not or
or has a result type that is not equal or promotable to a 64-bit integer type.
Creates a new that restricts the number of elements in the Argument collection to the specified count Limit value. Tied results are not included in the output.
A new DbLimitExpression with the specified argument and count limit values that does not include tied results.
An expression that specifies the input collection.
An expression that specifies the limit value.
argument or count is null.
argument does not have a collection result type, count does not have a result type that is equal or promotable to a 64-bit integer type.
Creates a new that with a sort order that includes the sort order of the given order input set together with the specified sort key in ascending sort order and with default collation.
A new DbSortExpression that represents the new overall order-by operation.
A DbSortExpression that specifies the ordered input set.
A method that specifies how to derive the additional sort key expression given a member of the input set. This method must produce an expression with an order-comparable result type that provides the sort key definition.
source or sortKey is null.
The expression produced by sortKey is null.
source does not have a collection result type.
sortKey does not have an order-comparable result type.
Creates a new that with a sort order that includes the sort order of the given order input set together with the specified sort key in ascending sort order and with the specified collation.
A new DbSortExpression that represents the new overall order-by operation.
A DbSortExpression that specifies the ordered input set.
A method that specifies how to derive the additional sort key expression given a member of the input set. This method must produce an expression with an order-comparable result type that provides the sort key definition.
The collation to sort under.
source, sortKey or collation is null.
The expression produced by sortKey is null.
source does not have a collection result type.
The expression produced by sortKey does not have an order-comparable string result type.
collation is empty or contains only space characters.
Creates a new that with a sort order that includes the sort order of the given order input set together with the specified sort key in descending sort order and with default collation.
A new DbSortExpression that represents the new overall order-by operation.
A DbSortExpression that specifies the ordered input set.
A method that specifies how to derive the additional sort key expression given a member of the input set. This method must produce an expression with an order-comparable result type that provides the sort key definition.
source or sortKey is null.
The expression produced by sortKey is null.
source does not have a collection result type.
The expression produced by sortKey does not have an order-comparable result type.
Creates a new that with a sort order that includes the sort order of the given order input set together with the specified sort key in descending sort order and with the specified collation.
A new DbSortExpression that represents the new overall order-by operation.
A DbSortExpression that specifies the ordered input set.
A method that specifies how to derive the additional sort key expression given a member of the input set. This method must produce an expression with an order-comparable result type that provides the sort key definition.
The collation to sort under.
source, sortKey or collation is null.
The expression produced by sortKey is null.
source does not have a collection result type.
The expression produced by sortKey does not have an order-comparable string result type.
collation is empty or contains only space characters.
Creates a new that filters the elements in the given input set using the specified predicate.
A new DbQuantifierExpression that represents the Any operation.
An expression that specifies the input set.
A method representing the predicate to evaluate for each member of the input set. This method must produce an expression with a Boolean result type that provides the predicate logic.
source or predicate is null.
The expression produced by predicate is null.
The expression produced by predicate does not have a Boolean result type.
Creates a new that computes the union of the left and right set arguments with duplicates removed.
A new DbExpression that computes the union, without duplicates, of the the left and right arguments.
An expression that defines the left set argument.
An expression that defines the right set argument.
left or right is null.
No common collection result type with an equality-comparable element type exists between left and right.
Used only by span rewriter, when a row could be specified as an argument
Creates a new that converts a single-member set with a single property
into a singleton. The result type of the created equals the result type
of the single property of the element of the argument.
This method should only be used when the argument is of a collection type with
element of structured type with only one property.
An expression that specifies the input set.
A DbElementExpression that represents the conversion of the single-member set argument to a singleton.
is null
is associated with a different command tree,
or does not have a collection result type, or its element type is not a structured type
with only one property
Creates a new that describes how to satisfy the relationship
navigation operation from to , which
must be declared by the same relationship type.
DbRelatedEntityRefs are used in conjuction with
to construct Entity instances that are capable of resolving relationship navigation operations based on
the provided DbRelatedEntityRefs without the need for additional navigation operations.
Note also that this factory method is not intended to be part of the public Command Tree API
since its intent is to support Entity constructors in view definitions that express information about
related Entities using the 'WITH RELATIONSHIP' clause in eSQL.
The relationship end from which navigation takes place
The relationship end to which navigation may be satisifed using the target entity ref
An expression that produces a reference to the target entity (and must therefore have a Ref result type)
Creates a new that constructs an instance of an Entity type
together with the specified information about Entities related to the newly constructed Entity by
relationship navigations where the target end has multiplicity of at most one.
Note that this factory method is not intended to be part of the public Command Tree API since its
intent is to support Entity constructors in view definitions that express information about
related Entities using the 'WITH RELATIONSHIP' clause in eSQL.
The type of the Entity instance that is being constructed
Values for each (non-relationship) property of the Entity
A (possibly empty) list of s that describe Entities that are related to the constructed Entity by various relationship types.
A new DbNewInstanceExpression that represents the construction of the Entity, and includes the specified related Entity information in the see
collection.
Same as only allows the property type of
to be any type in the same type hierarchy as the result type of .
Only used by relationship span.
Requires: non-null expression
Determines whether the expression is a constant negative integer value. Always returns
false for non-constant, non-integer expression instances.
Gets a with the Boolean value true.
A with the Boolean value true.
Gets a with the Boolean value false.
A with the Boolean value false.
Provides an API to construct s that invoke canonical EDM functions, and allows that API to be accessed as extension methods on the expression type itself.
Creates a that invokes the canonical 'Avg' function over the specified collection. The result type of the expression is the same as the element type of the collection.
A new DbFunctionExpression that produces the average value.
An expression that specifies the collection from which the average value should be computed.
Creates a that invokes the canonical 'Count' function over the specified collection. The result type of the expression is Edm.Int32.
A new DbFunctionExpression that produces the count value.
An expression that specifies the collection over which the count value should be computed.
Creates a that invokes the canonical 'BigCount' function over the specified collection. The result type of the expression is Edm.Int64.
A new DbFunctionExpression that produces the count value.
An expression that specifies the collection over which the count value should be computed.
Creates a that invokes the canonical 'Max' function over the specified collection. The result type of the expression is the same as the element type of the collection.
A new DbFunctionExpression that produces the maximum value.
An expression that specifies the collection from which the maximum value should be retrieved
Creates a that invokes the canonical 'Min' function over the specified collection. The result type of the expression is the same as the element type of the collection.
A new DbFunctionExpression that produces the minimum value.
An expression that specifies the collection from which the minimum value should be retrieved.
Creates a that invokes the canonical 'Sum' function over the specified collection. The result type of the expression is the same as the element type of the collection.
A new DbFunctionExpression that produces the sum.
An expression that specifies the collection from which the sum should be computed.
Creates a that invokes the canonical 'StDev' function over the non-null members of the specified collection. The result type of the expression is Edm.Double.
A new DbFunctionExpression that produces the standard deviation value over non-null members of the collection.
An expression that specifies the collection for which the standard deviation should be computed.
Creates a that invokes the canonical 'StDevP' function over the population of the specified collection. The result type of the expression is Edm.Double.
A new DbFunctionExpression that produces the standard deviation value.
An expression that specifies the collection for which the standard deviation should be computed.
Creates a that invokes the canonical 'Var' function over the non-null members of the specified collection. The result type of the expression is Edm.Double.
A new DbFunctionExpression that produces the statistical variance value for the non-null members of the collection.
An expression that specifies the collection for which the statistical variance should be computed.
Creates a that invokes the canonical 'VarP' function over the population of the specified collection. The result type of the expression Edm.Double.
A new DbFunctionExpression that produces the statistical variance value.
An expression that specifies the collection for which the statistical variance should be computed.
Creates a that invokes the canonical 'Concat' function with the specified arguments, which must each have a string result type. The result type of the expression is string.
A new DbFunctionExpression that produces the concatenated string.
An expression that specifies the string that should appear first in the concatenated result string.
An expression that specifies the string that should appear second in the concatenated result string.
Creates a that invokes the canonical 'Contains' function with the specified arguments, which must each have a string result type. The result type of the expression is Boolean.
A new DbFunctionExpression that returns a Boolean value indicating whether or not searchedForString occurs within searchedString.
An expression that specifies the string to search for any occurence of searchedForString.
An expression that specifies the string to search for in searchedString.
Creates a that invokes the canonical 'EndsWith' function with the specified arguments, which must each have a string result type. The result type of the expression is Boolean.
A new DbFunctionExpression that returns a Boolean value indicating whether or not stringArgument ends with suffix.
An expression that specifies the string that is searched at the end for string suffix.
An expression that specifies the target string that is searched for at the end of stringArgument.
Creates a that invokes the canonical 'IndexOf' function with the specified arguments, which must each have a string result type. The result type of the expression is Edm.Int32.
A new DbFunctionExpression that returns the first index of stringToFind in searchString.
An expression that specifies the string to search for stringToFind.
An expression that specifies the string to locate within searchString should be checked.
Creates a that invokes the canonical 'Left' function with the specified arguments, which must have a string and integer numeric result type. The result type of the expression is string.
A new DbFunctionExpression that returns the the leftmost substring of length length from stringArgument.
An expression that specifies the string from which to extract the leftmost substring.
An expression that specifies the length of the leftmost substring to extract from stringArgument.
Creates a that invokes the canonical 'Length' function with the specified argument, which must have a string result type. The result type of the expression is Edm.Int32.
A new DbFunctionExpression that returns the length of stringArgument.
An expression that specifies the string for which the length should be computed.
Creates a that invokes the canonical 'Replace' function with the specified arguments, which must each have a string result type. The result type of the expression is also string.
A new DbFunctionExpression than returns a new string based on stringArgument where every occurence of toReplace is replaced by replacement.
An expression that specifies the string in which to perform the replacement operation.
An expression that specifies the string that is replaced.
An expression that specifies the replacement string.
Creates a that invokes the canonical 'Reverse' function with the specified argument, which must have a string result type. The result type of the expression is also string.
A new DbFunctionExpression that produces the reversed value of stringArgument.
An expression that specifies the string to reverse.
Creates a that invokes the canonical 'Right' function with the specified arguments, which must have a string and integer numeric result type. The result type of the expression is string.
A new DbFunctionExpression that returns the the rightmost substring of length length from stringArgument.
An expression that specifies the string from which to extract the rightmost substring.
An expression that specifies the length of the rightmost substring to extract from stringArgument.
Creates a that invokes the canonical 'StartsWith' function with the specified arguments, which must each have a string result type. The result type of the expression is Boolean.
A new DbFunctionExpression that returns a Boolean value indicating whether or not stringArgument starts with prefix.
An expression that specifies the string that is searched at the start for string prefix.
An expression that specifies the target string that is searched for at the start of stringArgument.
Creates a that invokes the canonical 'Substring' function with the specified arguments, which must have a string and integer numeric result types. The result type of the expression is string.
A new DbFunctionExpression that returns the substring of length length from stringArgument starting at start.
An expression that specifies the string from which to extract the substring.
An expression that specifies the starting index from which the substring should be taken.
An expression that specifies the length of the substring.
Creates a that invokes the canonical 'ToLower' function with the specified argument, which must have a string result type. The result type of the expression is also string.
A new DbFunctionExpression that returns value of stringArgument converted to lower case.
An expression that specifies the string that should be converted to lower case.
Creates a that invokes the canonical 'ToUpper' function with the specified argument, which must have a string result type. The result type of the expression is also string.
A new DbFunctionExpression that returns value of stringArgument converted to upper case.
An expression that specifies the string that should be converted to upper case.
Creates a that invokes the canonical 'Trim' function with the specified argument, which must have a string result type. The result type of the expression is also string.
A new DbFunctionExpression that returns value of stringArgument with leading and trailing space removed.
An expression that specifies the string from which leading and trailing space should be removed.
Creates a that invokes the canonical 'RTrim' function with the specified argument, which must have a string result type. The result type of the expression is also string.
A new DbFunctionExpression that returns value of stringArgument with trailing space removed.
An expression that specifies the string from which trailing space should be removed.
Creates a that invokes the canonical 'LTrim' function with the specified argument, which must have a string result type. The result type of the expression is also string.
A new DbFunctionExpression that returns value of stringArgument with leading space removed.
An expression that specifies the string from which leading space should be removed.
Creates a that invokes the canonical 'Year' function with the specified argument, which must have a DateTime or DateTimeOffset result type. The result type of the expression is Edm.Int32.
A new DbFunctionExpression that returns the integer year value from dateValue.
An expression that specifies the value from which the year should be retrieved.
Creates a that invokes the canonical 'Month' function with the specified argument, which must have a DateTime or DateTimeOffset result type. The result type of the expression is Edm.Int32.
A new DbFunctionExpression that returns the integer month value from dateValue.
An expression that specifies the value from which the month should be retrieved.
Creates a that invokes the canonical 'Day' function with the specified argument, which must have a DateTime or DateTimeOffset result type. The result type of the expression is Edm.Int32.
A new DbFunctionExpression that returns the integer day value from dateValue.
An expression that specifies the value from which the day should be retrieved.
Creates a that invokes the canonical 'DayOfYear' function with the specified argument, which must have a DateTime or DateTimeOffset result type. The result type of the expression is Edm.Int32.
A new DbFunctionExpression that returns the integer day of year value from dateValue.
An expression that specifies the value from which the day within the year should be retrieved.
Creates a that invokes the canonical 'Hour' function with the specified argument, which must have a DateTime, DateTimeOffset or Time result type. The result type of the expression is Edm.Int32.
A new DbFunctionExpression that returns the integer hour value from timeValue.
An expression that specifies the value from which the hour should be retrieved.
Creates a that invokes the canonical 'Minute' function with the specified argument, which must have a DateTime, DateTimeOffset or Time result type. The result type of the expression is Edm.Int32.
A new DbFunctionExpression that returns the integer minute value from timeValue.
An expression that specifies the value from which the minute should be retrieved.
Creates a that invokes the canonical 'Second' function with the specified argument, which must have a DateTime, DateTimeOffset or Time result type. The result type of the expression is Edm.Int32.
A new DbFunctionExpression that returns the integer second value from timeValue.
An expression that specifies the value from which the second should be retrieved.
Creates a that invokes the canonical 'Millisecond' function with the specified argument, which must have a DateTime, DateTimeOffset or Time result type. The result type of the expression is Edm.Int32.
A new DbFunctionExpression that returns the integer millisecond value from timeValue.
An expression that specifies the value from which the millisecond should be retrieved.
Creates a that invokes the canonical 'GetTotalOffsetMinutes' function with the specified argument, which must have a DateTimeOffset result type. The result type of the expression is Edm.Int32.
A new DbFunctionExpression that returns the number of minutes dateTimeOffsetArgument is offset from GMT.
An expression that specifies the DateTimeOffset value from which the minute offset from GMT should be retrieved.
Creates a that invokes the canonical 'CurrentDateTime' function.
A new DbFunctionExpression that returns the current date and time as an Edm.DateTime instance.
Creates a that invokes the canonical 'CurrentDateTimeOffset' function.
A new DbFunctionExpression that returns the current date and time as an Edm.DateTimeOffset instance.
Creates a that invokes the canonical 'CurrentUtcDateTime' function.
A new DbFunctionExpression that returns the current UTC date and time as an Edm.DateTime instance.
Creates a that invokes the canonical 'TruncateTime' function with the specified argument, which must have a DateTime or DateTimeOffset result type. The result type of the expression is the same as the result type of dateValue.
A new DbFunctionExpression that returns the value of dateValue with time set to zero.
An expression that specifies the value for which the time portion should be truncated.
Creates a that invokes the canonical 'CreateDateTime' function with the specified arguments. second must have a result type of Edm.Double, while all other arguments must have a result type of Edm.Int32. The result type of the expression is Edm.DateTime.
A new DbFunctionExpression that returns a new DateTime based on the specified values.
An expression that provides the year value for the new DateTime instance.
An expression that provides the month value for the new DateTime instance.
An expression that provides the day value for the new DateTime instance.
An expression that provides the hour value for the new DateTime instance.
An expression that provides the minute value for the new DateTime instance.
An expression that provides the second value for the new DateTime instance.
Creates a that invokes the canonical 'CreateDateTimeOffset' function with the specified arguments. second must have a result type of Edm.Double, while all other arguments must have a result type of Edm.Int32. The result type of the expression is Edm.DateTimeOffset.
A new DbFunctionExpression that returns a new DateTimeOffset based on the specified values.
An expression that provides the year value for the new DateTimeOffset instance.
An expression that provides the month value for the new DateTimeOffset instance.
An expression that provides the day value for the new DateTimeOffset instance.
An expression that provides the hour value for the new DateTimeOffset instance.
An expression that provides the minute value for the new DateTimeOffset instance.
An expression that provides the second value for the new DateTimeOffset instance.
An expression that provides the number of minutes in the time zone offset value for the new DateTimeOffset instance.
Creates a that invokes the canonical 'CreateTime' function with the specified arguments. second must have a result type of Edm.Double, while all other arguments must have a result type of Edm.Int32. The result type of the expression is Edm.Time.
A new DbFunctionExpression that returns a new Time based on the specified values.
An expression that provides the hour value for the new DateTime instance.
An expression that provides the minute value for the new DateTime instance.
An expression that provides the second value for the new DateTime instance.
Creates a that invokes the canonical 'AddYears' function with the specified arguments, which must have DateTime or DateTimeOffset and integer result types. The result type of the expression is the same as the result type of dateValue.
A new DbFunctionExpression that adds the number of years specified by addValue to the value specified by dateValue.
An expression that specifies the value to which addValueshould be added.
An expression that specifies the number of years to add to dateValue.
Creates a that invokes the canonical 'AddMonths' function with the specified arguments, which must have DateTime or DateTimeOffset and integer result types. The result type of the expression is the same as the result type of dateValue.
A new DbFunctionExpression that adds the number of months specified by addValue to the value specified by dateValue.
An expression that specifies the value to which addValueshould be added.
An expression that specifies the number of months to add to dateValue.
Creates a that invokes the canonical 'AddDays' function with the specified arguments, which must have DateTime or DateTimeOffset and integer result types. The result type of the expression is the same as the result type of dateValue.
A new DbFunctionExpression that adds the number of days specified by addValue to the value specified by dateValue.
An expression that specifies the value to which addValueshould be added.
An expression that specifies the number of days to add to dateValue.
Creates a that invokes the canonical 'AddHours' function with the specified arguments, which must have DateTime, DateTimeOffset or Time, and integer result types. The result type of the expression is the same as the result type of timeValue.
A new DbFunctionExpression that adds the number of hours specified by addValue to the value specified by timeValue.
An expression that specifies the value to which addValueshould be added.
An expression that specifies the number of hours to add to timeValue.
Creates a that invokes the canonical 'AddMinutes' function with the specified arguments, which must have DateTime, DateTimeOffset or Time, and integer result types. The result type of the expression is the same as the result type of timeValue.
A new DbFunctionExpression that adds the number of minutes specified by addValue to the value specified by timeValue.
An expression that specifies the value to which addValueshould be added.
An expression that specifies the number of minutes to add to timeValue.
Creates a that invokes the canonical 'AddSeconds' function with the specified arguments, which must have DateTime, DateTimeOffset or Time, and integer result types. The result type of the expression is the same as the result type of timeValue.
A new DbFunctionExpression that adds the number of seconds specified by addValue to the value specified by timeValue.
An expression that specifies the value to which addValueshould be added.
An expression that specifies the number of seconds to add to timeValue.
Creates a that invokes the canonical 'AddMilliseconds' function with the specified arguments, which must have DateTime, DateTimeOffset or Time, and integer result types. The result type of the expression is the same as the result type of timeValue.
A new DbFunctionExpression that adds the number of milliseconds specified by addValue to the value specified by timeValue.
An expression that specifies the value to which addValueshould be added.
An expression that specifies the number of milliseconds to add to timeValue.
Creates a that invokes the canonical 'AddMicroseconds' function with the specified arguments, which must have DateTime, DateTimeOffset or Time, and integer result types. The result type of the expression is the same as the result type of timeValue.
A new DbFunctionExpression that adds the number of microseconds specified by addValue to the value specified by timeValue.
An expression that specifies the value to which addValueshould be added.
An expression that specifies the number of microseconds to add to timeValue.
Creates a that invokes the canonical 'AddNanoseconds' function with the specified arguments, which must have DateTime, DateTimeOffset or Time, and integer result types. The result type of the expression is the same as the result type of timeValue.
A new DbFunctionExpression that adds the number of nanoseconds specified by addValue to the value specified by timeValue.
An expression that specifies the value to which addValueshould be added.
An expression that specifies the number of nanoseconds to add to timeValue.
Creates a that invokes the canonical 'DiffYears' function with the specified arguments, which must each have DateTime or DateTimeOffset result type. The result type of the expression is Edm.Int32.
A new DbFunctionExpression that returns the number of years that is the difference between dateValue1 and dateValue2.
An expression that specifies the first date value argument.
An expression that specifies the second date value argument.
Creates a that invokes the canonical 'DiffMonths' function with the specified arguments, which must each have DateTime or DateTimeOffset result type. The result type of the expression is Edm.Int32.
A new DbFunctionExpression that returns the number of months that is the difference between dateValue1 and dateValue2.
An expression that specifies the first date value argument.
An expression that specifies the second date value argument.
Creates a that invokes the canonical 'DiffDays' function with the specified arguments, which must each have DateTime or DateTimeOffset result type. The result type of the expression is Edm.Int32.
A new DbFunctionExpression that returns the number of days that is the difference between dateValue1 and dateValue2.
An expression that specifies the first date value argument.
An expression that specifies the second date value argument.
Creates a that invokes the canonical 'DiffHours' function with the specified arguments, which must each have DateTime, DateTimeOffset or Time result type. The result type of the expression is Edm.Int32.
A new DbFunctionExpression that returns the number of hours that is the difference between timeValue1 and timeValue2.
An expression that specifies the first time value argument.
An expression that specifies the second time value argument.
Creates a that invokes the canonical 'DiffMinutes' function with the specified arguments, which must each have DateTime, DateTimeOffset or Time result type. The result type of the expression is Edm.Int32.
A new DbFunctionExpression that returns the number of minutes that is the difference between timeValue1 and timeValue2.
An expression that specifies the first time value argument.
An expression that specifies the second time value argument.
Creates a that invokes the canonical 'DiffSeconds' function with the specified arguments, which must each have DateTime, DateTimeOffset or Time result type. The result type of the expression is Edm.Int32.
A new DbFunctionExpression that returns the number of seconds that is the difference between timeValue1 and timeValue2.
An expression that specifies the first time value argument.
An expression that specifies the second time value argument.
Creates a that invokes the canonical 'DiffMilliseconds' function with the specified arguments, which must each have DateTime, DateTimeOffset or Time result type. The result type of the expression is Edm.Int32.
A new DbFunctionExpression that returns the number of milliseconds that is the difference between timeValue1 and timeValue2.
An expression that specifies the first time value argument.
An expression that specifies the second time value argument.
Creates a that invokes the canonical 'DiffMicroseconds' function with the specified arguments, which must each have DateTime, DateTimeOffset or Time result type. The result type of the expression is Edm.Int32.
A new DbFunctionExpression that returns the number of microseconds that is the difference between timeValue1 and timeValue2.
An expression that specifies the first time value argument.
An expression that specifies the second time value argument.
Creates a that invokes the canonical 'DiffNanoseconds' function with the specified arguments, which must each have DateTime, DateTimeOffset or Time result type. The result type of the expression is Edm.Int32.
A new DbFunctionExpression that returns the number of nanoseconds that is the difference between timeValue1 and timeValue2.
An expression that specifies the first time value argument.
An expression that specifies the second time value argument.
Creates a that invokes the canonical 'Round' function with the specified argument, which must each have a single, double or decimal result type. The result type of the expression is the same as the result type of value.
A new DbFunctionExpression that rounds the specified argument to the nearest integer value.
An expression that specifies the numeric value to round.
Creates a that invokes the canonical 'Round' function with the specified arguments, which must have a single, double or decimal, and integer result types. The result type of the expression is the same as the result type of value.
A new DbFunctionExpression that rounds the specified argument to the nearest integer value, with precision as specified by digits.
An expression that specifies the numeric value to round.
An expression that specifies the number of digits of precision to use when rounding.
Creates a that invokes the canonical 'Floor' function with the specified argument, which must each have a single, double or decimal result type. The result type of the expression is the same as the result type of value.
A new DbFunctionExpression that returns the largest integer value not greater than value.
An expression that specifies the numeric value.
Creates a that invokes the canonical 'Ceiling' function with the specified argument, which must each have a single, double or decimal result type. The result type of the expression is the same as the result type of value.
A new DbFunctionExpression that returns the smallest integer value not less than than value.
An expression that specifies the numeric value.
Creates a that invokes the canonical 'Abs' function with the specified argument, which must each have a numeric result type. The result type of the expression is the same as the result type of value.
A new DbFunctionExpression that returns the absolute value of value.
An expression that specifies the numeric value.
Creates a that invokes the canonical 'Truncate' function with the specified arguments, which must have a single, double or decimal, and integer result types. The result type of the expression is the same as the result type of value.
A new DbFunctionExpression that truncates the specified argument to the nearest integer value, with precision as specified by digits.
An expression that specifies the numeric value to truncate.
An expression that specifies the number of digits of precision to use when truncating.
Creates a that invokes the canonical 'Power' function with the specified arguments, which must have numeric result types. The result type of the expression is the same as the result type of baseArgument.
A new DbFunctionExpression that returns the value of baseArgument raised to the power specified by exponent.
An expression that specifies the numeric value to raise to the given power.
An expression that specifies the power to which baseArgument should be raised.
Creates a that invokes the canonical 'BitwiseAnd' function with the specified arguments, which must have the same integer numeric result type. The result type of the expression is the same as the type of the arguments.
A new DbFunctionExpression that returns the value produced by performing the bitwise AND of value1 and value2.
An expression that specifies the first operand.
An expression that specifies the second operand.
Creates a that invokes the canonical 'BitwiseOr' function with the specified arguments, which must have the same integer numeric result type. The result type of the expression is the same as the type of the arguments.
A new DbFunctionExpression that returns the value produced by performing the bitwise OR of value1 and value2.
An expression that specifies the first operand.
An expression that specifies the second operand.
Creates a that invokes the canonical 'BitwiseNot' function with the specified argument, which must have an integer numeric result type. The result type of the expression is the same as the type of the arguments.
A new DbFunctionExpression that returns the value produced by performing the bitwise NOT of value.
An expression that specifies the first operand.
Creates a that invokes the canonical 'BitwiseXor' function with the specified arguments, which must have the same integer numeric result type. The result type of the expression is the same as the type of the arguments.
A new DbFunctionExpression that returns the value produced by performing the bitwise XOR (exclusive OR) of value1 and value2.
An expression that specifies the first operand.
An expression that specifies the second operand.
Creates a that invokes the canonical 'NewGuid' function.
A new DbFunctionExpression that returns a new GUID value.
Validates the input and sort key arguments to both DbSkipExpression and DbSortExpression.
A list of SortClauses that specifies the sort order to apply to the input collection
Ensures that the specified type is non-null, associated with the correct metadata workspace/dataspace, and is not NullType.
The type usage instance to verify.
If the specified type metadata is null
If the specified type metadata belongs to a metadata workspace other than the workspace of the command tree
If the specified type metadata belongs to a dataspace other than the dataspace of the command tree
Verifies that the specified member is valid - non-null, from the same metadata workspace and data space as the command tree, etc
The member to verify
The name of the variable to which this member instance is being assigned
Verifies that the specified function metadata is valid - non-null and either created by this command tree (if a LambdaFunction) or from the same metadata collection and data space as the command tree (for ordinary function metadata)
The function metadata to verify
Verifies that the specified EntitySet is valid with respect to the command tree
The EntitySet to verify
The variable name to use if an exception should be thrown
Checks whether the clr enum type matched the edm enum type.
Edm enum type.
Clr enum type.
true if types match otherwise false .
The clr enum type matches the edm enum type if:
- type names are the same
- both types have the same underlying type (note that this prevents from over- and underflows)
- the edm enum type does not have more members than the clr enum type
- members have the same names
- members have the same values
Validates an input enumerable argument with a specific element type,
converting each input element into an instance of a specific output element type,
then producing a final result of another specific type.
The element type of the input enumerable
The element type that input elements are converted to
The type of the final result
Validates the input enumerable, converting each input element and producing the final instance of
as a result.
The instance of produced by calling the function on the list of elements produced by calling the
function on each element of the input enumerable.
If the input enumerable itself is null
If
is a nullable type and any element of the input enumerable is null.
If
is set and the actual number of input elements is not equal to this value.
If
is -1,
is set to
false
and the input enumerable is empty.
If
is set and a duplicate name is derived for more than one input element.
Other exceptions may be thrown by the and functions, and by the
function, if specified.
Gets or sets a value that determines whether an exception is thrown if the enumerable argument is empty.
AllowEmpty is ignored if is set.
If ExpectedElementCount is set to zero, an empty collection will not cause an exception to be thrown,
even if AllowEmpty is set to false.
Gets or set a value that determines the number of elements expected in the enumerable argument.
A value of -1 indicates that any number of elements is permitted, including zero.
Use to disallow an empty list when ExpectedElementCount is set to -1.
Gets or sets the function used to convert an element from the enumerable argument into an instance of
the desired output element type. The position of the input element is also specified as an argument to this function.
Gets or sets the function used to create the output collection from a list of converted enumerable elements.
Gets or sets an optional function that can retrieve the name of an element from the enumerable argument.
If this function is set, duplicate input element names will result in an exception. Null or empty names will
not result in an exception. If specified, this function will be called after .
Provides a constructor-like means of calling
.
Initializes a new instance of the class with the specified first column value and optional successive column values.
A key-value pair that provides the first column in the new row instance. (required)
A key-value pairs that provide any subsequent columns in the new row instance. (optional)
Creates a new that constructs a new row based on the columns contained in this Row instance.
A new DbNewInstanceExpression that constructs a row with the same column names and DbExpression values as this Row instance.
Converts the given Row instance into an instance of
A DbExpression based on the Row instance
is null.
Provides an API to construct s that invoke spatial realted canonical EDM functions, and, where appropriate, allows that API to be accessed as extension methods on the expression type itself.
Creates a that invokes the canonical 'GeometryFromText' function with the specified argument, which must have a string result type. The result type of the expression is Edm.Geometry. Its value has the default coordinate system id (SRID) of the underlying provider.
A new DbFunctionExpression that returns a new geometry value based on the specified value.
An expression that provides the well known text representation of the geometry value.
Creates a that invokes the canonical 'GeometryFromText' function with the specified arguments. wellKnownText must have a string result type, while coordinateSystemId must have an integer numeric result type. The result type of the expression is Edm.Geometry.
A new DbFunctionExpression that returns a new geometry value based on the specified values.
An expression that provides the well known text representation of the geometry value.
An expression that provides the coordinate system id (SRID) of the geometry value's coordinate system.
Creates a that invokes the canonical 'GeometryPointFromText' function with the specified arguments. pointWellKnownText must have a string result type, while coordinateSystemId must have an integer numeric result type. The result type of the expression is Edm.Geometry.
A new DbFunctionExpression that returns a new geometry point value based on the specified values.
An expression that provides the well known text representation of the geometry point value.
An expression that provides the coordinate system id (SRID) of the geometry point value's coordinate system.
Creates a that invokes the canonical 'GeometryLineFromText' function with the specified arguments. lineWellKnownText must have a string result type, while coordinateSystemId must have an integer numeric result type. The result type of the expression is Edm.Geometry.
A new DbFunctionExpression that returns a new geometry line value based on the specified values.
An expression that provides the well known text representation of the geometry line value.
An expression that provides the coordinate system id (SRID) of the geometry line value's coordinate system.
Creates a that invokes the canonical 'GeometryPolygonFromText' function with the specified arguments. polygonWellKnownText must have a string result type, while coordinateSystemId must have an integer numeric result type. The result type of the expression is Edm.Geometry.
A new DbFunctionExpression that returns a new geometry polygon value based on the specified values.
An expression that provides the well known text representation of the geometry polygon value.
An expression that provides the coordinate system id (SRID) of the geometry polygon value's coordinate system.
Creates a that invokes the canonical 'GeometryMultiPointFromText' function with the specified arguments. multiPointWellKnownText must have a string result type, while coordinateSystemId must have an integer numeric result type. The result type of the expression is Edm.Geometry.
A new DbFunctionExpression that returns a new geometry multi-point value based on the specified values.
An expression that provides the well known text representation of the geometry multi-point value.
An expression that provides the coordinate system id (SRID) of the geometry multi-point value's coordinate system.
Creates a that invokes the canonical 'GeometryMultiLineFromText' function with the specified arguments. multiLineWellKnownText must have a string result type, while coordinateSystemId must have an integer numeric result type. The result type of the expression is Edm.Geometry.
A new DbFunctionExpression that returns a new geometry multi-line value based on the specified values.
An expression that provides the well known text representation of the geometry multi-line value.
An expression that provides the coordinate system id (SRID) of the geometry multi-line value's coordinate system.
Creates a that invokes the canonical 'GeometryMultiPolygonFromText' function with the specified arguments. multiPolygonWellKnownText must have a string result type, while coordinateSystemId must have an integer numeric result type. The result type of the expression is Edm.Geometry.
A new DbFunctionExpression that returns a new geometry multi-polygon value based on the specified values.
An expression that provides the well known text representation of the geometry multi-polygon value.
An expression that provides the coordinate system id (SRID) of the geometry multi-polygon value's coordinate system.
Creates a that invokes the canonical 'GeometryCollectionFromText' function with the specified arguments. geometryCollectionWellKnownText must have a string result type, while coordinateSystemId must have an integer numeric result type. The result type of the expression is Edm.Geometry.
A new DbFunctionExpression that returns a new geometry collection value based on the specified values.
An expression that provides the well known text representation of the geometry collection value.
An expression that provides the coordinate system id (SRID) of the geometry collection value's coordinate system.
Creates a that invokes the canonical 'GeometryFromBinary' function with the specified argument, which must have a binary result type. The result type of the expression is Edm.Geometry.
A new DbFunctionExpression that returns a new geometry value based on the specified binary value.
An expression that provides the well known binary representation of the geometry value.
Creates a that invokes the canonical 'GeometryFromBinary' function with the specified arguments. wellKnownBinaryValue must have a binary result type, while coordinateSystemId must have an integer numeric result type. The result type of the expression is Edm.Geometry.
A new DbFunctionExpression that returns a new geometry value based on the specified values.
An expression that provides the well known binary representation of the geometry value.
An expression that provides the coordinate system id (SRID) of the geometry value's coordinate system.
Creates a that invokes the canonical 'GeometryPointFromBinary' function with the specified arguments. pointWellKnownBinaryValue must have a binary result type, while coordinateSystemId must have an integer numeric result type. The result type of the expression is Edm.Geometry.
A new DbFunctionExpression that returns a new geometry point value based on the specified values.
An expression that provides the well known binary representation of the geometry point value.
An expression that provides the coordinate system id (SRID) of the geometry point value's coordinate system.
Creates a that invokes the canonical 'GeometryLineFromBinary' function with the specified arguments. lineWellKnownBinaryValue must have a binary result type, while coordinateSystemId must have an integer numeric result type. The result type of the expression is Edm.Geometry.
A new DbFunctionExpression that returns a new geometry line value based on the specified values.
An expression that provides the well known binary representation of the geometry line value.
An expression that provides the coordinate system id (SRID) of the geometry line value's coordinate system.
Creates a that invokes the canonical 'GeometryPolygonFromBinary' function with the specified arguments. polygonWellKnownBinaryValue must have a binary result type, while coordinateSystemId must have an integer numeric result type. The result type of the expression is Edm.Geometry.
A new DbFunctionExpression that returns a new geometry polygon value based on the specified values.
An expression that provides the well known binary representation of the geometry polygon value.
An expression that provides the coordinate system id (SRID) of the geometry polygon value's coordinate system.
Creates a that invokes the canonical 'GeometryMultiPointFromBinary' function with the specified arguments. multiPointWellKnownBinaryValue must have a binary result type, while coordinateSystemId must have an integer numeric result type. The result type of the expression is Edm.Geometry.
A new DbFunctionExpression that returns a new geometry multi-point value based on the specified values.
An expression that provides the well known binary representation of the geometry multi-point value.
An expression that provides the coordinate system id (SRID) of the geometry multi-point value's coordinate system.
Creates a that invokes the canonical 'GeometryMultiLineFromBinary' function with the specified arguments. multiLineWellKnownBinaryValue must have a binary result type, while coordinateSystemId must have an integer numeric result type. The result type of the expression is Edm.Geometry.
A new DbFunctionExpression that returns a new geometry multi-line value based on the specified values.
An expression that provides the well known binary representation of the geometry multi-line value.
An expression that provides the coordinate system id (SRID) of the geometry multi-line value's coordinate system.
Creates a that invokes the canonical 'GeometryMultiPolygonFromBinary' function with the specified arguments. multiPolygonWellKnownBinaryValue must have a binary result type, while coordinateSystemId must have an integer numeric result type. The result type of the expression is Edm.Geometry.
A new DbFunctionExpression that returns a new geometry multi-polygon value based on the specified values.
An expression that provides the well known binary representation of the geometry multi-polygon value.
An expression that provides the coordinate system id (SRID) of the geometry multi-polygon value's coordinate system.
Creates a that invokes the canonical 'GeometryCollectionFromBinary' function with the specified arguments. geometryCollectionWellKnownBinaryValue must have a binary result type, while coordinateSystemId must have an integer numeric result type. The result type of the expression is Edm.Geometry.
A new DbFunctionExpression that returns a new geometry collection value based on the specified values.
An expression that provides the well known binary representation of the geometry collection value.
An expression that provides the coordinate system id (SRID) of the geometry collection value's coordinate system.
Creates a that invokes the canonical 'GeometryFromGml' function with the specified argument, which must have a string result type. The result type of the expression is Edm.Geometry.
A new DbFunctionExpression that returns a new geometry value based on the specified value with the default coordinate system id (SRID) of the underlying provider.
An expression that provides the Geography Markup Language (GML) representation of the geometry value.
Creates a that invokes the canonical 'GeometryFromGml' function with the specified arguments. geometryMarkup must have a string result type, while coordinateSystemId must have an integer numeric result type. The result type of the expression is Edm.Geometry.
A new DbFunctionExpression that returns a new geometry value based on the specified values.
An expression that provides the Geography Markup Language (GML) representation of the geometry value.
An expression that provides the coordinate system id (SRID) of the geometry value's coordinate system.
Creates a that invokes the canonical 'GeographyFromText' function with the specified argument, which must have a string result type. The result type of the expression is Edm.Geography. Its value has the default coordinate system id (SRID) of the underlying provider.
A new DbFunctionExpression that returns a new geography value based on the specified value.
An expression that provides the well known text representation of the geography value.
Creates a that invokes the canonical 'GeographyFromText' function with the specified arguments. wellKnownText must have a string result type, while coordinateSystemId must have an integer numeric result type. The result type of the expression is Edm.Geography.
A new DbFunctionExpression that returns a new geography value based on the specified values.
An expression that provides the well known text representation of the geography value.
An expression that provides the coordinate system id (SRID) of the geography value's coordinate system.
Creates a that invokes the canonical 'GeographyPointFromText' function with the specified arguments.
The canonical 'GeographyPointFromText' function.
An expression that provides the well-known text representation of the geography point value.
An expression that provides the coordinate system id (SRID) of the geography point value's coordinate systempointWellKnownTextValue.
Creates a that invokes the canonical 'GeographyLineFromText' function with the specified arguments. lineWellKnownText must have a string result type, while coordinateSystemId must have an integer numeric result type. The result type of the expression is Edm.Geography.
A new DbFunctionExpression that returns a new geography line value based on the specified values.
An expression that provides the well known text representation of the geography line value.
An expression that provides the coordinate system id (SRID) of the geography line value's coordinate system.
Creates a that invokes the canonical 'GeographyPolygonFromText' function with the specified arguments. polygonWellKnownText must have a string result type, while coordinateSystemId must have an integer numeric result type. The result type of the expression is Edm.Geography.
A new DbFunctionExpression that returns a new geography polygon value based on the specified values.
An expression that provides the well known text representation of the geography polygon value.
An expression that provides the coordinate system id (SRID) of the geography polygon value's coordinate system.
Creates a that invokes the canonical 'GeographyMultiPointFromText' function with the specified arguments. multiPointWellKnownText must have a string result type, while coordinateSystemId must have an integer numeric result type. The result type of the expression is Edm.Geography.
A new DbFunctionExpression that returns a new geography multi-point value based on the specified values.
An expression that provides the well known text representation of the geography multi-point value.
An expression that provides the coordinate system id (SRID) of the geography multi-point value's coordinate system.
Creates a that invokes the canonical 'GeographyMultiLineFromText' function with the specified arguments. multiLineWellKnownText must have a string result type, while coordinateSystemId must have an integer numeric result type. The result type of the expression is Edm.Geography.
A new DbFunctionExpression that returns a new geography multi-line value based on the specified values.
An expression that provides the well known text representation of the geography multi-line value.
An expression that provides the coordinate system id (SRID) of the geography multi-line value's coordinate system.
Creates a that invokes the canonical 'GeographyMultiPolygonFromText' function with the specified arguments. multiPolygonWellKnownText must have a string result type, while coordinateSystemId must have an integer numeric result type. The result type of the expression is Edm.Geography.
A new DbFunctionExpression that returns a new geography multi-polygon value based on the specified values.
An expression that provides the well known text representation of the geography multi-polygon value.
An expression that provides the coordinate system id (SRID) of the geography multi-polygon value's coordinate system.
Creates a that invokes the canonical 'GeographyCollectionFromText' function with the specified arguments. geographyCollectionWellKnownText must have a string result type, while coordinateSystemId must have an integer numeric result type. The result type of the expression is Edm.Geography.
A new DbFunctionExpression that returns a new geography collection value based on the specified values.
An expression that provides the well known text representation of the geography collection value.
An expression that provides the coordinate system id (SRID) of the geography collection value's coordinate system.
Creates a that invokes the canonical 'GeographyFromBinary' function with the specified argument, which must have a binary result type. The result type of the expression is Edm.Geography.
A new DbFunctionExpression that returns a new geography value based on the specified binary value.
An expression that provides the well known binary representation of the geography value.
Creates a that invokes the canonical 'GeographyFromBinary' function with the specified arguments. wellKnownBinaryValue must have a binary result type, while coordinateSystemId must have an integer numeric result type. The result type of the expression is Edm.Geography.
A new DbFunctionExpression that returns a new geography value based on the specified values.
An expression that provides the well known binary representation of the geography value.
An expression that provides the coordinate system id (SRID) of the geography value's coordinate system.
Creates a that invokes the canonical 'GeographyPointFromBinary' function with the specified arguments. pointWellKnownBinaryValue must have a binary result type, while coordinateSystemId must have an integer numeric result type. The result type of the expression is Edm.Geography.
A new DbFunctionExpression that returns a new geography point value based on the specified values.
An expression that provides the well known binary representation of the geography point value.
An expression that provides the coordinate system id (SRID) of the geography point value's coordinate systempointWellKnownBinaryValue.
Creates a that invokes the canonical 'GeographyLineFromBinary' function with the specified arguments. lineWellKnownBinaryValue must have a binary result type, while coordinateSystemId must have an integer numeric result type. The result type of the expression is Edm.Geography.
A new DbFunctionExpression that returns a new geography line value based on the specified values.
An expression that provides the well known binary representation of the geography line value.
An expression that provides the coordinate system id (SRID) of the geography line value's coordinate system.
Creates a that invokes the canonical 'GeographyPolygonFromBinary' function with the specified arguments. polygonWellKnownBinaryValue must have a binary result type, while coordinateSystemId must have an integer numeric result type. The result type of the expression is Edm.Geography.
A new DbFunctionExpression that returns a new geography polygon value based on the specified values.
An expression that provides the well known binary representation of the geography polygon value.
An expression that provides the coordinate system id (SRID) of the geography polygon value's coordinate system.
Creates a that invokes the canonical 'GeographyMultiPointFromBinary' function with the specified arguments. multiPointWellKnownBinaryValue must have a binary result type, while coordinateSystemId must have an integer numeric result type. The result type of the expression is Edm.Geography.
A new DbFunctionExpression that returns a new geography multi-point value based on the specified values.
An expression that provides the well known binary representation of the geography multi-point value.
An expression that provides the coordinate system id (SRID) of the geography multi-point value's coordinate system.
Creates a that invokes the canonical 'GeographyMultiLineFromBinary' function with the specified arguments. multiLineWellKnownBinaryValue must have a binary result type, while coordinateSystemId must have an integer numeric result type. The result type of the expression is Edm.Geography.
A new DbFunctionExpression that returns a new geography multi-line value based on the specified values.
An expression that provides the well known binary representation of the geography multi-line value.
An expression that provides the coordinate system id (SRID) of the geography multi-line value's coordinate system.
Creates a that invokes the canonical 'GeographyMultiPolygonFromBinary' function with the specified arguments. multiPolygonWellKnownBinaryValue must have a binary result type, while coordinateSystemId must have an integer numeric result type. The result type of the expression is Edm.Geography.
A new DbFunctionExpression that returns a new geography multi-polygon value based on the specified values.
An expression that provides the well known binary representation of the geography multi-polygon value.
An expression that provides the coordinate system id (SRID) of the geography multi-polygon value's coordinate system.
Creates a that invokes the canonical 'GeographyCollectionFromBinary' function with the specified arguments. geographyCollectionWellKnownBinaryValue must have a binary result type, while coordinateSystemId must have an integer numeric result type. The result type of the expression is Edm.Geography.
A new DbFunctionExpression that returns a new geography collection value based on the specified values.
An expression that provides the well known binary representation of the geography collection value.
An expression that provides the coordinate system id (SRID) of the geography collection value's coordinate system.
Creates a that invokes the canonical 'GeographyFromGml' function with the specified argument, which must have a string result type. The result type of the expression is Edm.Geography.
A new DbFunctionExpression that returns a new geography value based on the specified value with the default coordinate system id (SRID) of the underlying provider.
An expression that provides the Geography Markup Language (GML) representation of the geography value.
Creates a that invokes the canonical 'GeographyFromGml' function with the specified arguments. geographyMarkup must have a string result type, while coordinateSystemId must have an integer numeric result type. The result type of the expression is Edm.Geography.
A new DbFunctionExpression that returns a new geography value based on the specified values.
An expression that provides the Geography Markup Language (GML) representation of the geography value.
An expression that provides the coordinate system id (SRID) of the geography value's coordinate system.
Creates a that invokes the canonical 'CoordinateSystemId' function with the specified argument, which must have an Edm.Geography or Edm.Geometry result type. The result type of the expression is Edm.Int32.
A new DbFunctionExpression that returns the integer SRID value from spatialValue.
An expression that specifies the value from which the coordinate system id (SRID) should be retrieved.
Creates a that invokes the canonical 'SpatialTypeName' function with the specified argument, which must have an Edm.Geography or Edm.Geometry result type. The result type of the expression is Edm.String.
A new DbFunctionExpression that returns the string Geometry Type name from spatialValue.
An expression that specifies the value from which the Geometry Type name should be retrieved.
Creates a that invokes the canonical 'SpatialDimension' function with the specified argument, which must have an Edm.Geography or Edm.Geometry result type. The result type of the expression is Edm.Int32.
A new DbFunctionExpression that returns the Dimension value from spatialValue.
An expression that specifies the value from which the Dimension value should be retrieved.
Creates a that invokes the canonical 'SpatialEnvelope' function with the specified argument, which must have an Edm.Geometry result type. The result type of the expression is Edm.Geometry.
A new DbFunctionExpression that returns the the minimum bounding box for geometryValue.
An expression that specifies the value from which the Envelope value should be retrieved.
Creates a that invokes the canonical 'AsBinary' function with the specified argument, which must have an Edm.Geography or Edm.Geometry result type. The result type of the expression is Edm.Binary.
A new DbFunctionExpression that returns the well known binary representation of spatialValue.
An expression that specifies the spatial value from which the well known binary representation should be produced.
Creates a that invokes the canonical 'AsGml' function with the specified argument, which must have an Edm.Geography or Edm.Geometry result type. The result type of the expression is Edm.String.
A new DbFunctionExpression that returns the Geography Markup Language (GML) representation of spatialValue.
An expression that specifies the spatial value from which the Geography Markup Language (GML) representation should be produced.
Creates a that invokes the canonical 'AsText' function with the specified argument, which must have an Edm.Geography or Edm.Geometry result type. The result type of the expression is Edm.String.
A new DbFunctionExpression that returns the well known text representation of spatialValue.
An expression that specifies the spatial value from which the well known text representation should be produced.
Creates a that invokes the canonical 'IsEmptySpatial' function with the specified argument, which must have an Edm.Geography or Edm.Geometry result type. The result type of the expression is Edm.Boolean.
A new DbFunctionExpression that returns a Boolean value indicating whether spatialValue is empty.
An expression that specifies the spatial value from which the IsEmptySptiaal value should be retrieved.
Creates a that invokes the canonical 'IsSimpleGeometry' function with the specified argument, which must have an Edm.Geometry result type. The result type of the expression is Edm.Boolean.
A new DbFunctionExpression that returns a Boolean value indicating whether geometryValue is a simple geometry.
The geometry value.
Creates a that invokes the canonical 'SpatialBoundary' function with the specified argument, which must have an Edm.Geometry result type. The result type of the expression is Edm.Geometry.
A new DbFunctionExpression that returns the the boundary for geometryValue.
An expression that specifies the geometry value from which the SpatialBoundary value should be retrieved.
Creates a that invokes the canonical 'IsValidGeometry' function with the specified argument, which must have an Edm.Geometry result type. The result type of the expression is Edm.Boolean.
A new DbFunctionExpression that returns a Boolean value indicating whether geometryValue is valid.
An expression that specifies the geometry value which should be tested for spatial validity.
Creates a that invokes the canonical 'SpatialEquals' function with the specified arguments, which must each have an Edm.Geography or Edm.Geometry result type. The result type of spatialValue1 must match the result type of spatialValue2. The result type of the expression is Edm.Boolean.
A new DbFunctionExpression that returns a Boolean value indicating whether spatialValue1 and spatialValue2 are equal.
An expression that specifies the first spatial value.
An expression that specifies the spatial value that should be compared with spatialValue1 for equality.
Creates a that invokes the canonical 'SpatialDisjoint' function with the specified arguments, which must each have an Edm.Geography or Edm.Geometry result type. The result type of spatialValue1 must match the result type of spatialValue2. The result type of the expression is Edm.Boolean.
A new DbFunctionExpression that returns a Boolean value indicating whether spatialValue1 and spatialValue2 are spatially disjoint.
An expression that specifies the first spatial value.
An expression that specifies the spatial value that should be compared with spatialValue1 for disjointness.
Creates a that invokes the canonical 'SpatialIntersects' function with the specified arguments, which must each have an Edm.Geography or Edm.Geometry result type. The result type of spatialValue1 must match the result type of spatialValue2. The result type of the expression is Edm.Boolean.
A new DbFunctionExpression that returns a Boolean value indicating whether spatialValue1 and spatialValue2 intersect.
An expression that specifies the first spatial value.
An expression that specifies the spatial value that should be compared with spatialValue1 for intersection.
Creates a that invokes the canonical 'SpatialTouches' function with the specified arguments, which must each have an Edm.Geometry result type. The result type of the expression is Edm.Boolean.
A new DbFunctionExpression that returns a Boolean value indicating whether geometryValue1 touches geometryValue2.
An expression that specifies the first geometry value.
An expression that specifies the geometry value that should be compared with geometryValue1.
Creates a that invokes the canonical 'SpatialCrosses' function with the specified arguments, which must each have an Edm.Geometry result type. The result type of the expression is Edm.Boolean.
A new DbFunctionExpression that returns a Boolean value indicating whether geometryValue1 crosses geometryValue2 intersect.
An expression that specifies the first geometry value.
An expression that specifies the geometry value that should be compared with geometryValue1.
Creates a that invokes the canonical 'SpatialWithin' function with the specified arguments, which must each have an Edm.Geometry result type. The result type of the expression is Edm.Boolean.
A new DbFunctionExpression that returns a Boolean value indicating whether geometryValue1 is spatially within geometryValue2.
An expression that specifies the first geometry value.
An expression that specifies the geometry value that should be compared with geometryValue1.
Creates a that invokes the canonical 'SpatialContains' function with the specified arguments, which must each have an Edm.Geometry result type. The result type of the expression is Edm.Boolean.
A new DbFunctionExpression that returns a Boolean value indicating whether geometryValue1 spatially contains geometryValue2.
An expression that specifies the first geometry value.
An expression that specifies the geometry value that should be compared with geometryValue1.
Creates a that invokes the canonical 'SpatialOverlaps' function with the specified arguments, which must each have an Edm.Geometry result type. The result type of the expression is Edm.Boolean.
A new DbFunctionExpression that returns a Boolean value indicating whether geometryValue1 spatially overlaps geometryValue2.
An expression that specifies the first geometry value.
An expression that specifies the geometry value that should be compared with geometryValue1.
Creates a that invokes the canonical 'SpatialRelate' function with the specified arguments, which must have Edm.Geometry and string result types. The result type of the expression is Edm.Boolean.
A new DbFunctionExpression that returns a Boolean value indicating whether geometryValue1 is spatially related to geometryValue2 according to the spatial relationship designated by intersectionPatternMatrix.
An expression that specifies the first geometry value.
An expression that specifies the geometry value that should be compared with geometryValue1.
An expression that specifies the text representation of the Dimensionally Extended Nine-Intersection Model (DE-9IM) intersection pattern used to compare geometryValue1 and geometryValue2.
Creates a that invokes the canonical 'SpatialBuffer' function with the specified arguments, which must have a Edm.Geography or Edm.Geometry and Edm.Double result types. The result type of the expression is Edm.Geometry.
A new DbFunctionExpression that returns a geometry value representing all points less than or equal to distance from spatialValue.
An expression that specifies the spatial value.
An expression that specifies the buffer distance.
Creates a that invokes the canonical 'Distance' function with the specified arguments, which must each have an Edm.Geography or Edm.Geometry result type. The result type of spatialValue1 must match the result type of spatialValue2. The result type of the expression is Edm.Double.
A new DbFunctionExpression that returns the distance between the closest points in spatialValue1 and spatialValue1.
An expression that specifies the first spatial value.
An expression that specifies the spatial value from which the distance from spatialValue1 should be measured.
Creates a that invokes the canonical 'SpatialConvexHull' function with the specified argument, which must have an Edm.Geometry result type. The result type of the expression is Edm.Geometry.
A new DbFunctionExpression that returns the the convex hull for geometryValue.
An expression that specifies the geometry value from which the convex hull value should be retrieved.
Creates a that invokes the canonical 'SpatialIntersection' function with the specified arguments, which must each have an Edm.Geography or Edm.Geometry result type. The result type of spatialValue1 must match the result type of spatialValue2. The result type of the expression is the same as the type of spatialValue1 and spatialValue2.
A new DbFunctionExpression that returns the spatial value representing the intersection of spatialValue1 and spatialValue2.
An expression that specifies the first spatial value.
An expression that specifies the spatial value for which the intersection with spatialValue1 should be computed.
Creates a that invokes the canonical 'SpatialUnion' function with the specified arguments, which must each have an Edm.Geography or Edm.Geometry result type. The result type of spatialValue1 must match the result type of spatialValue2. The result type of the expression is the same as the type of spatialValue1 and spatialValue2.
A new DbFunctionExpression that returns the spatial value representing the union of spatialValue1 and spatialValue2.
An expression that specifies the first spatial value.
An expression that specifies the spatial value for which the union with spatialValue1 should be computed.
Creates a that invokes the canonical 'SpatialDifference' function with the specified arguments, which must each have an Edm.Geography or Edm.Geometry result type. The result type of spatialValue1 must match the result type of spatialValue2. The result type of the expression is the same as the type of spatialValue1 and spatialValue2.
A new DbFunctionExpression that returns the geometry value representing the difference of spatialValue2 with spatialValue1.
An expression that specifies the first spatial value.
An expression that specifies the spatial value for which the difference with spatialValue1 should be computed.
Creates a that invokes the canonical 'SpatialSymmetricDifference' function with the specified arguments, which must each have an Edm.Geography or Edm.Geometry result type. The result type of spatialValue1 must match the result type of spatialValue2. The result type of the expression is the same as the type of spatialValue1 and spatialValue2.
A new DbFunctionExpression that returns the geometry value representing the symmetric difference of spatialValue2 with spatialValue1.
An expression that specifies the first spatial value.
An expression that specifies the spatial value for which the symmetric difference with spatialValue1 should be computed.
Creates a that invokes the canonical 'SpatialElementCount' function with the specified argument, which must have an Edm.Geography or Edm.Geometry result type. The result type of the expression is Edm.Int32.
A new DbFunctionExpression that returns either the number of elements in spatialValue or null if spatialValue is not a collection.
An expression that specifies the geography or geometry collection value from which the number of elements should be retrieved.
Creates a that invokes the canonical 'SpatialElementAt' function with the specified arguments. The first argument must have an Edm.Geography or Edm.Geometry result type. The second argument must have an integer numeric result type. The result type of the expression is the same as that of spatialValue.
A new DbFunctionExpression that returns either the collection element at position indexValue in spatialValue or null if spatialValue is not a collection.
An expression that specifies the geography or geometry collection value.
An expression that specifies the position of the element to be retrieved from within the geometry or geography collection.
Creates a that invokes the canonical 'XCoordinate' function with the specified argument, which must have an Edm.Geometry result type. The result type of the expression is Edm.Double.
A new DbFunctionExpression that returns either the X co-ordinate value of geometryValue or null if geometryValue is not a point.
An expression that specifies the geometry point value from which the X co-ordinate value should be retrieved.
Creates a that invokes the canonical 'YCoordinate' function with the specified argument, which must have an Edm.Geometry result type. The result type of the expression is Edm.Double.
A new DbFunctionExpression that returns either the Y co-ordinate value of geometryValue or null if geometryValue is not a point.
An expression that specifies the geometry point value from which the Y co-ordinate value should be retrieved.
Creates a that invokes the canonical 'Elevation' function with the specified argument, which must have an Edm.Geography or Edm.Geometry result type. The result type of the expression is Edm.Double.
A new DbFunctionExpression that returns either the elevation value of spatialValue or null if spatialValue is not a point.
An expression that specifies the spatial point value from which the elevation (Z co-ordinate) value should be retrieved.
Creates a that invokes the canonical 'Measure' function with the specified argument, which must have an Edm.Geography or Edm.Geometry result type. The result type of the expression is Edm.Double.
A new DbFunctionExpression that returns either the Measure of spatialValue or null if spatialValue is not a point.
An expression that specifies the spatial point value from which the Measure (M) co-ordinate value should be retrieved.
Creates a that invokes the canonical 'Latitude' function with the specified argument, which must have an Edm.Geography result type. The result type of the expression is Edm.Double.
A new DbFunctionExpression that returns either the Latitude value of geographyValue or null if geographyValue is not a point.
An expression that specifies the geography point value from which the Latitude value should be retrieved.
Creates a that invokes the canonical 'Longitude' function with the specified argument, which must have an Edm.Geography result type. The result type of the expression is Edm.Double.
A new DbFunctionExpression that returns either the Longitude value of geographyValue or null if geographyValue is not a point.
An expression that specifies the geography point value from which the Longitude value should be retrieved.
Creates a that invokes the canonical 'SpatialLength' function with the specified argument, which must have an Edm.Geography or Edm.Geometry result type. The result type of the expression is Edm.Double.
A new DbFunctionExpression that returns either the length of spatialValue or null if spatialValue is not a curve.
An expression that specifies the spatial curve value from which the length should be retrieved.
Creates a that invokes the canonical 'StartPoint' function with the specified argument, which must have an Edm.Geography or Edm.Geometry result type. The result type is the same as that of spatialValue.
A new DbFunctionExpression that returns either the start point of spatialValue or null if spatialValue is not a curve.
An expression that specifies the spatial curve value from which the start point should be retrieved.
Creates a that invokes the canonical 'EndPoint' function with the specified argument, which must have an Edm.Geography or Edm.Geometry result type. The result type is the same as that of spatialValue.
A new DbFunctionExpression that returns either the end point of spatialValue or null if spatialValue is not a curve.
An expression that specifies the spatial curve value from which the end point should be retrieved.
Creates a that invokes the canonical 'IsClosedSpatial' function with the specified argument, which must have an Edm.Geography or Edm.Geometry result type. The result type is Edm.Boolean.
A new DbFunctionExpression that returns either a Boolean value indicating whether spatialValue is closed, or null if spatialValue is not a curve.
An expression that specifies the spatial curve value from which the IsClosedSpatial value should be retrieved.
Creates a that invokes the canonical 'IsRing' function with the specified argument, which must have an Edm.Geometry result type. The result type is Edm.Boolean.
A new DbFunctionExpression that returns either a Boolean value indicating whether geometryValue is a ring (both closed and simple), or null if geometryValue is not a curve.
An expression that specifies the geometry curve value from which the IsRing value should be retrieved.
Creates a that invokes the canonical 'PointCount' function with the specified argument, which must have an Edm.Geography or Edm.Geometry result type. The result type of the expression is Edm.Int32.
A new DbFunctionExpression that returns either the number of points in spatialValue or null if spatialValue is not a line string.
An expression that specifies the spatial line string value from which the number of points should be retrieved.
Creates a that invokes the canonical 'PointAt' function with the specified arguments. The first argument must have an Edm.Geography or Edm.Geometry result type. The second argument must have an integer numeric result type. The result type of the expression is the same as that of spatialValue.
A new DbFunctionExpression that returns either the point at position indexValue in spatialValue or null if spatialValue is not a line string.
An expression that specifies the spatial line string value.
An expression that specifies the position of the point to be retrieved from within the line string.
Creates a that invokes the canonical 'Area' function with the specified argument, which must have an Edm.Geography or Edm.Geometry result type. The result type of the expression is Edm.Double.
A new DbFunctionExpression that returns either the area of spatialValue or null if spatialValue is not a surface.
An expression that specifies the spatial surface value for which the area should be calculated.
Creates a that invokes the canonical 'Centroid' function with the specified argument, which must have an Edm.Geometry result type. The result type of the expression is Edm.Geometry.
A new DbFunctionExpression that returns either the centroid point of geometryValue (which may not be on the surface itself) or null if geometryValue is not a surface.
An expression that specifies the geometry surface value from which the centroid should be retrieved.
Creates a that invokes the canonical 'PointOnSurface' function with the specified argument, which must have an Edm.Geometry result type. The result type of the expression is Edm.Geometry.
A new DbFunctionExpression that returns either a point guaranteed to be on the surface geometryValue or null if geometryValue is not a surface.
An expression that specifies the geometry surface value from which the point should be retrieved.
Creates a that invokes the canonical 'ExteriorRing' function with the specified argument, which must have an Edm.Geometry result type. The result type of the expression is Edm.Geometry.
A new DbFunctionExpression that returns either the exterior ring of the polygon geometryValue or null if geometryValue is not a polygon.
The geometry value.
Creates a that invokes the canonical 'InteriorRingCount' function with the specified argument, which must have an Edm.Geometry result type. The result type of the expression is Edm.Int32.
A new DbFunctionExpression that returns either the number of interior rings in the polygon geometryValue or null if geometryValue is not a polygon.
The geometry value.
Creates a that invokes the canonical 'InteriorRingAt' function with the specified arguments. The first argument must have an Edm.Geometry result type. The second argument must have an integer numeric result types. The result type of the expression is Edm.Geometry.
A new DbFunctionExpression that returns either the interior ring at position indexValue in geometryValue or null if geometryValue is not a polygon.
The geometry value.
An expression that specifies the position of the interior ring to be retrieved from within the polygon.
Ensures that all metadata in a given expression tree is from the specified metadata workspace,
potentially rebinding and rebuilding the expressions to appropriate replacement metadata where necessary.
Initializes a new instance of the class.
The target workspace.
Implements the visitor pattern for the entity set.
The implemented visitor pattern.
The entity set.
Implements the visitor pattern for the function.
The implemented visitor pattern.
The function metadata.
Implements the visitor pattern for the type.
The implemented visitor pattern.
The type.
Implements the visitor pattern for the type usage.
The implemented visitor pattern.
The type.
Implements the visitor pattern for retrieving an instance property.
The implemented visitor.
The expression.
Enacapsulates the logic that defines an expression 'rule' which is capable of transforming a candidate
into a result DbExpression, and indicating what action should be taken on that result expression by the rule application logic.
Indicates whether should be called on the specified argument expression.
The that the rule should inspect and determine if processing is possible
true if the rule can attempt processing of the expression via the method; otherwise false
Attempts to process the input to produce a
.
The input expression that the rule should process
The result expression produced by the rule if processing was successful
true if the rule was able to successfully process the input expression and produce a result expression; otherwise false
Indicates what action - as a value - the rule processor should take if
returns true.
Indicates what action the rule processor should take if the rule successfully processes an expression.
Continue to apply rules, from the rule immediately following this rule, to the result expression
Going back to the first rule, apply all rules to the result expression
Stop all rule processing and return the result expression as the final result expression
Abstract base class for a DbExpression visitor that can apply a collection of s during the visitor pass, returning the final result expression.
This class encapsulates the rule application logic that applies regardless of how the ruleset - modelled as the abstract
method - is provided.
Represents a boolean expression that tests whether a specified item matches any element in a list.
The visitor pattern method for expression visitors that do not produce a result value.
An instance of DbExpressionVisitor.
is null
The visitor pattern method for expression visitors that produce a result value of a specific type.
An instance of a typed DbExpressionVisitor that produces a result value of type TResultType.
The type of the result produced by
is null
An instance of .
Gets a DbExpression that specifies the item to be matched.
Gets the list of DbExpression to test for a match.
Writes a description of a given expression, in a format determined by the specific implementation of a derived type
Begins a new Dump block with the specified name
The name of the block
Begins a new Dump block with the specified name and specified attributes
The name of the block
The named attributes of the block. May be null
Ends the Dump block with the specified name.
The caller should not assumer that this name will be verified
against the last name used in a Begin call.
The name of the block
Dumps a DbExpression by visiting it.
The DbExpression to dump
Dumps a DbExpression with the specified block name preceeding and succeeding (decorating) it.
The DbExpression to dump
The decorating block name
Dumps a DbExpressionBinding with the specified decoration
The DbExpressionBinding to dump
The decorating block name
Dumps a DbExpressionBinding including its VariableName and DbExpression
The DbExpressionBinding to dump
Dumps a DbGroupExpressionBinding with the specified decoration
The DbGroupExpressionBinding to dump
The decorating block name
Dumps a DbGroupExpressionBinding including its VariableName, GroupVariableName and DbExpression
The DbGroupExpressionBinding to dump
Dumps each DbExpression in the specified enumerable. The entire output is decorated with the 'pluralName'
block name while each element DbExpression is decorated with the 'singularName' block name.
If the list is empty only the pluralName decoration start/end will appear.
The enumerable list of Expressions to dump
The overall list decoration block name
The decoration block name that will be applied to each element DbExpression
Dumps each Parameter metadata in the specified enumerable. The entire output is decorated with the "Parameters"
block name while each metadata element is decorated with the "Parameter" block name.
If the list is empty only the "Parameters" decoration start/end will appear.
The enumerable list of Parameter metadata to dump
Dumps the specified Type metadata instance with the specified decoration
The Type metadata to dump
The decorating block name
Dumps the specified Type metadata instance
The Type metadata to dump
Dumps the specified EDM type metadata instance with the specified decoration
The type metadata to dump
The decorating block name
Dumps the specified type metadata instance
The type metadata to dump
Dumps the specified Relation metadata instance with the specified decoration
The Relation metadata to dump
The decorating block name
Dumps the specified Relation metadata instance
The Relation metadata to dump
Dumps the specified EdmFunction metadata instance
The EdmFunction metadata to dump.
Dumps the specified EdmProperty metadata instance
The EdmProperty metadata to dump
Dumps the specified Relation End EdmMember metadata instance with the specified decoration
The Relation End metadata to dump
The decorating block name
Dumps the specified Navigation Property EdmMember metadata instance with the specified decoration
The Navigation Property metadata to dump
The decorating block name
Dumps the specified DbLambda instance
The DbLambda to dump.
Generates a key for a command tree.
Prints a command tree
Generates a formatted string from a hierarchy of tree nodes. Derived types may override
the PreProcess, Before/AfterAppend, Print, PrintNode and PrintChildren methods to add
specific functionality at particular points in process of building the string.
Entry point method for the TreePrinter
The TreeNode instance that is the root of the tree to be printed
A string representation of the specified tree
Called once on the root of the tree before printing begins
The TreeNode that is the root of the tree
Called once for every node after indentation, connecting lines and the node's text value
have been added to the output but before the line suffix (if any) has been added.
The current node
The StringBuilder into which the tree is being printed
Called once for every node immediately after the line prefix (if any) and appropriate
indentation and connecting lines have been added to the output but before the node's
text value has been added.
The current node
The StringBuilder into which the tree is being printed
The recursive step of the printing process, called once for each TreeNode in the tree
The StringBuilder into which the tree is being printed
The current node that should be printed to the StringBuilder
Called to recursively visit the child nodes of the current TreeNode.
The StringBuilder into which the tree is being printed
The current node
PatternMatchRule is a specialization of that uses a Func<DbExpression, bool> 'pattern'
to implement and a Func<DbExpression, DbExpression> 'processor' to implement
. The 'processor' should return null to indicate that the expression was not
successfully processed, otherwise it should return the new result expression.
Constructs a new PatternMatch rule with the specified pattern, processor and default
of
Constructs a new PatternMatchRule with the specified pattern, processor and
PatternMatchRuleProcessor is a specialization of that uses a collection of
s
as its ruleset. The static Create methods can be used to construct a new PatternMatchRuleProcessor that applies the specified PatternMatchRules, which is
returned as a Func<DbExpression, DbExpression> that can be invoked directly on an expression to apply the ruleset to it.
Provides a means of constructing Func<DbExpression, bool> 'patterns' for use with
s.
Constructs a new pattern that is matched iff both and are matched. Does NOT return a pattern that matches
. Use with an argument of to match an AND expression
Constructs a new pattern that is matched iff all of , and
are matched. Does NOT return a pattern that matches . Use
with an argument of to match an AND expression
Constructs a new pattern that is matched if either or are matched. Does NOT return a pattern that matches
. Use with an argument of to match an OR expression
Constructs a new pattern that is matched if either , or
are matched. Does NOT return a pattern that matches . Use
with an argument of to match an OR expression
Constructs a new pattern that will match an expression with the specified .
Constructs a new pattern that will match iff the specified pattern argument is matched for all expressions in the collection argument.
Returns a pattern that is matched if the argument expression is a
Constructs a new pattern that is matched iff the argument expression is a with input and predicate subexpressions that match the corresponding
and patterns
Constructs a new pattern that is matched iff the argument expression is a with input and projection subexpressions that match the corresponding
and patterns
Constructs a new pattern that is matched iff the argument expression is a with 'when' and 'then' subexpression lists that match the specified
and collection patterns and an 'else' subexpression that matches the specified
expression pattern
Gets a pattern that is matched if the argument expression is a . This property can be used instead of repeated calls to
with an argument of
Constructs a new pattern that is matched iff the argument expression is a with arguments that match the specified collection pattern
Returns a pattern that will match any expression, returning true for any argument, including null.
Returns a pattern that will match any collection of expressions, returning true for any argument, including a null or empty enumerable.
Returns a pattern that is matched if the argument has a complex result type
Returns a pattern that is matched if the argument has an entity result type
Returns a pattern that is matched if the argument has a row result type
Utility class that walks a mapping view and returns a simplified expression with projection
nodes collapsed. Specifically recognizes the following common pattern in mapping views:
outerProject(outerBinding(innerProject(innerBinding, innerNew)), outerProjection)
Recognizes simple disciminator patterns of the form:
select
case when Disc = value1 then value Type1(...)
case when Disc = value2 then value Type2(...)
...
Recognizes redundant case statement of the form:
select
case when (case when Predicate1 then true else false) ...
Matches the nested TPH discriminator pattern produced by view generation
Converts the DbExpression equivalent of:
SELECT CASE
WHEN a._from0 THEN SUBTYPE1()
...
WHEN a._from[n-2] THEN SUBTYPE_n-1()
ELSE SUBTYPE_n
FROM
SELECT
b.C1..., b.Cn
CASE WHEN b.Discriminator = SUBTYPE1_Value THEN true ELSE false AS _from0
...
CASE WHEN b.Discriminator = SUBTYPE_n_Value THEN true ELSE false AS _from[n-1]
FROM TSet AS b
WHERE b.Discriminator = SUBTYPE1_Value... OR x.Discriminator = SUBTYPE_n_Value
AS a
WHERE a._from0... OR a._from[n-1]
into the DbExpression equivalent of the following, which is matched as a TPH discriminator
by the class and so allows a
to be produced for the view, which would not otherwise be possible. Note that C1 through Cn
are only allowed to be scalars or complex type constructors based on direct property references
to the store entity set's scalar properties.
SELECT CASE
WHEN y.Discriminator = SUBTTYPE1_Value THEN SUBTYPE1()
...
WHEN y.Discriminator = SUBTYPE_n-1_Value THEN SUBTYPE_n-1()
ELSE SUBTYPE_n()
FROM
SELECT x.C1..., x.Cn, Discriminator FROM TSet AS x
WHERE x.Discriminator = SUBTYPE1_Value... OR x.Discriminator = SUBTYPE_n_Value
AS y
Matches any Case expression
Determines if an expression is of the form outerProject(outerProjection(innerProject(innerNew)))
Collapses outerProject(outerProjection(innerProject(innerNew)))
This expression visitor supports collapsing a nested projection matching the pattern described above.
For instance:
select T.a as x, T.b as y, true as z from (select E.a as x, E.b as y from Extent E)
resolves to:
select E.a, E.b, true as z from Extent E
In general,
outerProject(
outerBinding(
innerProject(innerBinding, innerNew)
),
outerNew)
resolves to:
replacementOuterProject(
innerBinding,
replacementOuterNew)
The outer projection is bound to the inner input source (outerBinding -> innerBinding) and
the outer new instance expression has its properties remapped to the inner new instance
expression member expressions.
This replacer is used to simplify argument value in a new instance expression OuterNew
from an expression of the form:
outerProject(outerBinding(innerProject(innerBinding, innerNew)), outerProjection)
The replacer collapses the outer project terms to point at the innerNew expression.
Where possible, VarRef_outer.Property_outer is collapsed to VarRef_inner.Property.
Heuristic check to make sure the var ref is the one we're supposed to be replacing.
Returns a value indicating that the transformation has failed.
An implementation of ExpressionDumper that produces an XML string.
Represents the retrieval of the key value of the specified Reference as a row.
Implements the visitor pattern for expressions that do not produce a result value.
An instance of .
visitor is null.
Implements the visitor pattern for expressions that produce a result value of a specific type.
A result value of a specific type produced by
.
An instance of a typed that produces a result value of a specific type.
The type of the result produced by visitor .
visitor is null.
Represents the set union (without duplicate removal) operation between the left and right operands.
DbUnionAllExpression requires that its arguments have a common collection result type
Implements the visitor pattern for expressions that do not produce a result value.
An instance of .
visitor is null.
Implements the visitor pattern for expressions that produce a result value of a specific type.
A result value of a specific type produced by
.
An instance of a typed that produces a result value of a specific type.
The type of the result produced by visitor .
visitor is null.
Represents a 'scan' of all elements of a given entity set.
Implements the visitor pattern for expressions that do not produce a result value.
An instance of .
visitor is null.
Implements the visitor pattern for expressions that produce a result value of a specific type.
A result value of a specific type produced by
.
An instance of a typed that produces a result value of a specific type.
The type of the result produced by visitor .
visitor is null.
Gets the metadata for the referenced entity or relationship set.
The metadata for the referenced entity or relationship set.
Extension methods for .
Gets the conceptual model from the specified DbModel.
An instance of a class that implements IEdmModelAdapter (ex. DbModel).
An instance of EdmModel that represents the conceptual model.
Gets the store model from the specified DbModel.
An instance of a class that implements IEdmModelAdapter (ex. DbModel).
An instance of EdmModel that represents the store model.
An interface to get the underlying store and conceptual model for a .
Gets the conceptual model.
Gets the store model.
Gets a from a string
string containing multiplicity definition
multiplicity value (-1 if there were errors)
true if the string was parsable, false otherwise
Thrown when an error occurs commiting a transaction.
Initializes a new instance of
Initializes a new instance of
The exception message.
Initializes a new instance of
The exception message.
The inner exception.
Initializes a new instance of the class.
The data necessary to serialize or deserialize an object.
Description of the source and destination of the specified serialized stream.
Resolves dependencies from a config file.
This interface is implemented by any object that can resolve a dependency, either directly
or through use of an external container.
The public services currently resolved using IDbDependencyResolver are documented here:
http://msdn.microsoft.com/en-us/data/jj680697
Attempts to resolve a dependency for a given contract type and optionally a given key.
If the resolver cannot resolve the dependency then it must return null and not throw. This
allows resolvers to be used in a Chain of Responsibility pattern such that multiple resolvers
can be asked to resolve a dependency until one finally does.
The interface or abstract base class that defines the dependency to be resolved. The returned object is expected to be an instance of this type.
Optionally, the key of the dependency to be resolved. This may be null for dependencies that are not differentiated by key.
The resolved dependency, which must be an instance of the given contract type, or null if the dependency could not be resolved.
Attempts to resolve a dependencies for a given contract type and optionally a given key.
If the resolver cannot resolve the dependency then it must return an empty enumeration and
not throw. This method differs from in that it returns all registered
services for the given type and key combination.
The interface or abstract base class that defines the dependency to be resolved. Every returned object is expected to be an instance of this type.
Optionally, the key of the dependency to be resolved. This may be null for dependencies that are not differentiated by key.
All services that resolve the dependency, which must be instances of the given contract type, or an empty enumeration if the dependency could not be resolved.
For testing.
This class wraps another such that the resolutions
made by that resolver are cached in a thread-safe manner.
Implements a Composite pattern for such that if the first
resolver can't resolve the dependency then the second resolver will be used.
Event arguments passed to event handlers.
Call this method to add a instance to the Chain of
Responsibility of resolvers that are used to resolve dependencies needed by the Entity Framework.
Resolvers are asked to resolve dependencies in reverse order from which they are added. This means
that a resolver can be added to override resolution of a dependency that would already have been
resolved in a different way.
The only exception to this is that any dependency registered in the application's config file
will always be used in preference to using a dependency resolver added here, unless the
overrideConfigFile is set to true in which case the resolver added here will also override config
file settings.
The resolver to add.
If true, then the resolver added will take precedence over settings in the config file.
Call this method to add a instance to the Chain of Responsibility
of resolvers that are used to resolve dependencies needed by the Entity Framework. Unlike the AddDependencyResolver
method, this method puts the resolver at the bottom of the Chain of Responsibility such that it will only
be used to resolve a dependency that could not be resolved by any of the other resolvers.
The resolver to add.
Adds a wrapping resolver to the configuration that is about to be locked. A wrapping
resolver is a resolver that incepts a service would have been returned by the resolver
chain and wraps or replaces it with another service of the same type.
The type of service to wrap or replace.
A delegate that takes the unwrapped service and key and returns the wrapped or replaced service.
Returns a snapshot of the that is about to be locked.
Use the GetService methods on this object to get services that have been registered.
Searches types (usually obtained from an assembly) for different kinds of .
This class is responsible for managing the app-domain instance of the class.
This includes loading from config, discovery from the context assembly and pushing/popping configurations
used by .
An implementation used for resolving
factories.
This class can be used by to aid in the resolving
of factories as a default service for the provider.
The type of execution strategy that is resolved.
Initializes a new instance of
The ADO.NET provider invariant name indicating the type of ADO.NET connection for which this execution strategy will be used.
A string that will be matched against the server name in the connection string. null will match anything.
A function that returns a new instance of an execution strategy.
If the given type is , then this resolver will attempt
to return the service to use, otherwise it will return null. When the given type is
Func{IExecutionStrategy}, then the key is expected to be an .
The service type to resolve.
A key used to make a determination of the service to return.
An , or null.
If the given type is , then this resolver will attempt
to return the service to use, otherwise it will return an empty enumeration. When the given type is
Func{IExecutionStrategy}, then the key is expected to be an .
The service type to resolve.
A key used to make a determination of the service to return.
An , or an empty enumeration.
Extension methods to call the method using
a generic type parameter and/or no name.
Calls passing the generic type of the method and the given
name as arguments.
The contract type to resolve.
The resolver to use.
The key of the dependency to resolve.
The resolved dependency, or null if the resolver could not resolve it.
Calls passing the generic type of the method as
the type argument and null for the name argument.
The contract type to resolve.
The resolver to use.
The resolved dependency, or null if the resolver could not resolve it.
Calls passing the given type argument and using
null for the name argument.
The resolver to use.
The contract type to resolve.
The resolved dependency, or null if the resolver could not resolve it.
Calls passing the generic type of the method and the given
name as arguments.
The contract type to resolve.
The resolver to use.
The key of the dependency to resolve.
All resolved dependencies, or an if no services are resolved.
Calls passing the generic type of the method as
the type argument and null for the name argument.
The contract type to resolve.
The resolver to use.
All resolved dependencies, or an if no services are resolved.
Calls passing the given type argument and using
null for the name argument.
The resolver to use.
The contract type to resolve.
All resolved dependencies, or an if no services are resolved.
This is a helper method that can be used in an implementation
such that an empty list is returned if the returns null
and a list of one element is returned if GetService returns one element.
The resolver.
The contract type to resolve.
The key of the dependency to resolve.
A list of either zero or one elements.
Internal implementation for the DbConfiguration class that uses instance methods to facilitate testing
while allowing use static methods on the public API which require less dotting through.
This method is not thread-safe and should only be used to switch in a different root resolver
before the configuration is locked and set. It is used for pushing a new configuration by
DbContextInfo while maintaining legacy settings (such as database initializers) that are
set on the root resolver.
The Singleton instance of for this app domain. This can be
set at application start before any Entity Framework features have been used and afterwards
should be treated as read-only.
Used for testing.
Because Equals is overridden; not currently used.
Responsible for obtaining Singleton instances.
Chain-of-Responsibility implementation for instances.
When GetService is called each resolver added to the chain is called in turn until one
returns a non-null value. If all resolvers in the chain return null, then GetService
returns null. Resolvers are called in the reverse order to which they are added so that
the most recently added resolvers get a chance to resolve first.
This class is thread-safe.
Adds a new resolver to the top of the chain.
The resolver to add.
Calls GetService on each resolver in the chain in turn and returns the first non-null value
or returns null if all GetService calls return null. Resolvers are called in the reverse order
to which they are added so that the most recently added resolvers get a chance to resolve first.
The type of service to resolve.
An optional key value which may be used to determine the service instance to create.
The resolved service, or null if no resolver in the chain could resolve the service.
Calls GetServices with the given type and key on each resolver in the chain and concatenates all
the results into a single enumeration.
The type of service to resolve.
An optional key value which may be used to determine the service instance to create.
All the resolved services, or an empty enumeration if no resolver in the chain could resolve the service.
Gets the resolvers in the chain in the order that they will be called to
resolve a dependency.
This resolver is always the last resolver in the internal resolver chain and is
responsible for providing the default service for each dependency or throwing an
exception if there is no reasonable default service.
Implements to resolve a dependency such that it always returns
the same instance.
The type that defines the contract for the dependency that will be resolved.
This class is immutable such that instances can be accessed by multiple threads at the same time.
Constructs a new resolver that will return the given instance for the contract type
regardless of the key passed to the Get method.
The instance to return.
Constructs a new resolver that will return the given instance for the contract type
if the given key matches exactly the key passed to the Get method.
The instance to return.
Optionally, the key of the dependency to be resolved. This may be null for dependencies that are not differentiated by key.
Constructs a new resolver that will return the given instance for the contract type
if the given key matches the key passed to the Get method based on the given predicate.
The instance to return.
A predicate that takes the key object and returns true if and only if it matches.
Used for dispatching operations to a such that any
interceptors that are registered on will be notified before and after the
operation executes.
Instances of this class are obtained through the the fluent API.
This class is used internally by Entity Framework when executing commands. It is provided publicly so that
code that runs outside of the core EF assemblies can opt-in to command interception/tracing. This is
typically done by EF providers that are executing commands on behalf of EF.
Sends and
to any
interceptors that are registered on before/after making a
call to .
Note that the result of executing the command is returned by this method. The result is not available
in the interception context passed into this method since the interception context is cloned before
being passed to interceptors.
The command on which the operation will be executed.
Optional information about the context of the call being made.
The result of the operation, which may have been modified by interceptors.
Sends and
to any
interceptors that are registered on before/after making a
call to .
Note that the result of executing the command is returned by this method. The result is not available
in the interception context passed into this method since the interception context is cloned before
being passed to interceptors.
The command on which the operation will be executed.
Optional information about the context of the call being made.
The result of the operation, which may have been modified by interceptors.
Sends and
to any
interceptors that are registered on before/after making a
call to .
Note that the result of executing the command is returned by this method. The result is not available
in the interception context passed into this method since the interception context is cloned before
being passed to interceptors.
The command on which the operation will be executed.
Optional information about the context of the call being made.
The result of the operation, which may have been modified by interceptors.
Sends and
to any
interceptors that are registered on before/after making a
call to .
Note that the result of executing the command is returned by this method. The result is not available
in the interception context passed into this method since the interception context is cloned before
being passed to interceptors.
The command on which the operation will be executed.
Optional information about the context of the call being made.
The cancellation token for the asynchronous operation.
The result of the operation, which may have been modified by interceptors.
Sends and
to any
interceptors that are registered on before/after making a
call to .
Note that the result of executing the command is returned by this method. The result is not available
in the interception context passed into this method since the interception context is cloned before
being passed to interceptors.
The command on which the operation will be executed.
Optional information about the context of the call being made.
The cancellation token for the asynchronous operation.
The result of the operation, which may have been modified by interceptors.
Sends and
to any
interceptors that are registered on before/after making a
call to .
Note that the result of executing the command is returned by this method. The result is not available
in the interception context passed into this method since the interception context is cloned before
being passed to interceptors.
The command on which the operation will be executed.
Optional information about the context of the call being made.
The cancellation token for the asynchronous operation.
The result of the operation, which may have been modified by interceptors.
Gets the of the current instance.
The exact runtime type of the current instance.
Represents contextual information associated with calls into
implementations.
An instance of this class is passed to the dispatch methods of
and does not contain mutable information such as the result of the operation. This mutable information
is obtained from the that is passed to the interceptors.
Instances of this class are publicly immutable. To add contextual information use one of the
With... or As... methods to create a new interception context containing the new information.
Represents contextual information associated with calls into
implementations.
Note that specific types/operations that can be intercepted may use a more specific
interception context derived from this class. For example, if SQL is being executed by
a , then the DbContext will be contained in the
instance that is passed to the methods
of .
Instances of this class are publicly immutable for contextual information. To add
contextual information use one of the With... or As... methods to create a new
interception context containing the new information.
Constructs a new with no state.
Creates a new by copying state from the given
interception context. See
The context from which to copy state.
Creates a new that contains all the contextual information in this
interception context with the addition of the given .
The context to associate.
A new interception context associated with the given context.
Creates a new that contains all the contextual information in this
interception context with the addition of the given .
The context to associate.
A new interception context associated with the given context.
Creates a new that contains all the contextual information in this
interception context the flag set to true.
A new interception context associated with the async flag set.
Call this method when creating a copy of an interception context in order to add new state
to it. Using this method instead of calling the constructor directly ensures virtual dispatch
so that the new type will have the same type (and any specialized state) as the context that
is being cloned.
A new context with all state copied.
Gets the of the current instance.
The exact runtime type of the current instance.
Gets all the instances associated with this interception context.
This list usually contains zero or one items. However, it can contain more than one item if
a single has been used to construct multiple
instances.
Gets all the instances associated with this interception context.
This list usually contains zero or one items. However, it can contain more than one item when
EF has created a new for use in database creation and initialization, or
if a single is used with multiple .
True if the operation is being executed asynchronously, otherwise false.
Constructs a new with no state.
Creates a new by copying state from the given
interception context. Also see
The context from which to copy state.
Creates a new that contains all the contextual information in this
interception context together with the given .
The command behavior to associate.
A new interception context associated with the given command behavior.
Creates a new that contains all the contextual information in this
interception context with the addition of the given .
The context to associate.
A new interception context associated with the given context.
Creates a new that contains all the contextual information in this
interception context with the addition of the given .
The context to associate.
A new interception context associated with the given context.
Creates a new that contains all the contextual information in this
interception context the flag set to true.
A new interception context associated with the async flag set.
The that will be used or has been used to execute the command with a
. This property is only used for
and its async counterparts.
Represents contextual information associated with calls into
implementations including the result of the operation.
Instances of this class are publicly immutable for contextual information. To add
contextual information use one of the With... or As... methods to create a new
interception context containing the new information.
Constructs a new with no state.
Creates a new by copying state from the given
interception context. Also see
The context from which to copy state.
Prevents the operation from being executed if called before the operation has executed.
Thrown if this method is called after the
operation has already executed.
Creates a new that contains all the contextual information in this
interception context together with the flag set to true.
A new interception context associated with the async flag set.
Creates a new that contains all the contextual information in this
interception context together with the given .
The command behavior to associate.
A new interception context associated with the given command behavior.
Creates a new that contains all the contextual information in this
interception context with the addition of the given .
The context to associate.
A new interception context associated with the given context.
Creates a new that contains all the contextual information in this
interception context with the addition of the given .
The context to associate.
A new interception context associated with the given context.
If execution of the operation completes without throwing, then this property will contain
the result of the operation. If the operation was suppressed or did not fail, then this property
will always contain the default value for the generic type.
When an operation operation completes without throwing both this property and the
property are set. However, the property can be set or changed by interceptors,
while this property will always represent the actual result returned by the operation, if any.
If this property is set before the operation has executed, then execution of the operation will
be suppressed and the set result will be returned instead. Otherwise, if the operation succeeds, then
this property will be set to the returned result. In either case, interceptors that run
after the operation can change this property to change the result that will be returned.
When an operation operation completes without throwing both this property and the
property are set. However, this property can be set or changed by interceptors, while the
property will always represent the actual result returned by the
operation, if any.
When true, this flag indicates that that execution of the operation has been suppressed by
one of the interceptors. This can be done before the operation has executed by calling
, by setting an to be thrown, or
by setting the operation result using .
If execution of the operation fails, then this property will contain the exception that was
thrown. If the operation was suppressed or did not fail, then this property will always be
null.
When an operation fails both this property and the property are set
to the exception that was thrown. However, the property can be set or
changed by interceptors, while this property will always represent the original exception
thrown.
If this property is set before the operation has executed, then execution of the operation will
be suppressed and the set exception will be thrown instead. Otherwise, if the operation fails, then
this property will be set to the exception that was thrown. In either case, interceptors that run
after the operation can change this property to change the exception that will be thrown, or set this
property to null to cause no exception to be thrown at all.
When an operation fails both this property and the property are set
to the exception that was thrown. However, the this property can be set or changed by
interceptors, while the property will always represent
the original exception thrown.
Set to the status of the after an async operation has finished. Not used for
synchronous operations.
Base class that implements . This class is a convenience for
use when only one or two methods of the interface actually need to have any implementation.
An object that implements this interface can be registered with to
receive notifications when Entity Framework executes commands.
This is the base interface for all interfaces that provide interception points for various
different types and operations. For example, see .
Interceptors are registered on the class.
This method is called before a call to or
one of its async counterparts is made.
The command being executed.
Contextual information associated with the call.
This method is called after a call to or
one of its async counterparts is made. This method should return the given result.
However, the result used by Entity Framework can be changed by returning a different value.
For async operations this method is not called until after the async task has completed
or failed.
The command being executed.
Contextual information associated with the call.
This method is called before a call to or
one of its async counterparts is made.
The command being executed.
Contextual information associated with the call.
This method is called after a call to or
one of its async counterparts is made. This method should return the given result. However, the
result used by Entity Framework can be changed by returning a different value.
For async operations this method is not called until after the async task has completed
or failed.
The command being executed.
Contextual information associated with the call.
This method is called before a call to or
one of its async counterparts is made.
The command being executed.
Contextual information associated with the call.
This method is called after a call to or
one of its async counterparts is made. This method should return the given result.
However, the result used by Entity Framework can be changed by returning a different value.
For async operations this method is not called until after the async task has completed
or failed.
The command being executed.
Contextual information associated with the call.
This is the default log formatter used when some is set onto the
property. A different formatter can be used by creating a class that inherits from this class and overrides
some or all methods to change behavior.
To set the new formatter create a code-based configuration for EF using and then
set the formatter class to use with .
Note that setting the type of formatter to use with this method does change the way command are
logged when is used. It is still necessary to set a
onto before any commands will be logged.
For more low-level control over logging/interception see and
.
Creates a formatter that will not filter by any and will instead log every command
from any context and also commands that do not originate from a context.
This constructor is not used when a delegate is set on . Instead it can be
used by setting the formatter directly using .
The delegate to which output will be sent.
Creates a formatter that will only log commands the come from the given instance.
This constructor must be called by a class that inherits from this class to override the behavior
of .
The context for which commands should be logged.
The delegate to which output will be sent.
Writes the given string to the underlying write delegate.
The string to write.
This method is called before a call to or
one of its async counterparts is made.
The default implementation calls and starts .
The command being executed.
Contextual information associated with the call.
This method is called after a call to or
one of its async counterparts is made.
The default implementation stops and calls .
The command being executed.
Contextual information associated with the call.
This method is called before a call to or
one of its async counterparts is made.
The default implementation calls and starts .
The command being executed.
Contextual information associated with the call.
This method is called after a call to or
one of its async counterparts is made.
The default implementation stops and calls .
The command being executed.
Contextual information associated with the call.
This method is called before a call to or
one of its async counterparts is made.
The default implementation calls and starts .
The command being executed.
Contextual information associated with the call.
This method is called after a call to or
one of its async counterparts is made.
The default implementation stops and calls .
The command being executed.
Contextual information associated with the call.
Called whenever a command is about to be executed. The default implementation of this method
filters by set into , if any, and then calls
. This method would typically only be overridden to change the
context filtering behavior.
The command that will be executed.
Contextual information associated with the command.
Called whenever a command has completed executing. The default implementation of this method
filters by set into , if any, and then calls
. This method would typically only be overridden to change the context
filtering behavior.
The command that was executed.
Contextual information associated with the command.
Called to log a command that is about to be executed. Override this method to change how the
command is logged to .
The command to be logged.
Contextual information associated with the command.
Called by to log each parameter. This method can be called from an overridden
implementation of to log parameters, and/or can be overridden to
change the way that parameters are logged to .
The command being logged.
Contextual information associated with the command.
The parameter to log.
Called to log the result of executing a command. Override this method to change how results are
logged to .
The command being logged.
Contextual information associated with the command.
The context for which commands are being logged, or null if commands from all contexts are
being logged.
The stop watch used to time executions. This stop watch is started at the end of
, , and
methods and is stopped at the beginning of the , ,
and methods. If these methods are overridden and the stop watch is being used
then the overrides should either call the base method or start/stop the watch themselves.
Represents contextual information associated with calls into
implementations.
Instances of this class are publicly immutable for contextual information. To add
contextual information use one of the With... or As... methods to create a new
interception context containing the new information.
Constructs a new with no state.
Creates a new by copying state from the given
interception context. Also see
The context from which to copy state.
Creates a new that contains all the contextual information in this
interception context with the addition of the given .
The context to associate.
A new interception context associated with the given context.
Creates a new that contains all the contextual information in this
interception context with the addition of the given .
The context to associate.
A new interception context associated with the given context.
Creates a new that contains all the contextual information in this
interception context the flag set to true.
A new interception context associated with the async flag set.
The original tree created by Entity Framework. Interceptors can change the
property to changes the tree that will be used, but the
will always be the tree created by Entity Framework.
The command tree that will be used by Entity Framework. This starts as tree contained in the
the property but can be changed by interceptors to change
the tree that will be used by Entity Framework.
This is the registration point for interceptors. Interceptors
receive notifications when EF performs certain operations such as executing commands against
the database. For example, see .
Registers a new to receive notifications. Note that the interceptor
must implement some interface that extends from to be useful.
The interceptor to add.
Removes a registered so that it will no longer receive notifications.
If the given interceptor is not registered, then this is a no-op.
The interceptor to remove.
This is the entry point for dispatching to interceptors. This is usually only used internally by
Entity Framework but it is provided publicly so that other code can make sure that registered
interceptors are called when operations are performed on behalf of EF. For example, EF providers
a may make use of this when executing commands.
Provides access to all dispatchers through the the fluent API.
Gets the of the current instance.
The exact runtime type of the current instance.
Provides methods for dispatching to interceptors for
interception of methods on .
An object that implements this interface can be registered with to
receive notifications when Entity Framework creates command trees.
This method is called after a new has been created.
The tree that is used after interception can be changed by setting
while intercepting.
Command trees are created for both queries and insert/update/delete commands. However, query
command trees are cached by model which means that command tree creation only happens the
first time a query is executed and this notification will only happen at that time
Contextual information associated with the call.
Used for design-time scenarios where the user's code needs to be executed inside
of an isolated, runtime-like .
Instances of this class should be created inside of the guest domain.
Handlers should be created inside of the host domain. To invoke operations,
create instances of the nested classes inside
Initializes a new instance of the class. Do this inside of the guest
domain.
The path for the assembly containing the user's code.
The parameter is not used.
Used to get the assembly-qualified name of the DbProviderServices type for the
specified provider invariant name.
Initializes a new instance of the class. Do this inside of
the guest domain.
The executor used to execute this operation.
An object to handle callbacks during the operation.
The provider's invariant name.
The parameter is not used.
This is a small piece of Remoting magic. It enables us to invoke methods on a
remote object without knowing its actual type. The only restriction is that the
names and shapes of the types and their members must be the same on each side of
the boundary.
Intercepts method invocations on the object represented by the current instance
and forwards them to the target to finish processing.
Base handler type. Handlers aren't required to use this exact type. Only the
namespace, name, and member signatures need to be the same. This also applies to
handler contracts types
Indicates whether the specified contract is implemented by this handler.
The full name of the contract interface.
True if the contract is implemented, otherwise false.
A contract handlers can use to accept a single result.
Sets the result.
The result.
Wraps a handler. If the handler does not implement a contract, calling its
operations will result in a no-op.
Represents a mapping view.
Creates a instance having the specified entity SQL.
A string that specifies the entity SQL.
Gets the entity SQL.
Base abstract class for mapping view cache implementations.
Derived classes must have a parameterless constructor if used with .
Gets a view corresponding to the specified extent.
An that specifies the extent.
A that specifies the mapping view,
or null if the extent is not associated with a mapping view.
Gets a hash value computed over the mapping closure.
Specifies the means to create concrete instances.
Creates a generated view cache instance for the container mapping specified by
the names of the mapped containers.
The name of a container in the conceptual model.
The name of a container in the store model.
A that specifies the generated view cache.
Creates a concrete corresponding to the specified container mapping.
A mapping between a container in the conceptual model and a container in
the store model.
A concrete , or null if a creator was not found.
Defines a custom attribute that specifies the mapping view cache type (subclass of )
associated with a context type (subclass of or ).
The cache type is instantiated at runtime and used to retrieve pre-generated views in the
corresponding context.
Creates a instance that associates a context type
with a mapping view cache type.
A subclass of or .
A subclass of .
Creates a instance that associates a context type
with a mapping view cache type.
A subclass of or .
The assembly qualified full name of the cache type.
Gets the context type that is associated with the mapping view cache type.
Gets the type that implements the mapping view cache.
Provides a default DbMappingViewCacheFactory implementation that uses the cache type
specified by a DbMappingViewCacheTypeAttribute to create a concrete DbMappingViewCache.
The implementation assumes that the model has a single container mapping.
Creates a new DefaultDbMappingViewCacheFactory instance.
A DbMappingViewCacheTypeAttribute
that specifies the cache type.
Creates a generated view cache instance for the single container mapping in the model
by instantiating the type specified by the associated DbMappingViewCacheTypeAttribute.
The name of a container in the conceptual model.
The name of a container in the store model.
A DbMappingViewCache that specifies the generated view cache.
Specifies a hash function for the current type. Two different instances associated
with the same DbMappingViewCacheTypeAttribute have the same hash code.
A hash code for the current object.
Determines whether the specified object is equal to the current object.
An object to compare with the current object.
true if the specified object is an instance of DefaultDbMappingViewCacheFactory
and the associated DbMappingViewCacheTypeAttribute is the same, false otherwise.
Helper class that is used to configure a parameter.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
Creates a new parameter definition to pass Binary data.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
The maximum allowable length of the array data.
Value indicating whether or not all data should be padded to the maximum length.
Constant value to use as the default value for this parameter.
SQL expression used as the default value for this parameter.
The name of the parameter.
Provider specific data type to use for this parameter.
The newly constructed parameter definition.
Creates a new parameter definition to pass Boolean data.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
Constant value to use as the default value for this parameter.
SQL expression used as the default value for this parameter.
The name of the parameter.
Provider specific data type to use for this parameter.
The newly constructed parameter definition.
Creates a new parameter definition to pass Byte data.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
Constant value to use as the default value for this parameter.
SQL expression used as the default value for this parameter.
The name of the parameter.
Provider specific data type to use for this parameter.
The newly constructed parameter definition.
Creates a new parameter definition to pass DateTime data.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
The precision of the parameter.
Constant value to use as the default value for this parameter.
SQL expression used as the default value for this parameter.
The name of the parameter.
Provider specific data type to use for this parameter.
The newly constructed parameter definition.
Creates a new parameter definition to pass Decimal data.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
The numeric precision of the parameter.
The numeric scale of the parameter.
Constant value to use as the default value for this parameter.
SQL expression used as the default value for this parameter.
The name of the parameter.
Provider specific data type to use for this parameter.
The newly constructed parameter definition.
Creates a new parameter definition to pass Double data.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
Constant value to use as the default value for this parameter.
SQL expression used as the default value for this parameter.
The name of the parameter.
Provider specific data type to use for this parameter.
The newly constructed parameter definition.
Creates a new parameter definition to pass GUID data.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
Constant value to use as the default value for this parameter.
SQL expression used as the default value for this parameter.
The name of the parameter.
Provider specific data type to use for this parameter.
The newly constructed parameter definition.
Creates a new parameter definition to pass Single data.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
Constant value to use as the default value for this parameter.
SQL expression used as the default value for this parameter.
The name of the parameter.
Provider specific data type to use for this parameter.
The newly constructed parameter definition.
Creates a new parameter definition to pass Short data.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
Constant value to use as the default value for this parameter.
SQL expression used as the default value for this parameter.
The name of the parameter.
Provider specific data type to use for this parameter.
The newly constructed parameter definition.
Creates a new parameter definition to pass Integer data.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
Constant value to use as the default value for this parameter.
SQL expression used as the default value for this parameter.
The name of the parameter.
Provider specific data type to use for this parameter.
The newly constructed parameter definition.
Creates a new parameter definition to pass Long data.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
Constant value to use as the default value for this parameter.
SQL expression used as the default value for this parameter.
The name of the parameter.
Provider specific data type to use for this parameter.
The newly constructed parameter definition.
Creates a new parameter definition to pass String data.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
The maximum allowable length of the string data.
Value indicating whether or not all data should be padded to the maximum length.
Value indicating whether or not the parameter supports Unicode content.
Constant value to use as the default value for this parameter.
SQL expression used as the default value for this parameter.
The name of the parameter.
Provider specific data type to use for this parameter.
The newly constructed parameter definition.
Creates a new parameter definition to pass Time data.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
The precision of the parameter.
Constant value to use as the default value for this parameter.
SQL expression used as the default value for this parameter.
The name of the parameter.
Provider specific data type to use for this parameter.
The newly constructed parameter definition.
Creates a new parameter definition to pass DateTimeOffset data.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
The precision of the parameter.
Constant value to use as the default value for this parameter.
SQL expression used as the default value for this parameter.
The name of the parameter.
Provider specific data type to use for this parameter.
The newly constructed parameter definition.
Creates a new parameter definition to pass geography data.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
Constant value to use as the default value for this parameter.
SQL expression used as the default value for this parameter.
The name of the parameter.
Provider specific data type to use for this parameter.
The newly constructed parameter definition.
Creates a new parameter definition to pass geometry data.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
Constant value to use as the default value for this parameter.
SQL expression used as the default value for this parameter.
The name of the parameter.
Provider specific data type to use for this parameter.
The newly constructed parameter definition.
Gets the of the current instance.
The exact runtime type of the current instance.
Creates a shallow copy of the current .
A shallow copy of the current .
Represents altering an existing stored procedure.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
A migration operation that affects stored procedures.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
Represents an operation to modify a database schema.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
Initializes a new instance of the MigrationOperation class.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
Use anonymous type syntax to specify arguments e.g. 'new { SampleArgument = "MyValue"
}'.
Gets additional arguments that may be processed by providers.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
Gets an operation that will revert this operation.
Gets a value indicating if this operation may result in data loss.
Initializes a new instance of the class.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
The name of the stored procedure.
The body of the stored procedure expressed in SQL.
Use anonymous type syntax to specify arguments e.g. 'new { SampleArgument = "MyValue" }'.
Gets the name of the stored procedure.
The name of the stored procedure.
Gets the body of the stored procedure expressed in SQL.
The body of the stored procedure expressed in SQL.
Gets the parameters of the stored procedure.
The parameters of the stored procedure.
Gets a value indicating if this operation may result in data loss. Always returns false.
Initializes a new instance of the class.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
The name of the stored procedure.
The body of the stored procedure expressed in SQL.
Use anonymous type syntax to specify arguments e.g. 'new { SampleArgument = "MyValue" }'.
Gets an operation that will revert this operation.
Always returns a .
Used when scripting an update database operation to store the operations that would have been performed against the database.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
Initializes a new instance of the class.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
The queries used to determine if this migration needs to be applied to the database.
This is used to generate an idempotent SQL script that can be run against a database at any version.
Adds a migration to this update database operation.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
The id of the migration.
The individual operations applied by the migration.
The queries used to determine if this migration needs to be applied to the database.
This is used to generate an idempotent SQL script that can be run against a database at any version.
Gets the migrations applied during the update database operation.
The migrations applied during the update database operation.
Gets a value indicating if any of the operations may result in data loss.
Represents a migration to be applied to the database.
Gets the id of the migration.
The id of the migration.
Gets the individual operations applied by this migration.
The individual operations applied by this migration.
Represents moving a stored procedure to a new schema in the database.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
Initializes a new instance of the class.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
The name of the stored procedure to move.
The new schema for the stored procedure.
Use anonymous type syntax to specify arguments e.g. 'new { SampleArgument = "MyValue" }'.
Gets the name of the stored procedure to move.
The name of the stored procedure to move.
Gets the new schema for the stored procedure.
The new schema for the stored procedure.
Gets an operation that will revert this operation.
Gets a value indicating if this operation may result in data loss. Always returns false.
Represents renaming a stored procedure in the database.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
Initializes a new instance of the class.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
The name of the stored procedure to rename.
The new name for the stored procedure.
Use anonymous type syntax to specify arguments e.g. 'new { SampleArgument = "MyValue" }'.
Gets the name of the stored procedure to rename.
The name of the stored procedure to rename.
Gets the new name for the stored procedure.
The new name for the stored procedure.
Gets an operation that will revert this operation.
Gets a value indicating if this operation may result in data loss. Always returns false.
Represents a migration operation that can not be performed, possibly because it is not supported by the targeted database provider.
Gets a value indicating if this operation may result in data loss. Always returns false.
Represents information about a parameter.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
Represents information about a property of an entity.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
Initializes a new instance of the PropertyModel class.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
The data type for this property model.
Additional details about the data type. This includes details such as maximum length, nullability etc.
Gets the data type for this property model.
Gets additional details about the data type of this property model.
This includes details such as maximum length, nullability etc.
Gets or sets the name of the property model.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
Gets or sets a provider specific data type to use for this property model.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
Gets or sets the maximum length for this property model.
Only valid for array data types.
Gets or sets the precision for this property model.
Only valid for decimal data types.
Gets or sets the scale for this property model.
Only valid for decimal data types.
Gets or sets a constant value to use as the default value for this property model.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
Gets or sets a SQL expression used as the default value for this property model.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
Gets or sets a value indicating if this property model is fixed length.
Only valid for array data types.
Gets or sets a value indicating if this property model supports Unicode characters.
Only valid for textual data types.
Initializes a new instance of the ParameterModel class.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
The data type for this parameter.
Initializes a new instance of the ParameterModel class.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
The data type for this parameter.
Additional details about the data type. This includes details such as maximum length, nullability etc.
Gets or sets a value indicating whether this instance is out parameter.
true if this instance is out parameter; otherwise, false.
Drops a stored procedure from the database.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
Initializes a new instance of the class.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
The name of the stored procedure to drop.
Use anonymous type syntax to specify arguments e.g. 'new { SampleArgument = "MyValue" }'.
Gets the name of the stored procedure to drop.
The name of the stored procedure to drop.
Gets an operation that will revert this operation.
Always returns a .
Gets a value indicating if this operation may result in data loss. Always returns false.
Used to create a convention that configures navigation properties.
Configures the constraint associated with the navigation property.
The type of constraint configuration.
for
foreign key constraints and
for independent constraints.
Configures the constraint associated with the navigation property.
Constraint configuration to be applied.
The type of constraint configuration.
for
foreign key constraints and
for independent constraints.
Sets the inverse navigation property.
Sets the inverse end multiplicity.
True if the navigation property's declaring type is the principal end, false if it is not
Sets the action to take when a delete operation is attempted.
Sets the multiplicity of this end of the navigation property.
Gets the of the current instance.
The exact runtime type of the current instance.
Gets the for this property.
Allows configuration to be performed for a lightweight convention based on
the entity types in a model.
Filters the entity types that this convention applies to based on a
predicate.
A function to test each entity type for a condition.
An instance so that multiple calls can be chained.
Filters the entity types that this convention applies to based on a predicate
while capturing a value to use later during configuration.
Type of the captured value.
A function to capture a value for each entity type. If the value is null, the
entity type will be filtered out.
An instance so that multiple calls can be chained.
Allows configuration of the entity types that this convention applies to.
An action that performs configuration against a
.
Gets the of the current instance.
The exact runtime type of the current instance.
Allows configuration to be performed for a lightweight convention based on
the entity types in a model that inherit from a common, specified type.
The common type of the entity types that this convention applies to.
Filters the entity types that this convention applies to based on a
predicate.
A function to test each entity type for a condition.
An instance so that multiple calls can be chained.
Filters the entity types that this convention applies to based on a predicate
while capturing a value to use later during configuration.
Type of the captured value.
A function to capture a value for each entity type. If the value is null, the
entity type will be filtered out.
An instance so that multiple calls can be chained.
Allows configuration of the entity types that this convention applies to.
An action that performs configuration against a
.
Gets the of the current instance.
The exact runtime type of the current instance.
Allows configuration to be performed for a lightweight convention based on
the entity types in a model that inherit from a common, specified type and a
captured value.
The common type of the entity types that this convention applies to.
Type of the captured value.
Allows configuration of the entity types that this convention applies to.
An action that performs configuration against a
using a captured value.
Gets the of the current instance.
The exact runtime type of the current instance.
Allows configuration to be performed for a lightweight convention based on
the entity types in a model and a captured value.
Type of the captured value.
Allows configuration of the entity types that this convention applies to.
An action that performs configuration against a
using a captured value.
Gets the of the current instance.
The exact runtime type of the current instance.
Allows configuration to be performed for an entity type in a model.
This configuration functionality is available via lightweight conventions.
Configures the entity set name to be used for this entity type.
The entity set name can only be configured for the base type in each set.
The name of the entity set.
The same instance so that multiple calls can be chained.
Calling this will have no effect once it has been configured.
Excludes this entity type from the model so that it will not be mapped to the database.
Changes this entity type to a complex type.
Excludes a property from the model so that it will not be mapped to the database.
The name of the property to be configured.
Calling this will have no effect if the property does not exist.
Excludes a property from the model so that it will not be mapped to the database.
The property to be configured.
Calling this will have no effect if the property does not exist.
Configures a property that is defined on this type.
The name of the property being configured.
A configuration object that can be used to configure the property.
Configures a property that is defined on this type.
The property being configured.
A configuration object that can be used to configure the property.
Configures a property that is defined on this type as a navigation property.
The name of the property being configured.
A configuration object that can be used to configure the property.
Configures a property that is defined on this type as a navigation property.
The property being configured.
A configuration object that can be used to configure the property.
Configures the primary key property for this entity type.
The name of the property to be used as the primary key.
The same instance so that multiple calls can be chained.
Configures the primary key property for this entity type.
The property to be used as the primary key.
The same instance so that multiple calls can be chained.
Configures the primary key property(s) for this entity type.
The names of the properties to be used as the primary key.
The same instance so that multiple calls can be chained.
Configures the primary key property(s) for this entity type.
The properties to be used as the primary key.
The same instance so that multiple calls can be chained.
Calling this will have no effect once it has been configured or if any
property does not exist.
Configures the table name that this entity type is mapped to.
The name of the table.
Calling this will have no effect once it has been configured.
Configures the table name that this entity type is mapped to.
The name of the table.
The database schema of the table.
Calling this will have no effect once it has been configured.
Configures this type to use stored procedures for insert, update and delete.
The default conventions for procedure and parameter names will be used.
The same configuration instance so that multiple calls can be chained.
Configures this type to use stored procedures for insert, update and delete.
Configuration to override the default conventions for procedure and parameter names.
The same configuration instance so that multiple calls can be chained.
Gets the of the current instance.
The exact runtime type of the current instance.
Gets the of this entity type.
Allows configuration to be performed for an entity type in a model.
This configuration functionality is available via lightweight conventions.
A type inherited by the entity type.
Configures the entity set name to be used for this entity type.
The entity set name can only be configured for the base type in each set.
The name of the entity set.
The same instance so that multiple calls can be chained.
Calling this will have no effect once it has been configured.
Excludes this entity type from the model so that it will not be mapped to the database.
Changes this entity type to a complex type.
Excludes a property from the model so that it will not be mapped to the database.
The type of the property to be ignored.
A lambda expression representing the property to be configured. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty
Configures a property that is defined on this type.
The type of the property being configured.
A lambda expression representing the property to be configured. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty
A configuration object that can be used to configure the property.
Configures a property that is defined on this type as a navigation property.
The type of the property being configured.
A lambda expression representing the property to be configured. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty
A configuration object that can be used to configure the property.
Configures the primary key property(s) for this entity type.
The type of the key.
A lambda expression representing the property to be used as the primary key. C#: t => t.Id VB.Net: Function(t) t.Id If the primary key is made up of multiple properties then specify an anonymous type including the properties. C#: t => new { t.Id1, t.Id2 } VB.Net: Function(t) New With { t.Id1, t.Id2 }
The same instance so that multiple calls can be chained.
Calling this will have no effect once it has been configured.
Configures the table name that this entity type is mapped to.
The name of the table.
Calling this will have no effect once it has been configured.
Configures the table name that this entity type is mapped to.
The name of the table.
The database schema of the table.
Calling this will have no effect once it has been configured.
Configures this type to use stored procedures for insert, update and delete.
The default conventions for procedure and parameter names will be used.
The same configuration instance so that multiple calls can be chained.
Configures this type to use stored procedures for insert, update and delete.
Configuration to override the default conventions for procedure and parameter names.
The same configuration instance so that multiple calls can be chained.
Gets the of the current instance.
The exact runtime type of the current instance.
Gets the of this entity type.
Identifies conventions that can be added to or removed from a instance.
Note that implementations of this interface must be immutable.
Base class for conventions that process CLR attributes found on primitive properties in the model.
The type of the attribute to look for.
A convention that doesn't override configuration.
The derived class can use the default constructor to apply a set rule of that change the model configuration.
For testing
Begins configuration of a lightweight convention that applies to all mapped types in
the model.
A configuration object for the convention.
Begins configuration of a lightweight convention that applies to all mapped types in
the model that derive from or implement the specified type.
The type of the entities that this convention will apply to.
A configuration object for the convention.
This method does not add new types to the model.
Begins configuration of a lightweight convention that applies to all properties
in the model.
A configuration object for the convention.
Begins configuration of a lightweight convention that applies to all primitive
properties of the specified type in the model.
The type of the properties that the convention will apply to.
A configuration object for the convention.
The convention will apply to both nullable and non-nullable properties of the
specified type.
Initializes a new instance of the class.
Applies this convention to a property that has an attribute of type TAttribute applied.
The configuration for the property that has the attribute.
The attribute.
Base class for conventions that process CLR attributes found on properties of types in the model.
Note that the derived convention will be applied for any non-static property on the mapped type that has
the specified attribute, even if it wasn't included in the model.
The type of the attribute to look for.
Initializes a new instance of the class.
Applies this convention to a property that has an attribute of type TAttribute applied.
The member info for the property that has the attribute.
The configuration for the class that contains the property.
The attribute.
Base class for conventions that process CLR attributes found in the model.
The type of the attribute to look for.
Initializes a new instance of the class.
Applies this convention to a class that has an attribute of type TAttribute applied.
The configuration for the class that contains the property.
The attribute.
Used to configure a property in a mapping fragment.
This configuration functionality is available via the Code First Fluent API, see .
Configures the name of the database column used to store the property, in a mapping fragment.
The name of the column.
The same PropertyMappingConfiguration instance so that multiple calls can be chained.
A convention that operates on the conceptual section of the model after the model is created.
The type of metadata item that this convention operates on.
Applies this convention to an item in the model.
The item to apply the convention to.
The model.
A convention that operates on the database section of the model after the model is created.
The type of metadata item that this convention operates on.
Applies this convention to an item in the model.
The item to apply the convention to.
The model.
Extension methods for .
Gets the CLR attributes defined on a set of properties.
The properties to get attributes from.
The attributes.
Sets the CLR attributes on a set of properties.
The properties to set attributes on.
The attributes to be set.
Gets the CLR property info for a set of properties.
The properties to get CLR property info for.
The CLR property info
Sets the CLR property info for a set of properties.
The properties to set CLR property info for.
The property info.
Gets the CLR type for a set of properties.
The properties to get the CLR type for.
The CLR type.
Sets the CLR type for a set of properties.
The properties to set the CLR type for.
The CLR type.
Gets the configuration for a set of properties.
The properties to get the configuration for.
The configuration.
Sets the configuration for a set of properties.
The properties to set the configuration for.
The configuration.
Gets the annotation from a set of properties.
The properties.
The name of the annotation.
The annotation.
Sets an annotation on a set of properties.
The properties.
The name of the annotation.
The value of the annotation.
Removes an annotation from a set of properties.
The properties.
The name of the annotation.
Copies annotations from one set of properties to another.
The source properties.
The target properties.
Useful extension methods for use with Entity Framework LINQ queries.
Specifies the related objects to include in the query results.
This extension method calls the Include(String) method of the source object,
if such a method exists. If the source does not have a matching method,
then this method does nothing. The , ,
and types all have an appropriate Include method to call.
Paths are all-inclusive. For example, if an include call indicates Include("Orders.OrderLines"), not only will
OrderLines be included, but also Orders. When you call the Include method, the query path is only valid on
the returned instance of the . Other instances of
and the object context itself are not affected. Because the Include method returns the query object,
you can call this method multiple times on an to specify multiple paths for the query.
The type of entity being queried.
The source on which to call Include.
The dot-separated list of related objects to return in the query results.
A new with the defined query path.
Specifies the related objects to include in the query results.
This extension method calls the Include(String) method of the source object,
if such a method exists. If the source does not have a matching method,
then this method does nothing. The , ,
and types all have an appropriate Include method to call.
Paths are all-inclusive. For example, if an include call indicates Include("Orders.OrderLines"), not only will
OrderLines be included, but also Orders. When you call the Include method, the query path is only valid on
the returned instance of the . Other instances of
and the object context itself are not affected. Because the Include method returns the query object,
you can call this method multiple times on an to specify multiple paths for the query.
The source on which to call Include.
The dot-separated list of related objects to return in the query results.
A new with the defined query path.
Common code for generic and non-generic string Include.
Specifies the related objects to include in the query results.
The path expression must be composed of simple property access expressions together with calls to Select for
composing additional includes after including a collection proprty. Examples of possible include paths are:
To include a single reference: query.Include(e => e.Level1Reference)
To include a single collection: query.Include(e => e.Level1Collection)
To include a reference and then a reference one level down: query.Include(e => e.Level1Reference.Level2Reference)
To include a reference and then a collection one level down: query.Include(e => e.Level1Reference.Level2Collection)
To include a collection and then a reference one level down: query.Include(e => e.Level1Collection.Select(l1 => l1.Level2Reference))
To include a collection and then a collection one level down: query.Include(e => e.Level1Collection.Select(l1 => l1.Level2Collection))
To include a collection and then a reference one level down: query.Include(e => e.Level1Collection.Select(l1 => l1.Level2Reference))
To include a collection and then a collection one level down: query.Include(e => e.Level1Collection.Select(l1 => l1.Level2Collection))
To include a collection, a reference, and a reference two levels down: query.Include(e => e.Level1Collection.Select(l1 => l1.Level2Reference.Level3Reference))
To include a collection, a collection, and a reference two levels down: query.Include(e => e.Level1Collection.Select(l1 => l1.Level2Collection.Select(l2 => l2.Level3Reference)))
This extension method calls the Include(String) method of the source IQueryable object, if such a method exists.
If the source IQueryable does not have a matching method, then this method does nothing.
The Entity Framework ObjectQuery, ObjectSet, DbQuery, and DbSet types all have an appropriate Include method to call.
When you call the Include method, the query path is only valid on the returned instance of the IQueryable<T>. Other
instances of IQueryable<T> and the object context itself are not affected. Because the Include method returns the
query object, you can call this method multiple times on an IQueryable<T> to specify multiple paths for the query.
The type of entity being queried.
The type of navigation property being included.
The source IQueryable on which to call Include.
A lambda expression representing the path to include.
A new IQueryable<T> with the defined query path.
Returns a new query where the entities returned will not be cached in the
or . This method works by calling the AsNoTracking method of the
underlying query object. If the underlying query object does not have an AsNoTracking method,
then calling this method will have no affect.
The element type.
The source query.
A new query with NoTracking applied, or the source query if NoTracking is not supported.
Returns a new query where the entities returned will not be cached in the
or . This method works by calling the AsNoTracking method of the
underlying query object. If the underlying query object does not have an AsNoTracking method,
then calling this method will have no affect.
The source query.
A new query with NoTracking applied, or the source query if NoTracking is not supported.
Common code for generic and non-generic AsNoTracking.
Returns a new query that will stream the results instead of buffering. This method works by calling
the AsStreaming method of the underlying query object. If the underlying query object does not have
an AsStreaming method, then calling this method will have no affect.
The type of the elements of .
An to apply AsStreaming to.
A new query with AsStreaming applied, or the source query if AsStreaming is not supported.
Returns a new query that will stream the results instead of buffering. This method works by calling
the AsStreaming method of the underlying query object. If the underlying query object does not have
an AsStreaming method, then calling this method will have no affect.
An to apply AsStreaming to.
A new query with AsStreaming applied, or the source query if AsStreaming is not supported.
Enumerates the query such that for server queries such as those of ,
,
, and others the results of the query will be loaded into the associated
,
or other cache on the client.
This is equivalent to calling ToList and then throwing away the list without the overhead of actually creating the list.
The source query.
Asynchronously enumerates the query such that for server queries such as those of ,
,
, and others the results of the query will be loaded into the associated
,
or other cache on the client.
This is equivalent to calling ToList and then throwing away the list without the overhead of actually creating the list.
The source query.
A task that represents the asynchronous operation.
Asynchronously enumerates the query such that for server queries such as those of ,
,
, and others the results of the query will be loaded into the associated
,
or other cache on the client.
This is equivalent to calling ToList and then throwing away the list without the overhead of actually creating the list.
The source query.
A to observe while waiting for the task to complete.
A task that represents the asynchronous operation.
Asynchronously enumerates the query results and performs the specified action on each element.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
An to enumerate.
The action to perform on each element.
A task that represents the asynchronous operation.
Asynchronously enumerates the query results and performs the specified action on each element.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
An to enumerate.
The action to perform on each element.
A to observe while waiting for the task to complete.
A task that represents the asynchronous operation.
Asynchronously enumerates the query results and performs the specified action on each element.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
The type of the elements of .
An to enumerate.
The action to perform on each element.
A task that represents the asynchronous operation.
Asynchronously enumerates the query results and performs the specified action on each element.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
The type of the elements of .
An to enumerate.
The action to perform on each element.
A to observe while waiting for the task to complete.
A task that represents the asynchronous operation.
Creates a from an by enumerating it asynchronously.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
An to create a from.
A task that represents the asynchronous operation.
The task result contains a that contains elements from the input sequence.
Creates a from an by enumerating it asynchronously.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
An to create a from.
A to observe while waiting for the task to complete.
A task that represents the asynchronous operation.
The task result contains a that contains elements from the input sequence.
Creates a from an by enumerating it asynchronously.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
The type of the elements of .
An to create a from.
A task that represents the asynchronous operation.
The task result contains a that contains elements from the input sequence.
Creates a from an by enumerating it asynchronously.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
The type of the elements of .
An to create a list from.
A to observe while waiting for the task to complete.
A task that represents the asynchronous operation.
The task result contains a that contains elements from the input sequence.
Creates an array from an by enumerating it asynchronously.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
The type of the elements of .
An to create an array from.
A task that represents the asynchronous operation.
The task result contains an array that contains elements from the input sequence.
Creates an array from an by enumerating it asynchronously.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
The type of the elements of .
An to create an array from.
A to observe while waiting for the task to complete.
A task that represents the asynchronous operation.
The task result contains an array that contains elements from the input sequence.
Creates a from an by enumerating it asynchronously
according to a specified key selector function.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
The type of the elements of .
The type of the key returned by .
An to create a from.
A function to extract a key from each element.
A task that represents the asynchronous operation.
The task result contains a that contains selected keys and values.
Creates a from an by enumerating it asynchronously
according to a specified key selector function.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
The type of the elements of .
The type of the key returned by .
An to create a from.
A function to extract a key from each element.
A to observe while waiting for the task to complete.
A task that represents the asynchronous operation.
The task result contains a that contains selected keys and values.
Creates a from an by enumerating it asynchronously
according to a specified key selector function and a comparer.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
The type of the elements of .
The type of the key returned by .
An to create a from.
A function to extract a key from each element.
An to compare keys.
A task that represents the asynchronous operation.
The task result contains a that contains selected keys and values.
Creates a from an by enumerating it asynchronously
according to a specified key selector function and a comparer.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
The type of the elements of .
The type of the key returned by .
An to create a from.
A function to extract a key from each element.
An to compare keys.
A to observe while waiting for the task to complete.
A task that represents the asynchronous operation.
The task result contains a that contains selected keys and values.
Creates a from an by enumerating it asynchronously
according to a specified key selector and an element selector function.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
The type of the elements of .
The type of the key returned by .
The type of the value returned by .
An to create a from.
A function to extract a key from each element.
A transform function to produce a result element value from each element.
A task that represents the asynchronous operation.
The task result contains a that contains values of type
selected from the input sequence.
Creates a from an by enumerating it asynchronously
according to a specified key selector and an element selector function.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
The type of the elements of .
The type of the key returned by .
The type of the value returned by .
An to create a from.
A function to extract a key from each element.
A transform function to produce a result element value from each element.
A to observe while waiting for the task to complete.
A task that represents the asynchronous operation.
The task result contains a that contains values of type
selected from the input sequence.
Creates a from an by enumerating it asynchronously
according to a specified key selector function, a comparer, and an element selector function.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
The type of the elements of .
The type of the key returned by .
The type of the value returned by .
An to create a from.
A function to extract a key from each element.
A transform function to produce a result element value from each element.
An to compare keys.
A task that represents the asynchronous operation.
The task result contains a that contains values of type
selected from the input sequence.
Creates a from an by enumerating it asynchronously
according to a specified key selector function, a comparer, and an element selector function.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
The type of the elements of .
The type of the key returned by .
The type of the value returned by .
An to create a from.
A function to extract a key from each element.
A transform function to produce a result element value from each element.
An to compare keys.
A to observe while waiting for the task to complete.
A task that represents the asynchronous operation.
The task result contains a that contains values of type
selected from the input sequence.
Asynchronously returns the first element of a sequence.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
The type of the elements of .
An to return the first element of.
A task that represents the asynchronous operation.
The task result contains the first element in .
is null.
doesn't implement .
The source sequence is empty.
Asynchronously returns the first element of a sequence.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
The type of the elements of .
An to return the first element of.
A to observe while waiting for the task to complete.
A task that represents the asynchronous operation.
The task result contains the first element in .
is
null
.
doesn't implement
.
The source sequence is empty.
Asynchronously returns the first element of a sequence that satisfies a specified condition.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
The type of the elements of .
An to return the first element of.
A function to test each element for a condition.
A task that represents the asynchronous operation.
The task result contains the first element in that passes the test in
.
or
is
null
.
doesn't implement
.
No element satisfies the condition in
.
Asynchronously returns the first element of a sequence that satisfies a specified condition.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
The type of the elements of .
An to return the first element of.
A function to test each element for a condition.
A to observe while waiting for the task to complete.
A task that represents the asynchronous operation.
The task result contains the first element in that passes the test in
.
or
is
null
.
doesn't implement
.
No element satisfies the condition in
.
Asynchronously returns the first element of a sequence, or a default value if the sequence contains no elements.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
The type of the elements of .
An to return the first element of.
A task that represents the asynchronous operation.
The task result contains default ( ) if
is empty; otherwise, the first element in .
is
null
.
doesn't implement
.
Asynchronously returns the first element of a sequence, or a default value if the sequence contains no elements.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
The type of the elements of .
An to return the first element of.
A to observe while waiting for the task to complete.
A task that represents the asynchronous operation.
The task result contains default ( ) if
is empty; otherwise, the first element in .
is
null
.
doesn't implement
.
Asynchronously returns the first element of a sequence that satisfies a specified condition
or a default value if no such element is found.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
The type of the elements of .
An to return the first element of.
A function to test each element for a condition.
A task that represents the asynchronous operation.
The task result contains default ( ) if
is empty or if no element passes the test specified by ; otherwise, the first
element in that passes the test specified by .
or
is
null
.
doesn't implement
.
Asynchronously returns the first element of a sequence that satisfies a specified condition
or a default value if no such element is found.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
The type of the elements of .
An to return the first element of.
A function to test each element for a condition.
A to observe while waiting for the task to complete.
A task that represents the asynchronous operation.
The task result contains default ( ) if
is empty or if no element passes the test specified by ; otherwise, the first
element in that passes the test specified by .
or
is
null
.
doesn't implement
.
has more than one element.
Asynchronously returns the only element of a sequence, and throws an exception
if there is not exactly one element in the sequence.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
The type of the elements of .
An to return the single element of.
A task that represents the asynchronous operation.
The task result contains the single element of the input sequence.
is
null
.
doesn't implement
.
The source sequence is empty.
Asynchronously returns the only element of a sequence, and throws an exception
if there is not exactly one element in the sequence.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
The type of the elements of .
An to return the single element of.
A to observe while waiting for the task to complete.
A task that represents the asynchronous operation.
The task result contains the single element of the input sequence.
is
null
.
doesn't implement
.
has more than one element.
The source sequence is empty.
Asynchronously returns the only element of a sequence that satisfies a specified condition,
and throws an exception if more than one such element exists.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
The type of the elements of .
An to return the the single element of.
A function to test an element for a condition.
A task that represents the asynchronous operation.
The task result contains the single element of the input sequence that satisfies the condition in
.
or
is
null
.
doesn't implement
.
No element satisfies the condition in
.
More than one element satisfies the condition in
.
Asynchronously returns the only element of a sequence that satisfies a specified condition,
and throws an exception if more than one such element exists.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
The type of the elements of .
An to return the single element of.
A function to test an element for a condition.
A to observe while waiting for the task to complete.
A task that represents the asynchronous operation.
The task result contains the single element of the input sequence that satisfies the condition in
.
or
is
null
.
doesn't implement
.
No element satisfies the condition in
.
More than one element satisfies the condition in
.
Asynchronously returns the only element of a sequence, or a default value if the sequence is empty;
this method throws an exception if there is more than one element in the sequence.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
The type of the elements of .
An to return the single element of.
A task that represents the asynchronous operation.
The task result contains the single element of the input sequence, or default ()
if the sequence contains no elements.
is
null
.
doesn't implement
.
has more than one element.
Asynchronously returns the only element of a sequence, or a default value if the sequence is empty;
this method throws an exception if there is more than one element in the sequence.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
The type of the elements of .
An to return the single element of.
A to observe while waiting for the task to complete.
A task that represents the asynchronous operation.
The task result contains the single element of the input sequence, or default ()
if the sequence contains no elements.
is
null
.
doesn't implement
.
has more than one element.
Asynchronously returns the only element of a sequence that satisfies a specified condition or
a default value if no such element exists; this method throws an exception if more than one element
satisfies the condition.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
The type of the elements of .
An to return the single element of.
A function to test an element for a condition.
A task that represents the asynchronous operation.
The task result contains the single element of the input sequence that satisfies the condition in
, or default ( ) if no such element is found.
or
is
null
.
doesn't implement
.
Asynchronously returns the only element of a sequence that satisfies a specified condition or
a default value if no such element exists; this method throws an exception if more than one element
satisfies the condition.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
The type of the elements of .
An to return the single element of.
A function to test an element for a condition.
A to observe while waiting for the task to complete.
A task that represents the asynchronous operation.
The task result contains the single element of the input sequence that satisfies the condition in
, or default ( ) if no such element is found.
or
is
null
.
doesn't implement
.
Asynchronously determines whether a sequence contains a specified element by using the default equality comparer.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
The type of the elements of .
An to return the single element of.
The object to locate in the sequence.
A task that represents the asynchronous operation.
The task result contains true if the input sequence contains the specified value; otherwise, false.
is
null
.
doesn't implement
.
Asynchronously determines whether a sequence contains a specified element by using the default equality comparer.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
The type of the elements of .
An to return the single element of.
The object to locate in the sequence.
A to observe while waiting for the task to complete.
A task that represents the asynchronous operation.
The task result contains true if the input sequence contains the specified value; otherwise, false.
is
null
.
doesn't implement
.
Asynchronously determines whether a sequence contains any elements.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
The type of the elements of .
An to check for being empty.
A task that represents the asynchronous operation.
The task result contains true if the source sequence contains any elements; otherwise, false.
is
null
.
doesn't implement
.
Asynchronously determines whether a sequence contains any elements.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
The type of the elements of .
An to check for being empty.
A to observe while waiting for the task to complete.
A task that represents the asynchronous operation.
The task result contains true if the source sequence contains any elements; otherwise, false.
is
null
.
doesn't implement
.
Asynchronously determines whether any element of a sequence satisfies a condition.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
The type of the elements of .
An whose elements to test for a condition.
A function to test each element for a condition.
A task that represents the asynchronous operation.
The task result contains true if any elements in the source sequence pass the test in the specified predicate; otherwise, false.
or
is
null
.
doesn't implement
.
Asynchronously determines whether any element of a sequence satisfies a condition.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
The type of the elements of .
An whose elements to test for a condition.
A function to test each element for a condition.
A to observe while waiting for the task to complete.
A task that represents the asynchronous operation.
The task result contains true if any elements in the source sequence pass the test in the specified predicate; otherwise, false.
or
is
null
.
doesn't implement
.
Asynchronously determines whether all the elements of a sequence satisfy a condition.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
The type of the elements of .
An whose elements to test for a condition.
A function to test each element for a condition.
A task that represents the asynchronous operation.
The task result contains true if every element of the source sequence passes the test in the specified predicate; otherwise, false.
or
is
null
.
doesn't implement
.
Asynchronously determines whether all the elements of a sequence satisfy a condition.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
The type of the elements of .
An whose elements to test for a condition.
A function to test each element for a condition.
A to observe while waiting for the task to complete.
A task that represents the asynchronous operation.
The task result contains true if every element of the source sequence passes the test in the specified predicate; otherwise, false.
or
is
null
.
doesn't implement
.
Asynchronously returns the number of elements in a sequence.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
The type of the elements of .
An that contains the elements to be counted.
A task that represents the asynchronous operation.
The task result contains the number of elements in the input sequence.
is
null
.
doesn't implement
.
The number of elements in
is larger than
.
Asynchronously returns the number of elements in a sequence.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
The type of the elements of .
An that contains the elements to be counted.
A to observe while waiting for the task to complete.
A task that represents the asynchronous operation.
The task result contains the number of elements in the input sequence.
is
null
.
doesn't implement
.
The number of elements in
is larger than
.
Asynchronously returns the number of elements in a sequence that satisfy a condition.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
The type of the elements of .
An that contains the elements to be counted.
A function to test each element for a condition.
A task that represents the asynchronous operation.
The task result contains the number of elements in the sequence that satisfy the condition in the predicate function.
or
is
null
.
doesn't implement
.
The number of elements in
that satisfy the condition in the predicate function
is larger than
.
Asynchronously returns the number of elements in a sequence that satisfy a condition.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
The type of the elements of .
An that contains the elements to be counted.
A function to test each element for a condition.
A to observe while waiting for the task to complete.
A task that represents the asynchronous operation.
The task result contains the number of elements in the sequence that satisfy the condition in the predicate function.
or
is
null
.
doesn't implement
.
The number of elements in
that satisfy the condition in the predicate function
is larger than
.
Asynchronously returns an that represents the total number of elements in a sequence.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
The type of the elements of .
An that contains the elements to be counted.
A task that represents the asynchronous operation.
The task result contains the number of elements in the input sequence.
is
null
.
doesn't implement
.
The number of elements in
is larger than
.
Asynchronously returns an that represents the total number of elements in a sequence.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
The type of the elements of .
An that contains the elements to be counted.
A to observe while waiting for the task to complete.
A task that represents the asynchronous operation.
The task result contains the number of elements in the input sequence.
is
null
.
doesn't implement
.
The number of elements in
is larger than
.
Asynchronously returns an that represents the number of elements in a sequence
that satisfy a condition.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
The type of the elements of .
An that contains the elements to be counted.
A function to test each element for a condition.
A task that represents the asynchronous operation.
The task result contains the number of elements in the sequence that satisfy the condition in the predicate function.
or
is
null
.
doesn't implement
.
The number of elements in
that satisfy the condition in the predicate function
is larger than
.
Asynchronously returns an that represents the number of elements in a sequence
that satisfy a condition.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
The type of the elements of .
An that contains the elements to be counted.
A function to test each element for a condition.
A to observe while waiting for the task to complete.
A task that represents the asynchronous operation.
The task result contains the number of elements in the sequence that satisfy the condition in the predicate function.
or
is
null
.
doesn't implement
.
The number of elements in
that satisfy the condition in the predicate function
is larger than
.
Asynchronously returns the minimum value of a sequence.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
The type of the elements of .
An that contains the elements to determine the minimum of.
A task that represents the asynchronous operation.
The task result contains the minimum value in the sequence.
is
null
.
doesn't implement
.
Asynchronously returns the minimum value of a sequence.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
The type of the elements of .
An that contains the elements to determine the minimum of.
A to observe while waiting for the task to complete.
A task that represents the asynchronous operation.
The task result contains the minimum value in the sequence.
is
null
.
doesn't implement
.
Asynchronously invokes a projection function on each element of a sequence and returns the minimum resulting value.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
The type of the elements of .
The type of the value returned by the function represented by .
An that contains the elements to determine the minimum of.
A projection function to apply to each element.
A task that represents the asynchronous operation.
The task result contains the minimum value in the sequence.
or
is
null
.
doesn't implement
.
Asynchronously invokes a projection function on each element of a sequence and returns the minimum resulting value.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
The type of the elements of .
The type of the value returned by the function represented by .
An that contains the elements to determine the minimum of.
A projection function to apply to each element.
A to observe while waiting for the task to complete.
A task that represents the asynchronous operation.
The task result contains the minimum value in the sequence.
or
is
null
.
doesn't implement
.
Asynchronously returns the maximum value of a sequence.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
The type of the elements of .
An that contains the elements to determine the maximum of.
A task that represents the asynchronous operation.
The task result contains the maximum value in the sequence.
is
null
.
doesn't implement
.
Asynchronously returns the maximum value of a sequence.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
The type of the elements of .
An that contains the elements to determine the maximum of.
A to observe while waiting for the task to complete.
A task that represents the asynchronous operation.
The task result contains the maximum value in the sequence.
is
null
.
doesn't implement
.
Asynchronously invokes a projection function on each element of a sequence and returns the maximum resulting value.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
The type of the elements of .
The type of the value returned by the function represented by .
An that contains the elements to determine the maximum of.
A projection function to apply to each element.
A task that represents the asynchronous operation.
The task result contains the maximum value in the sequence.
or
is
null
.
doesn't implement
.
Asynchronously invokes a projection function on each element of a sequence and returns the maximum resulting value.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
The type of the elements of .
The type of the value returned by the function represented by .
An that contains the elements to determine the maximum of.
A projection function to apply to each element.
A to observe while waiting for the task to complete.
A task that represents the asynchronous operation.
The task result contains the maximum value in the sequence.
or
is
null
.
doesn't implement
.
Asynchronously computes the sum of a sequence of values.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
A sequence of values to calculate the sum of.
A task that represents the asynchronous operation.
The task result contains the sum of the values in the sequence.
is
null
.
doesn't implement
.
The number of elements in
is larger than
.
Asynchronously computes the sum of a sequence of values.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
A sequence of values to calculate the sum of.
A to observe while waiting for the task to complete.
A task that represents the asynchronous operation.
The task result contains the sum of the values in the sequence.
is
null
.
doesn't implement
.
The number of elements in
is larger than
.
Asynchronously computes the sum of a sequence of nullable values.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
A sequence of nullable values to calculate the sum of.
A task that represents the asynchronous operation.
The task result contains the sum of the values in the sequence.
is
null
.
doesn't implement
.
The number of elements in
is larger than
.
Asynchronously computes the sum of a sequence of nullable values.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
A sequence of nullable values to calculate the sum of.
A to observe while waiting for the task to complete.
A task that represents the asynchronous operation.
The task result contains the sum of the values in the sequence.
is
null
.
doesn't implement
.
The number of elements in
is larger than
.
Asynchronously computes the sum of a sequence of values.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
A sequence of values to calculate the sum of.
A task that represents the asynchronous operation.
The task result contains the sum of the values in the sequence.
is
null
.
doesn't implement
.
The number of elements in
is larger than
.
Asynchronously computes the sum of a sequence of values.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
A sequence of values to calculate the sum of.
A to observe while waiting for the task to complete.
A task that represents the asynchronous operation.
The task result contains the sum of the values in the sequence.
is
null
.
doesn't implement
.
The number of elements in
is larger than
.
Asynchronously computes the sum of a sequence of nullable values.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
A sequence of nullable values to calculate the sum of.
A task that represents the asynchronous operation.
The task result contains the sum of the values in the sequence.
is
null
.
doesn't implement
.
The number of elements in
is larger than
.
Asynchronously computes the sum of a sequence of nullable values.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
A sequence of nullable values to calculate the sum of.
A to observe while waiting for the task to complete.
A task that represents the asynchronous operation.
The task result contains the sum of the values in the sequence.
is
null
.
doesn't implement
.
The number of elements in
is larger than
.
Asynchronously computes the sum of a sequence of values.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
A sequence of values to calculate the sum of.
A task that represents the asynchronous operation.
The task result contains the sum of the values in the sequence.
is
null
.
doesn't implement
.
Asynchronously computes the sum of a sequence of values.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
A sequence of values to calculate the sum of.
A to observe while waiting for the task to complete.
A task that represents the asynchronous operation.
The task result contains the sum of the values in the sequence.
is
null
.
doesn't implement
.
Asynchronously computes the sum of a sequence of nullable values.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
A sequence of nullable values to calculate the sum of.
A task that represents the asynchronous operation.
The task result contains the sum of the values in the sequence.
is
null
.
doesn't implement
.
Asynchronously computes the sum of a sequence of nullable values.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
A sequence of nullable values to calculate the sum of.
A to observe while waiting for the task to complete.
A task that represents the asynchronous operation.
The task result contains the sum of the values in the sequence.
is
null
.
doesn't implement
.
Asynchronously computes the sum of a sequence of values.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
A sequence of values to calculate the sum of.
A task that represents the asynchronous operation.
The task result contains the sum of the values in the sequence.
is
null
.
doesn't implement
.
Asynchronously computes the sum of a sequence of values.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
A sequence of values to calculate the sum of.
A to observe while waiting for the task to complete.
A task that represents the asynchronous operation.
The task result contains the sum of the values in the sequence.
is
null
.
doesn't implement
.
Asynchronously computes the sum of a sequence of nullable values.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
A sequence of nullable values to calculate the sum of.
A task that represents the asynchronous operation.
The task result contains the sum of the values in the sequence.
is
null
.
doesn't implement
.
Asynchronously computes the sum of a sequence of nullable values.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
A sequence of nullable values to calculate the sum of.
A to observe while waiting for the task to complete.
A task that represents the asynchronous operation.
The task result contains the sum of the values in the sequence.
is
null
.
doesn't implement
.
Asynchronously computes the sum of a sequence of values.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
A sequence of values to calculate the sum of.
A task that represents the asynchronous operation.
The task result contains the sum of the values in the sequence.
is
null
.
doesn't implement
.
Asynchronously computes the sum of a sequence of values.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
A sequence of values to calculate the sum of.
A to observe while waiting for the task to complete.
A task that represents the asynchronous operation.
The task result contains the sum of the values in the sequence.
is
null
.
doesn't implement
.
Asynchronously computes the sum of a sequence of nullable values.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
A sequence of nullable values to calculate the sum of.
A task that represents the asynchronous operation.
The task result contains the sum of the values in the sequence.
is
null
.
doesn't implement
.
Asynchronously computes the sum of a sequence of nullable values.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
A sequence of nullable values to calculate the sum of.
A to observe while waiting for the task to complete.
A task that represents the asynchronous operation.
The task result contains the sum of the values in the sequence.
is
null
.
doesn't implement
.
The number of elements in
is larger than
.
Asynchronously computes the sum of the sequence of values that is obtained
by invoking a projection function on each element of the input sequence.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
The type of the elements of .
A sequence of values of type .
A projection function to apply to each element.
A task that represents the asynchronous operation.
The task result contains the sum of the projected values.
or
is
null
.
doesn't implement
.
The number of elements in
is larger than
.
Asynchronously computes the sum of the sequence of values that is obtained
by invoking a projection function on each element of the input sequence.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
The type of the elements of .
A sequence of values of type .
A projection function to apply to each element.
A to observe while waiting for the task to complete.
A task that represents the asynchronous operation.
The task result contains the sum of the projected values.
or
is
null
.
doesn't implement
.
The number of elements in
is larger than
.
Asynchronously computes the sum of the sequence of nullable values that is obtained
by invoking a projection function on each element of the input sequence.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
The type of the elements of .
A sequence of values of type .
A projection function to apply to each element.
A task that represents the asynchronous operation.
The task result contains the sum of the projected values.
or
is
null
.
doesn't implement
.
The number of elements in
is larger than
.
Asynchronously computes the sum of the sequence of nullable values that is obtained
by invoking a projection function on each element of the input sequence.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
The type of the elements of .
A sequence of values of type .
A projection function to apply to each element.
A to observe while waiting for the task to complete.
A task that represents the asynchronous operation.
The task result contains the sum of the projected values.
or
is
null
.
doesn't implement
.
The number of elements in
is larger than
.
Asynchronously computes the sum of the sequence of values that is obtained
by invoking a projection function on each element of the input sequence.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
The type of the elements of .
A sequence of values of type .
A projection function to apply to each element.
A task that represents the asynchronous operation.
The task result contains the sum of the projected values.
or
is
null
.
doesn't implement
.
The number of elements in
is larger than
.
Asynchronously computes the sum of the sequence of values that is obtained
by invoking a projection function on each element of the input sequence.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
The type of the elements of .
A sequence of values of type .
A projection function to apply to each element.
A to observe while waiting for the task to complete.
A task that represents the asynchronous operation.
The task result contains the sum of the projected values.
or
is
null
.
doesn't implement
.
The number of elements in
is larger than
.
Asynchronously computes the sum of the sequence of nullable values that is obtained
by invoking a projection function on each element of the input sequence.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
The type of the elements of .
A sequence of values of type .
A projection function to apply to each element.
A task that represents the asynchronous operation.
The task result contains the sum of the projected values.
or
is
null
.
doesn't implement
.
The number of elements in
is larger than
.
Asynchronously computes the sum of the sequence of nullable values that is obtained
by invoking a projection function on each element of the input sequence.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
The type of the elements of .
A sequence of values of type .
A projection function to apply to each element.
A to observe while waiting for the task to complete.
A task that represents the asynchronous operation.
The task result contains the sum of the projected values.
or
is
null
.
doesn't implement
.
The number of elements in
is larger than
.
Asynchronously computes the sum of the sequence of values that is obtained
by invoking a projection function on each element of the input sequence.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
The type of the elements of .
A sequence of values of type .
A projection function to apply to each element.
A task that represents the asynchronous operation.
The task result contains the sum of the projected values.
or
is
null
.
doesn't implement
.
Asynchronously computes the sum of the sequence of values that is obtained
by invoking a projection function on each element of the input sequence.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
The type of the elements of .
A sequence of values of type .
A projection function to apply to each element.
A to observe while waiting for the task to complete.
A task that represents the asynchronous operation.
The task result contains the sum of the projected values.
or
is
null
.
doesn't implement
.
Asynchronously computes the sum of the sequence of nullable values that is obtained
by invoking a projection function on each element of the input sequence.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
The type of the elements of .
A sequence of values of type .
A projection function to apply to each element.
A task that represents the asynchronous operation.
The task result contains the sum of the projected values.
or
is
null
.
doesn't implement
.
Asynchronously computes the sum of the sequence of nullable values that is obtained
by invoking a projection function on each element of the input sequence.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
The type of the elements of .
A sequence of values of type .
A projection function to apply to each element.
A to observe while waiting for the task to complete.
A task that represents the asynchronous operation.
The task result contains the sum of the projected values.
or
is
null
.
doesn't implement
.
Asynchronously computes the sum of the sequence of values that is obtained
by invoking a projection function on each element of the input sequence.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
The type of the elements of .
A sequence of values of type .
A projection function to apply to each element.
A task that represents the asynchronous operation.
The task result contains the sum of the projected values.
or
is
null
.
doesn't implement
.
Asynchronously computes the sum of the sequence of values that is obtained
by invoking a projection function on each element of the input sequence.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
The type of the elements of .
A sequence of values of type .
A projection function to apply to each element.
A to observe while waiting for the task to complete.
A task that represents the asynchronous operation.
The task result contains the sum of the projected values.
or
is
null
.
doesn't implement
.
Asynchronously computes the sum of the sequence of nullable values that is obtained
by invoking a projection function on each element of the input sequence.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
The type of the elements of .
A sequence of values of type .
A projection function to apply to each element.
A task that represents the asynchronous operation.
The task result contains the sum of the projected values.
or
is
null
.
doesn't implement
.
Asynchronously computes the sum of the sequence of nullable values that is obtained
by invoking a projection function on each element of the input sequence.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
The type of the elements of .
A sequence of values of type .
A projection function to apply to each element.
A to observe while waiting for the task to complete.
A task that represents the asynchronous operation.
The task result contains the sum of the projected values.
or
is
null
.
doesn't implement
.
Asynchronously computes the sum of the sequence of values that is obtained
by invoking a projection function on each element of the input sequence.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
The type of the elements of .
A sequence of values of type .
A projection function to apply to each element.
A task that represents the asynchronous operation.
The task result contains the sum of the projected values.
or
is
null
.
doesn't implement
.
The number of elements in
is larger than
.
Asynchronously computes the sum of the sequence of values that is obtained
by invoking a projection function on each element of the input sequence.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
The type of the elements of .
A sequence of values of type .
A projection function to apply to each element.
A to observe while waiting for the task to complete.
A task that represents the asynchronous operation.
The task result contains the sum of the projected values.
or
is
null
.
doesn't implement
.
The number of elements in
is larger than
.
Asynchronously computes the sum of the sequence of nullable values that is obtained
by invoking a projection function on each element of the input sequence.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
The type of the elements of .
A sequence of values of type .
A projection function to apply to each element.
A task that represents the asynchronous operation.
The task result contains the sum of the projected values.
or
is
null
.
doesn't implement
.
The number of elements in
is larger than
.
Asynchronously computes the sum of the sequence of nullable values that is obtained
by invoking a projection function on each element of the input sequence.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
The type of the elements of .
A sequence of values of type .
A projection function to apply to each element.
A to observe while waiting for the task to complete.
A task that represents the asynchronous operation.
The task result contains the sum of the projected values.
or
is
null
.
doesn't implement
.
The number of elements in
is larger than
.
Asynchronously computes the average of a sequence of values.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
A sequence of values to calculate the average of.
A task that represents the asynchronous operation.
The task result contains the average of the sequence of values.
is
null
.
doesn't implement
.
contains no elements.
Asynchronously computes the average of a sequence of values.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
A sequence of values to calculate the average of.
A to observe while waiting for the task to complete.
A task that represents the asynchronous operation.
The task result contains the average of the sequence of values.
is
null
.
doesn't implement
.
contains no elements.
Asynchronously computes the average of a sequence of nullable values.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
A sequence of nullable values to calculate the average of.
A task that represents the asynchronous operation.
The task result contains the average of the sequence of values.
is
null
.
doesn't implement
.
Asynchronously computes the average of a sequence of nullable values.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
A sequence of nullable values to calculate the average of.
A to observe while waiting for the task to complete.
A task that represents the asynchronous operation.
The task result contains the average of the sequence of values.
is
null
.
doesn't implement
.
Asynchronously computes the average of a sequence of values.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
A sequence of values to calculate the average of.
A task that represents the asynchronous operation.
The task result contains the average of the sequence of values.
is
null
.
doesn't implement
.
contains no elements.
Asynchronously computes the average of a sequence of values.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
A sequence of values to calculate the average of.
A to observe while waiting for the task to complete.
A task that represents the asynchronous operation.
The task result contains the average of the sequence of values.
is
null
.
doesn't implement
.
contains no elements.
Asynchronously computes the average of a sequence of nullable values.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
A sequence of nullable values to calculate the average of.
A task that represents the asynchronous operation.
The task result contains the average of the sequence of values.
is
null
.
doesn't implement
.
Asynchronously computes the average of a sequence of nullable values.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
A sequence of nullable values to calculate the average of.
A to observe while waiting for the task to complete.
A task that represents the asynchronous operation.
The task result contains the average of the sequence of values.
is
null
.
doesn't implement
.
Asynchronously computes the average of a sequence of values.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
A sequence of values to calculate the average of.
A task that represents the asynchronous operation.
The task result contains the average of the sequence of values.
is
null
.
doesn't implement
.
contains no elements.
Asynchronously computes the average of a sequence of values.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
A sequence of values to calculate the average of.
A to observe while waiting for the task to complete.
A task that represents the asynchronous operation.
The task result contains the average of the sequence of values.
is
null
.
doesn't implement
.
contains no elements.
Asynchronously computes the average of a sequence of nullable values.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
A sequence of nullable values to calculate the average of.
A task that represents the asynchronous operation.
The task result contains the average of the sequence of values.
is
null
.
doesn't implement
.
Asynchronously computes the average of a sequence of nullable values.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
A sequence of nullable values to calculate the average of.
A to observe while waiting for the task to complete.
A task that represents the asynchronous operation.
The task result contains the average of the sequence of values.
is
null
.
doesn't implement
.
Asynchronously computes the average of a sequence of values.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
A sequence of values to calculate the average of.
A task that represents the asynchronous operation.
The task result contains the average of the sequence of values.
is
null
.
doesn't implement
.
contains no elements.
Asynchronously computes the average of a sequence of values.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
A sequence of values to calculate the average of.
A to observe while waiting for the task to complete.
A task that represents the asynchronous operation.
The task result contains the average of the sequence of values.
is
null
.
doesn't implement
.
contains no elements.
Asynchronously computes the average of a sequence of nullable values.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
A sequence of nullable values to calculate the average of.
A task that represents the asynchronous operation.
The task result contains the average of the sequence of values.
is
null
.
doesn't implement
.
Asynchronously computes the average of a sequence of nullable values.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
A sequence of nullable values to calculate the average of.
A to observe while waiting for the task to complete.
A task that represents the asynchronous operation.
The task result contains the average of the sequence of values.
is
null
.
doesn't implement
.
Asynchronously computes the average of a sequence of values.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
A sequence of values to calculate the average of.
A task that represents the asynchronous operation.
The task result contains the average of the sequence of values.
is
null
.
doesn't implement
.
contains no elements.
Asynchronously computes the average of a sequence of values.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
A sequence of values to calculate the average of.
A to observe while waiting for the task to complete.
A task that represents the asynchronous operation.
The task result contains the average of the sequence of values.
is
null
.
doesn't implement
.
contains no elements.
Asynchronously computes the average of a sequence of nullable values.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
A sequence of nullable values to calculate the average of.
A task that represents the asynchronous operation.
The task result contains the average of the sequence of values.
is
null
.
doesn't implement
.
Asynchronously computes the average of a sequence of nullable values.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
A sequence of nullable values to calculate the average of.
A to observe while waiting for the task to complete.
A task that represents the asynchronous operation.
The task result contains the average of the sequence of values.
is
null
.
doesn't implement
.
Asynchronously computes the average of a sequence of values that is obtained
by invoking a projection function on each element of the input sequence.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
The type of the elements of .
A sequence of values to calculate the average of.
A projection function to apply to each element.
A task that represents the asynchronous operation.
The task result contains the average of the sequence of values.
or
is
null
.
doesn't implement
.
contains no elements.
Asynchronously computes the average of a sequence of values that is obtained
by invoking a projection function on each element of the input sequence.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
The type of the elements of .
A sequence of values to calculate the average of.
A projection function to apply to each element.
A to observe while waiting for the task to complete.
A task that represents the asynchronous operation.
The task result contains the average of the sequence of values.
or
is
null
.
doesn't implement
.
contains no elements.
Asynchronously computes the average of a sequence of nullable values that is obtained
by invoking a projection function on each element of the input sequence.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
The type of the elements of .
A sequence of values to calculate the average of.
A projection function to apply to each element.
A task that represents the asynchronous operation.
The task result contains the average of the sequence of values.
or
is
null
.
doesn't implement
.
Asynchronously computes the average of a sequence of nullable values that is obtained
by invoking a projection function on each element of the input sequence.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
The type of the elements of .
A sequence of values to calculate the average of.
A projection function to apply to each element.
A to observe while waiting for the task to complete.
A task that represents the asynchronous operation.
The task result contains the average of the sequence of values.
or
is
null
.
doesn't implement
.
Asynchronously computes the average of a sequence of values that is obtained
by invoking a projection function on each element of the input sequence.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
The type of the elements of .
A sequence of values to calculate the average of.
A projection function to apply to each element.
A task that represents the asynchronous operation.
The task result contains the average of the sequence of values.
or
is
null
.
doesn't implement
.
contains no elements.
Asynchronously computes the average of a sequence of values that is obtained
by invoking a projection function on each element of the input sequence.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
The type of the elements of .
A sequence of values to calculate the average of.
A projection function to apply to each element.
A to observe while waiting for the task to complete.
A task that represents the asynchronous operation.
The task result contains the average of the sequence of values.
or
is
null
.
doesn't implement
.
contains no elements.
Asynchronously computes the average of a sequence of nullable values that is obtained
by invoking a projection function on each element of the input sequence.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
The type of the elements of .
A sequence of values to calculate the average of.
A projection function to apply to each element.
A task that represents the asynchronous operation.
The task result contains the average of the sequence of values.
or
is
null
.
doesn't implement
.
Asynchronously computes the average of a sequence of nullable values that is obtained
by invoking a projection function on each element of the input sequence.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
The type of the elements of .
A sequence of values to calculate the average of.
A projection function to apply to each element.
A to observe while waiting for the task to complete.
A task that represents the asynchronous operation.
The task result contains the average of the sequence of values.
or
is
null
.
doesn't implement
.
Asynchronously computes the average of a sequence of values that is obtained
by invoking a projection function on each element of the input sequence.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
The type of the elements of .
A sequence of values to calculate the average of.
A projection function to apply to each element.
A task that represents the asynchronous operation.
The task result contains the average of the sequence of values.
or
is
null
.
doesn't implement
.
contains no elements.
Asynchronously computes the average of a sequence of values that is obtained
by invoking a projection function on each element of the input sequence.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
The type of the elements of .
A sequence of values to calculate the average of.
A projection function to apply to each element.
A to observe while waiting for the task to complete.
A task that represents the asynchronous operation.
The task result contains the average of the sequence of values.
or
is
null
.
doesn't implement
.
contains no elements.
Asynchronously computes the average of a sequence of nullable values that is obtained
by invoking a projection function on each element of the input sequence.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
The type of the elements of .
A sequence of values to calculate the average of.
A projection function to apply to each element.
A task that represents the asynchronous operation.
The task result contains the average of the sequence of values.
or
is
null
.
doesn't implement
.
Asynchronously computes the average of a sequence of nullable values that is obtained
by invoking a projection function on each element of the input sequence.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
The type of the elements of .
A sequence of values to calculate the average of.
A projection function to apply to each element.
A to observe while waiting for the task to complete.
A task that represents the asynchronous operation.
The task result contains the average of the sequence of values.
or
is
null
.
doesn't implement
.
Asynchronously computes the average of a sequence of values that is obtained
by invoking a projection function on each element of the input sequence.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
The type of the elements of .
A sequence of values to calculate the average of.
A projection function to apply to each element.
A task that represents the asynchronous operation.
The task result contains the average of the sequence of values.
or
is
null
.
doesn't implement
.
contains no elements.
Asynchronously computes the average of a sequence of values that is obtained
by invoking a projection function on each element of the input sequence.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
The type of the elements of .
A sequence of values to calculate the average of.
A projection function to apply to each element.
A to observe while waiting for the task to complete.
A task that represents the asynchronous operation.
The task result contains the average of the sequence of values.
or
is
null
.
doesn't implement
.
contains no elements.
Asynchronously computes the average of a sequence of nullable values that is obtained
by invoking a projection function on each element of the input sequence.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
The type of the elements of .
A sequence of values to calculate the average of.
A projection function to apply to each element.
A task that represents the asynchronous operation.
The task result contains the average of the sequence of values.
or
is
null
.
doesn't implement
.
Asynchronously computes the average of a sequence of nullable values that is obtained
by invoking a projection function on each element of the input sequence.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
The type of the elements of .
A sequence of values to calculate the average of.
A projection function to apply to each element.
A to observe while waiting for the task to complete.
A task that represents the asynchronous operation.
The task result contains the average of the sequence of values.
or
is
null
.
doesn't implement
.
Asynchronously computes the average of a sequence of values that is obtained
by invoking a projection function on each element of the input sequence.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
The type of the elements of .
A sequence of values to calculate the average of.
A projection function to apply to each element.
A task that represents the asynchronous operation.
The task result contains the average of the sequence of values.
or
is
null
.
doesn't implement
.
contains no elements.
Asynchronously computes the average of a sequence of values that is obtained
by invoking a projection function on each element of the input sequence.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
The type of the elements of .
A sequence of values to calculate the average of.
A projection function to apply to each element.
A to observe while waiting for the task to complete.
A task that represents the asynchronous operation.
The task result contains the average of the sequence of values.
or
is
null
.
doesn't implement
.
contains no elements.
Asynchronously computes the average of a sequence of nullable values that is obtained
by invoking a projection function on each element of the input sequence.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
The type of the elements of .
A sequence of values to calculate the average of.
A projection function to apply to each element.
A task that represents the asynchronous operation.
The task result contains the average of the sequence of values.
or
is
null
.
doesn't implement
.
Asynchronously computes the average of a sequence of nullable values that is obtained
by invoking a projection function on each element of the input sequence.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
The type of the elements of .
A sequence of values to calculate the average of.
A projection function to apply to each element.
A to observe while waiting for the task to complete.
A task that represents the asynchronous operation.
The task result contains the average of the sequence of values.
or
is
null
.
doesn't implement
.
Bypasses a specified number of elements in a sequence and then returns the remaining elements.
The type of the elements of source.
A sequence to return elements from.
An expression that evaluates to the number of elements to skip.
A sequence that contains elements that occur after the specified index in the
input sequence.
Returns a specified number of contiguous elements from the start of a sequence.
The type of the elements of source.
The sequence to return elements from.
An expression that evaluates to the number of elements
to return.
A sequence that contains the specified number of elements from the
start of the input sequence.
Controls the transaction creation behavior while executing a database command or query.
If no transaction is present then a new transaction will be used for the operation.
If an existing transaction is present then use it, otherwise execute the command or query without a transaction.
Helper method used in expressions generated by Emit_Equal to perform a
byte-by-byte comparison of two byte arrays. There really ought to be
a way to do this in the framework but I'm unaware of it.
Compiles a delegate taking a Shaper instance and returning values. Used to compile
Expressions produced by the emitter.
Non-generic version of Compile (where the result type is passed in as an argument rather
than a type parameter)
Create expression to AndAlso the expressions and return the result.
Create expression to bitwise-or the expressions and return the result.
Creates an expression with null value. If the given type cannot be assigned
a null value, we create a value that throws when materializing. We don't throw statically
because we consistently defer type checks until materialization.
See SQL BU 588980.
Type of null expression.
Null expression.
Emits an expression that represnts a NullEntityWrapper instance.
An expression represnting a wrapped null
Create expression that guarantees the input expression is of the specified
type; no Convert is added if the expression is already of the same type.
Internal because it is called from the TranslatorResult.
Uses Emit_EnsureType and then wraps the result in an IEntityWrapper instance.
The expression that creates the entity to be wrapped
Expression to read the entity key
Expression to read the entity set
The type that was actuall requested by the client--may be object
The type of the identity type of the entity being materialized--never a proxy type
The actual type being materialized--may be a proxy type
Either NoTracking or AppendOnly depending on whether the entity is to be tracked
If true, then a proxy is being created
An expression representing the IEntityWrapper for the new entity
Returns an expression that creates an IEntityWrapper appropriate for the type of entity being materialized.
Takes an expression that represents an IEntityWrapper instance and creates a new
expression that extracts the raw entity from this.
Method that the generated expression calls when the types are not
assignable
Create expression to compare the results of two expressions and return
whether they are equal. Note we have special case logic for byte arrays.
Create expression that verifies that the entityKey has a value. Note we just
presume that if the first key is non-null, all the keys will be valid.
Create expression to call the GetValue method of the shaper's source data reader
Create expression to call the IsDBNull method of the shaper's source data reader
Create expression to call the IsDBNull method of the shaper's source data reader
for the scalar column represented by the column map.
Create expression to read a property value with error handling
Create expression to read a column value with error handling
Create expression to read a column value of type System.Data.Entity.Spatial.DbGeography by delegating to the DbSpatialServices implementation of the underlying provider
Create expression to read a column value of type System.Data.Entity.Spatial.DbGeometry by delegating to the DbSpatialServices implementation of the underlying provider
Create expression to read an item from the shaper's state array
Create expression to set an item in the shaper's state array
Create expression to set an item in the shaper's state array
Typed
An immutable class used to generate new coordinators. These coordinators are used
at runtime to materialize results.
Function of shaper that returns true; one default case when there is no explicit predicate.
Function of shaper that returns false; one default case used when there is no explicit predicate.
Gets depth of the reader (0 is top-level -- which incidentally doesn't
require a coordinator...
Indicates which state slot in the Shaper.State is expected to hold the
value for this nested reader result.
A function determining whether the current row has data for this nested result.
A function setting key values. (the return value is irrelevant)
A function returning true if key values match the previously set values.
Nested results below this (at depth + 1)
Indicates whether this is a leaf reader.
Indicates whether this coordinator can be managed by a simple enumerator. A simple enumerator
returns a single element per row, so the following conditions disqualify the enumerator:
nested collections, data discriminators (not all rows have data), keys (not all rows have new data).
For value-layer queries, the factories for all the records that we can potentially process
at this level in the query result.
Creates a buffer handling state needed by this coordinator.
Reads a single element of the result from the given reader state object, returning the
result as a wrapped entity. May be null if the element is not available as a wrapped entity.
Reads a single element of the result from the given reader state object.
May be null if the element is available as a wrapped entity instead.
Same as Element but uses slower patterns to provide better exception messages (e.g.
using reader.GetValue + type check rather than reader.GetInt32)
Initializes the collection storing results from this coordinator.
Description of this CoordinatorFactory, used for debugging only; while this is not
needed in retail code, it is pretty important because it's the only description we'll
have once we compile the Expressions; debugging a problem with retail bits would be
pretty hard without this.
Used for testing.
Can be null.
Can be null.
Can be null.
Supply null if isn't null.
Supply null if isn't null.
Should return the unwrapped entity.
Can be null.
Return the compiled expression for the predicate
Returns a string representation of the expression
Create a coordinator used for materialization of collections. Unlike the CoordinatorFactory,
the Coordinator contains mutable state.
Returns the "default" record state (that is, the one we use for PreRead/PastEnd reader states
Typed
A coordinator is responsible for tracking state and processing result in a root or nested query
result collection. The coordinator exists within a graph, and knows its Parent, (First)Child,
and Next sibling. This allows the Shaper to use the coordinator as a simple state machine when
consuming store reader results.
The factory used to generate this coordinator instance. Contains delegates used
by the Shaper during result enumeration.
Parent coordinator (the coordinator producing rows containing this collection).
If this is the root, null.
Next coordinator at this depth. Once we're done consuming results for this reader,
we move on to this.Next.
Registers this hierarchy of coordinators in the given shaper.
Determines the maximum depth of this subtree.
This method is called when the current collection is finished and it's time to move to the next collection.
Recursively initializes children and siblings as well.
Precondition: the current row has data for the coordinator.
Side-effects: updates keys currently stored in state and updates IsEntered if a new value is encountered.
Determines whether the row contains the next element in this collection.
Precondition: the current row has data and contains a new element for the coordinator.
Reads the next element in this collection.
First coordinator for nested results below this collection. When reading a new row
for this coordinator, we walk down to the Child.
NOTE:: this cannot be readonly because we can't know both the parent and the child
at initialization time; we set the Child in the parent's constructor.
Indicates whether data has been read for the collection being aggregated or yielded
by this coordinator.
Indicates whether this is the top level coordinator for a query.
For ObjectResult, aggregates all elements for in the nested collection handled by this coordinator.
For ObjectResult, aggregates all elements as wrapped entities for in the nested collection handled by this coordinator.
Delegate called when the current nested collection has been consumed. This is necessary in Span
scenarios where an EntityCollection RelatedEnd is populated only when all related entities have
been materialized. This version of the close handler works with wrapped entities.
For nested, object-layer coordinators we want to collect all the elements we find and handle them
when the root coordinator advances. Otherwise we just want to return them as we find them.
Sets the delegate called when this collection is closed. This close handler works on
a collection of wrapped entities, rather than on the raw entity objects.
Called when we're disposing the enumerator;
Returns a handle to the element aggregator for this nested collection.
Exposes the Current element that has been materialized (and is being populated) by this coordinator.
Satisfiability test optimization.
This class extends FragmentQueryKB by adding the so-called chase functionality:
given an expression, the chase incorporates in this expression all the consequences derivable
from the knowledge base. The knowledge base is not needed for the satisfiability test after such a procedure.
This leads to better performance in many cases.
Data structure supporting storage of facts and proof (resolution) of queries given
those facts.
For instance, we may know the following facts:
A --> B
A
Given these facts, the knowledge base can prove the query:
B
through resolution.
Type of leaf term identifiers in fact expressions.
Initialize a new knowledge base.
Adds all facts from another knowledge base
The other knowledge base
Adds the given fact to this KB.
Simple fact.
Adds the given implication to this KB, where implication is of the form:
condition --> implies
Condition
Entailed expression
Adds an equivalence to this KB, of the form:
left iff. right
Left operand
Right operand
A tree expression that evaluates to true iff. any of its children
evaluates to true.
An Or expression with no children is equivalent to False (this is an
operational convenience because we assume an implicit False is along
for the ride in every Or expression)
A + False iff. A
The type of leaf term identifiers in this expression.
Abstract base class for tree expressions (unary as in Not, n-ary
as in And or Or). Duplicate elements are trimmed at construction
time (algorithms applied to these trees rely on the assumption
of uniform children).
The type of leaf term identifiers in this expression.
Base type for Boolean expressions. Boolean expressions are immutable,
and value-comparable using Equals. Services include local simplification
and normalization to Conjunctive and Disjunctive Normal Forms.
Comments use the following notation convention:
"A . B" means "A and B"
"A + B" means "A or B"
"!A" means "not A"
The type of leaf term identifiers in this expression.
Standard accept method invoking the appropriate method overload
in the given visitor.
T_Return is the return type for the visitor.
Visitor implementation.
Value computed for this node.
Invokes the Simplifier visitor on this expression tree.
Simplifications are purely local (see Simplifier class
for details).
Expensive simplification that considers various permutations of the
expression (including Decision Diagram, DNF, and CNF translations)
Returns all term expressions below this node.
Counts terms in this expression.
Implicit cast from a value of type T to a TermExpr where
TermExpr.Value is set to the given value.
Value to wrap in term expression
Term expression
Creates the negation of the current element.
Gets an enumeration value indicating the type of the expression node.
Initialize a new tree expression with the given children.
Child expressions
Gets the children of this expression node.
Initialize a new Or expression with the given children.
Child expressions
Initialize a new Or expression with the given children.
Child expressions
A tree expression that evaluates to true iff. none of its children
evaluate to false.
An And expression with no children is equivalent to True (this is an
operational convenience because we assume an implicit True is along
for the ride in every And expression)
A . True iff. A
The type of leaf term identifiers in this expression.
Initialize a new And expression with the given children.
Child expressions
Initialize a new And expression with the given children.
Child expressions
Retrieves all implications directly derivable from the atomic expression.
Atomic expression to be extended with facts derivable from the knowledge base.
Checks if the given expression is satisfiable in conjunction with this knowledge base.
Expression to be tested for satisfiability.
Retrieves all implications directly derivable from the expression.
Expression to be extended with facts derivable from the knowledge base.
Maintains a list of all implications derivable from the condition.
Implications are stored in the _implications dictionary
Condition
Entailed expression
Returns KB rules which cannot be used for chasing.
Basic visitor which reproduces the given expression tree.
Type of leaf term identifiers in expression.
Abstract visitor class. All Boolean expression nodes know how to
'accept' a visitor, and delegate to the appropriate visitor method.
For instance, AndExpr invokes Visitor.VisitAnd.
Type of leaf term identifiers in expression.
Return type for visit methods.
Represents the base item class for all the metadata
Represents the base item class for all the metadata
Implementing this internal constructor so that this class can't be derived
outside this assembly
Adds an annotation with the specified name and value.
The name of the annotation property.
The value of the annotation property.
Removes an annotation with the specified name.
The name of the annotation property.
Just checks for identities to be equal
Validates the types and sets the readOnly property to true. Once the type is set to readOnly,
it can never be changed.
Builds identity string for this item. By default, the method calls the identity property.
Adds the given metadata property to the metadata property collection
Static Constructor which initializes all the built in types and primitive types
Returns a conceptual model built-in type that matches one of the
values.
An object that represents the built-in type in the EDM.
One of the values.
Returns the list of the general facet descriptions for a specified type.
A object that represents the list of the general facet descriptions for a specified type.
Initialize all the build in type with the given type attributes and properties
The built In type which is getting initialized
name of the built in type
whether the type is abstract or not
The base type of the built in type
Add properties for all the build in complex type
The type of the built In type whose properties are being added
properties of the built in type
Initializes the enum type
The built-in type kind enum value of this enum type
The name of this enum type
The member names of this enum type
Gets the currently assigned annotations.
Gets the built-in type kind for this type.
A object that represents the built-in type kind for this type.
Gets the list of properties of the current type.
A collection of type that contains the list of properties of the current type.
List of item attributes on this type
Gets or sets the documentation associated with this type.
A object that represents the documentation on this type.
Identity of the item
Returns true if this item is not-changeable. Otherwise returns false.
This class is used for doing reverse-lookup of metadata when only a CLR type is known.
It should never be used for POCO or proxy types, but may still be called for types that inherit
from EntityObject.
This is an extraction of the code that was in such that
it can be used outside of the context of the traditional assembly loaders--notably the CLR types to load
from are provided by Code First.
Creates an Enum property based on and adds it to the parent structural type.
CLR type owning .
OSpace type the created property will be added to.
Corresponding property from CSpace.
CLR property used to build an Enum property.
Indicates that the given method is a proxy for an EDM function.
Note that this attribute has been replaced by the starting with EF6.
Indicates that the given method is a proxy for an EDM function.
Note that this class was called EdmFunctionAttribute in some previous versions of Entity Framework.
Initializes a new instance of the class.
The namespace of the mapped-to function.
The name of the mapped-to function.
The namespace of the mapped-to function.
The namespace of the mapped-to function.
The name of the mapped-to function.
The name of the mapped-to function.
Creates a new DbFunctionAttribute instance.
The namespace name of the EDM function represented by the attributed method.
The function name of the EDM function represented by the attributed method.
Provides common language runtime (CLR) methods that expose EDM canonical functions
for use in or LINQ to Entities queries.
Note that these functions have been moved to the class starting with EF6.
The functions are retained here only to help in the migration of older EF apps to EF6.
When used as part of a LINQ to Entities query, this method invokes the canonical StDev EDM function to calculate
the standard deviation of the collection.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The collection over which to perform the calculation.
The standard deviation.
When used as part of a LINQ to Entities query, this method invokes the canonical StDev EDM function to calculate
the standard deviation of the collection.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The collection over which to perform the calculation.
The standard deviation.
When used as part of a LINQ to Entities query, this method invokes the canonical StDev EDM function to calculate
the standard deviation of the collection.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The collection over which to perform the calculation.
The standard deviation.
When used as part of a LINQ to Entities query, this method invokes the canonical StDev EDM function to calculate
the standard deviation of the collection.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The collection over which to perform the calculation.
The standard deviation.
When used as part of a LINQ to Entities query, this method invokes the canonical StDev EDM function to calculate
the standard deviation of the collection.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The collection over which to perform the calculation.
The standard deviation.
When used as part of a LINQ to Entities query, this method invokes the canonical StDev EDM function to calculate
the standard deviation of the collection.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The collection over which to perform the calculation.
The standard deviation.
When used as part of a LINQ to Entities query, this method invokes the canonical StDev EDM function to calculate
the standard deviation of the collection.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The collection over which to perform the calculation.
The standard deviation.
When used as part of a LINQ to Entities query, this method invokes the canonical StDev EDM function to calculate
the standard deviation of the collection.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The collection over which to perform the calculation.
The standard deviation.
When used as part of a LINQ to Entities query, this method invokes the canonical StDevP EDM function to calculate
the standard deviation for the population.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The collection over which to perform the calculation.
The standard deviation for the population.
When used as part of a LINQ to Entities query, this method invokes the canonical StDevP EDM function to calculate
the standard deviation for the population.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The collection over which to perform the calculation.
The standard deviation for the population.
When used as part of a LINQ to Entities query, this method invokes the canonical StDevP EDM function to calculate
the standard deviation for the population.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The collection over which to perform the calculation.
The standard deviation for the population.
When used as part of a LINQ to Entities query, this method invokes the canonical StDevP EDM function to calculate
the standard deviation for the population.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The collection over which to perform the calculation.
The standard deviation for the population.
When used as part of a LINQ to Entities query, this method invokes the canonical StDevP EDM function to calculate
the standard deviation for the population.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The collection over which to perform the calculation.
The standard deviation for the population.
When used as part of a LINQ to Entities query, this method invokes the canonical StDevP EDM function to calculate
the standard deviation for the population.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The collection over which to perform the calculation.
The standard deviation for the population.
When used as part of a LINQ to Entities query, this method invokes the canonical StDevP EDM function to calculate
the standard deviation for the population.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The collection over which to perform the calculation.
The standard deviation for the population.
When used as part of a LINQ to Entities query, this method invokes the canonical StDevP EDM function to calculate
the standard deviation for the population.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The collection over which to perform the calculation.
The standard deviation for the population.
When used as part of a LINQ to Entities query, this method invokes the canonical Var EDM function to calculate
the variance of the collection.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The collection over which to perform the calculation.
The variance.
When used as part of a LINQ to Entities query, this method invokes the canonical Var EDM function to calculate
the variance of the collection.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The collection over which to perform the calculation.
The variance.
When used as part of a LINQ to Entities query, this method invokes the canonical Var EDM function to calculate
the variance of the collection.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The collection over which to perform the calculation.
The variance.
When used as part of a LINQ to Entities query, this method invokes the canonical Var EDM function to calculate
the variance of the collection.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The collection over which to perform the calculation.
The variance.
When used as part of a LINQ to Entities query, this method invokes the canonical Var EDM function to calculate
the variance of the collection.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The collection over which to perform the calculation.
The variance.
When used as part of a LINQ to Entities query, this method invokes the canonical Var EDM function to calculate
the variance of the collection.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The collection over which to perform the calculation.
The variance.
When used as part of a LINQ to Entities query, this method invokes the canonical Var EDM function to calculate
the variance of the collection.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The collection over which to perform the calculation.
The variance.
When used as part of a LINQ to Entities query, this method invokes the canonical Var EDM function to calculate
the variance of the collection.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The collection over which to perform the calculation.
The variance.
When used as part of a LINQ to Entities query, this method invokes the canonical VarP EDM function to calculate
the variance for the population.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The collection over which to perform the calculation.
The variance for the population.
When used as part of a LINQ to Entities query, this method invokes the canonical VarP EDM function to calculate
the variance for the population.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The collection over which to perform the calculation.
The variance for the population.
When used as part of a LINQ to Entities query, this method invokes the canonical VarP EDM function to calculate
the variance for the population.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The collection over which to perform the calculation.
The variance for the population.
When used as part of a LINQ to Entities query, this method invokes the canonical VarP EDM function to calculate
the variance for the population.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The collection over which to perform the calculation.
The variance for the population.
When used as part of a LINQ to Entities query, this method invokes the canonical VarP EDM function to calculate
the variance for the population.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The collection over which to perform the calculation.
The variance for the population.
When used as part of a LINQ to Entities query, this method invokes the canonical VarP EDM function to calculate
the variance for the population.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The collection over which to perform the calculation.
The variance for the population.
When used as part of a LINQ to Entities query, this method invokes the canonical VarP EDM function to calculate
the variance for the population.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The collection over which to perform the calculation.
The variance for the population.
When used as part of a LINQ to Entities query, this method invokes the canonical VarP EDM function to calculate
the variance for the population.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The collection over which to perform the calculation.
The variance for the population.
When used as part of a LINQ to Entities query, this method invokes the canonical Left EDM function to return a given
number of the leftmost characters in a string.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The input string.
The number of characters to return
A string containing the number of characters asked for from the left of the input string.
When used as part of a LINQ to Entities query, this method invokes the canonical Right EDM function to return a given
number of the rightmost characters in a string.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The input string.
The number of characters to return
A string containing the number of characters asked for from the right of the input string.
When used as part of a LINQ to Entities query, this method invokes the canonical Reverse EDM function to return a given
string with the order of the characters reversed.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The input string.
The input string with the order of the characters reversed.
When used as part of a LINQ to Entities query, this method invokes the canonical GetTotalOffsetMinutes EDM function to
return the number of minutes that the given date/time is offset from UTC. This is generally between +780
and -780 (+ or - 13 hrs).
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The date/time value to use.
The offset of the input from UTC.
When used as part of a LINQ to Entities query, this method invokes the canonical TruncateTime EDM function to return
the given date with the time portion cleared.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The date/time value to use.
The input date with the time portion cleared.
When used as part of a LINQ to Entities query, this method invokes the canonical TruncateTime EDM function to return
the given date with the time portion cleared.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The date/time value to use.
The input date with the time portion cleared.
When used as part of a LINQ to Entities query, this method invokes the canonical CreateDateTime EDM function to
create a new object.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The year.
The month (1-based).
The day (1-based).
The hours.
The minutes.
The seconds, including fractional parts of the seconds if desired.
The new date/time.
When used as part of a LINQ to Entities query, this method invokes the canonical CreateDateTimeOffset EDM function to
create a new object.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The year.
The month (1-based).
The day (1-based).
The hours.
The minutes.
The seconds, including fractional parts of the seconds if desired.
The time zone offset part of the new date.
The new date/time.
When used as part of a LINQ to Entities query, this method invokes the canonical CreateTime EDM function to
create a new object.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The hours.
The minutes.
The seconds, including fractional parts of the seconds if desired.
The new time span.
When used as part of a LINQ to Entities query, this method invokes the canonical AddYears EDM function to
add the given number of years to a date/time.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The input date/time.
The number of years to add.
A resulting date/time.
When used as part of a LINQ to Entities query, this method invokes the canonical AddYears EDM function to
add the given number of years to a date/time.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The input date/time.
The number of years to add.
A resulting date/time.
When used as part of a LINQ to Entities query, this method invokes the canonical AddMonths EDM function to
add the given number of months to a date/time.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The input date/time.
The number of months to add.
A resulting date/time.
When used as part of a LINQ to Entities query, this method invokes the canonical AddMonths EDM function to
add the given number of months to a date/time.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The input date/time.
The number of months to add.
A resulting date/time.
When used as part of a LINQ to Entities query, this method invokes the canonical AddDays EDM function to
add the given number of days to a date/time.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The input date/time.
The number of days to add.
A resulting date/time.
When used as part of a LINQ to Entities query, this method invokes the canonical AddDays EDM function to
add the given number of days to a date/time.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The input date/time.
The number of days to add.
A resulting date/time.
When used as part of a LINQ to Entities query, this method invokes the canonical AddHours EDM function to
add the given number of hours to a date/time.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The input date/time.
The number of hours to add.
A resulting date/time.
When used as part of a LINQ to Entities query, this method invokes the canonical AddHours EDM function to
add the given number of hours to a date/time.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The input date/time.
The number of hours to add.
A resulting date/time.
When used as part of a LINQ to Entities query, this method invokes the canonical AddHours EDM function to
add the given number of hours to a time span.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The input date/time.
The number of hours to add.
A resulting time span.
When used as part of a LINQ to Entities query, this method invokes the canonical AddMinutes EDM function to
add the given number of minutes to a date/time.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The input date/time.
The number of minutes to add.
A resulting date/time.
When used as part of a LINQ to Entities query, this method invokes the canonical AddMinutes EDM function to
add the given number of minutes to a date/time.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The input date/time.
The number of minutes to add.
A resulting date/time.
When used as part of a LINQ to Entities query, this method invokes the canonical AddMinutes EDM function to
add the given number of minutes to a time span.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The input date/time.
The number of minutes to add.
A resulting time span.
When used as part of a LINQ to Entities query, this method invokes the canonical AddSeconds EDM function to
add the given number of seconds to a date/time.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The input date/time.
The number of seconds to add.
A resulting date/time.
When used as part of a LINQ to Entities query, this method invokes the canonical AddSeconds EDM function to
add the given number of seconds to a date/time.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The input date/time.
The number of seconds to add.
A resulting date/time.
When used as part of a LINQ to Entities query, this method invokes the canonical AddSeconds EDM function to
add the given number of seconds to a time span.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The input date/time.
The number of seconds to add.
A resulting time span.
When used as part of a LINQ to Entities query, this method invokes the canonical AddMilliseconds EDM function to
add the given number of milliseconds to a date/time.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The input date/time.
The number of milliseconds to add.
A resulting date/time.
When used as part of a LINQ to Entities query, this method invokes the canonical AddMilliseconds EDM function to
add the given number of milliseconds to a date/time.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The input date/time.
The number of milliseconds to add.
A resulting date/time.
When used as part of a LINQ to Entities query, this method invokes the canonical AddMilliseconds EDM function to
add the given number of milliseconds to a time span.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The input date/time.
The number of milliseconds to add.
A resulting time span.
When used as part of a LINQ to Entities query, this method invokes the canonical AddMicroseconds EDM function to
add the given number of microseconds to a date/time.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The input date/time.
The number of microseconds to add.
A resulting date/time.
When used as part of a LINQ to Entities query, this method invokes the canonical AddMicroseconds EDM function to
add the given number of microseconds to a date/time.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The input date/time.
The number of microseconds to add.
A resulting date/time.
When used as part of a LINQ to Entities query, this method invokes the canonical AddMicroseconds EDM function to
add the given number of microseconds to a time span.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The input date/time.
The number of microseconds to add.
A resulting time span.
When used as part of a LINQ to Entities query, this method invokes the canonical AddNanoseconds EDM function to
add the given number of nanoseconds to a date/time.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The input date/time.
The number of nanoseconds to add.
A resulting date/time.
When used as part of a LINQ to Entities query, this method invokes the canonical AddNanoseconds EDM function to
add the given number of nanoseconds to a date/time.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The input date/time.
The number of nanoseconds to add.
A resulting date/time.
When used as part of a LINQ to Entities query, this method invokes the canonical AddNanoseconds EDM function to
add the given number of nanoseconds to a time span.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The input date/time.
The number of nanoseconds to add.
A resulting time span.
When used as part of a LINQ to Entities query, this method invokes the canonical DiffYears EDM function to
calculate the number of years between two date/times.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The first date/time.
The second date/time.
The number of years between the first and second date/times.
When used as part of a LINQ to Entities query, this method invokes the canonical DiffYears EDM function to
calculate the number of years between two date/times.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The first date/time.
The second date/time.
The number of years between the first and second date/times.
When used as part of a LINQ to Entities query, this method invokes the canonical DiffMonths EDM function to
calculate the number of months between two date/times.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The first date/time.
The second date/time.
The number of months between the first and second date/times.
When used as part of a LINQ to Entities query, this method invokes the canonical DiffMonths EDM function to
calculate the number of months between two date/times.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The first date/time.
The second date/time.
The number of months between the first and second date/times.
When used as part of a LINQ to Entities query, this method invokes the canonical DiffDays EDM function to
calculate the number of days between two date/times.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The first date/time.
The second date/time.
The number of days between the first and second date/times.
When used as part of a LINQ to Entities query, this method invokes the canonical DiffDays EDM function to
calculate the number of days between two date/times.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The first date/time.
The second date/time.
The number of days between the first and second date/times.
When used as part of a LINQ to Entities query, this method invokes the canonical DiffHours EDM function to
calculate the number of hours between two date/times.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The first date/time.
The second date/time.
The number of hours between the first and second date/times.
When used as part of a LINQ to Entities query, this method invokes the canonical DiffHours EDM function to
calculate the number of hours between two date/times.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The first date/time.
The second date/time.
The number of hours between the first and second date/times.
When used as part of a LINQ to Entities query, this method invokes the canonical DiffHours EDM function to
calculate the number of hours between two time spans.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The first time span.
The second time span.
The number of hours between the first and second time spans.
When used as part of a LINQ to Entities query, this method invokes the canonical DiffMinutes EDM function to
calculate the number of minutes between two date/times.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The first date/time.
The second date/time.
The number of minutes between the first and second date/times.
When used as part of a LINQ to Entities query, this method invokes the canonical DiffMinutes EDM function to
calculate the number of minutes between two date/times.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The first date/time.
The second date/time.
The number of minutes between the first and second date/times.
When used as part of a LINQ to Entities query, this method invokes the canonical DiffMinutes EDM function to
calculate the number of minutes between two time spans.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The first time span.
The second time span.
The number of minutes between the first and second time spans.
When used as part of a LINQ to Entities query, this method invokes the canonical DiffSeconds EDM function to
calculate the number of seconds between two date/times.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The first date/time.
The second date/time.
The number of seconds between the first and second date/times.
When used as part of a LINQ to Entities query, this method invokes the canonical DiffSeconds EDM function to
calculate the number of seconds between two date/times.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The first date/time.
The second date/time.
The number of seconds between the first and second date/times.
When used as part of a LINQ to Entities query, this method invokes the canonical DiffSeconds EDM function to
calculate the number of seconds between two time spans.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The first time span.
The second time span.
The number of seconds between the first and second time spans.
When used as part of a LINQ to Entities query, this method invokes the canonical DiffMilliseconds EDM function to
calculate the number of milliseconds between two date/times.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The first date/time.
The second date/time.
The number of milliseconds between the first and second date/times.
When used as part of a LINQ to Entities query, this method invokes the canonical DiffMilliseconds EDM function to
calculate the number of milliseconds between two date/times.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The first date/time.
The second date/time.
The number of milliseconds between the first and second date/times.
When used as part of a LINQ to Entities query, this method invokes the canonical DiffMilliseconds EDM function to
calculate the number of milliseconds between two time spans.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The first time span.
The second time span.
The number of milliseconds between the first and second time spans.
When used as part of a LINQ to Entities query, this method invokes the canonical DiffMicroseconds EDM function to
calculate the number of microseconds between two date/times.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The first date/time.
The second date/time.
The number of microseconds between the first and second date/times.
When used as part of a LINQ to Entities query, this method invokes the canonical DiffMicroseconds EDM function to
calculate the number of microseconds between two date/times.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The first date/time.
The second date/time.
The number of microseconds between the first and second date/times.
When used as part of a LINQ to Entities query, this method invokes the canonical DiffMicroseconds EDM function to
calculate the number of microseconds between two time spans.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The first time span.
The second time span.
The number of microseconds between the first and second time spans.
When used as part of a LINQ to Entities query, this method invokes the canonical DiffNanoseconds EDM function to
calculate the number of nanoseconds between two date/times.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The first date/time.
The second date/time.
The number of nanoseconds between the first and second date/times.
When used as part of a LINQ to Entities query, this method invokes the canonical DiffNanoseconds EDM function to
calculate the number of nanoseconds between two date/times.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The first date/time.
The second date/time.
The number of nanoseconds between the first and second date/times.
When used as part of a LINQ to Entities query, this method invokes the canonical DiffNanoseconds EDM function to
calculate the number of nanoseconds between two time spans.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The first time span.
The second time span.
The number of nanoseconds between the first and second time spans.
When used as part of a LINQ to Entities query, this method invokes the canonical Truncate EDM function to
truncate the given value to the number of specified digits.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The value to truncate.
The number of digits to preserve.
The truncated value.
When used as part of a LINQ to Entities query, this method invokes the canonical Truncate EDM function to
truncate the given value to the number of specified digits.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The value to truncate.
The number of digits to preserve.
The truncated value.
When used as part of a LINQ to Entities query, this method acts as an operator that ensures the input
is treated as a Unicode string.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function impacts the way the LINQ query is translated to a query that can be run in the database.
The input string.
The input string treated as a Unicode string.
When used as part of a LINQ to Entities query, this method acts as an operator that ensures the input
is treated as a non-Unicode string.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function impacts the way the LINQ query is translated to a query that can be run in the database.
The input string.
The input string treated as a non-Unicode string.
Options for query execution.
Creates a new instance of .
Merge option to use for entity results.
Whether the query is streaming or buffering.
Determines whether the specified objects are equal.
true if the two objects are equal; otherwise, false.
The left object to compare.
The right object to compare.
Determines whether the specified objects are not equal.
The left object to compare.
The right object to compare.
true if the two objects are not equal; otherwise, false.
Merge option to use for entity results.
Whether the query is streaming or buffering.
A wrapper over a that will consume and close the supplied reader
when is called.
Instances of this class would be returned to user via .
DataRecord interface supporting structured types and rich metadata information.
Gets a object with the specified index.
A object.
The index of the row.
Returns nested readers as objects.
Nested readers as objects.
The ordinal of the column.
Gets for this
.
A object.
Used to return a nested result
Initialize the property descriptors for each PrimitiveType attribute.
See similar functionality in DataRecordObjectView's ITypedList implementation.
Creates a PropertyDescriptorCollection based on a StructuralType definition
Currently this includes a PropertyDescriptor for each primitive type property in the StructuralType
The structural type definition
The type to use as the component type
Whether the properties in the collection should be read only or not
DataRecordInfo class providing a simple way to access both the type information and the column information.
Initializes a new object for a specific type with an enumerable collection of data fields.
The metadata for the type represented by this object, supplied by
.
An enumerable collection of objects that represent column information.
Construct FieldMetadata for structuralType.Members from TypeUsage
Reusing TypeUsage and FieldMetadata from another EntityRecordInfo which has all the same info
but with a different EntityKey instance.
Gets for this
object.
A object.
Gets type info for this object as a object.
A value.
A prepared command definition, can be cached and reused to avoid
repreparing a command.
Internal factory method to create the default Command Definition object
based on a prototype command. The prototype command is cloned
before the protected constructor is invoked
prototype DbCommand
the DbCommandDefinition
Initializes a new instance of the class using the supplied
.
The supplied .
Initializes a new instance of the class.
Creates and returns a object that can be executed.
The command for database.
Metadata Interface for all CLR types types
Value to pass to GetInformation to get the StoreSchemaDefinition
Value to pass to GetInformation to get the StoreSchemaMapping
Value to pass to GetInformation to get the ConceptualSchemaDefinition
Value to pass to GetInformation to get the StoreSchemaDefinitionVersion3
Value to pass to GetInformation to get the StoreSchemaMappingVersion3
Value to pass to GetInformation to get the ConceptualSchemaDefinitionVersion3
Name of the MaxLength Facet
Name of the Unicode Facet
Name of the FixedLength Facet
Name of the Precision Facet
Name of the Scale Facet
Name of the Nullable Facet
Name of the DefaultValue Facet
Name of the Collation Facet
Name of the SRID Facet
Name of the IsStrict Facet
When overridden in a derived class, returns the set of primitive types supported by the data source.
The set of types supported by the data source.
When overridden in a derived class, returns a collection of EDM functions supported by the provider manifest.
A collection of EDM functions.
Returns the FacetDescription objects for a particular type.
The FacetDescription objects for the specified EDM type.
The EDM type to return the facet description for.
When overridden in a derived class, this method maps the specified storage type and a set of facets for that type to an EDM type.
The instance that describes an EDM type and a set of facets for that type.
The TypeUsage instance that describes a storage type and a set of facets for that type to be mapped to the EDM type.
When overridden in a derived class, this method maps the specified EDM type and a set of facets for that type to a storage type.
The TypeUsage instance that describes a storage type and a set of facets for that type.
The TypeUsage instance that describes the EDM type and a set of facets for that type to be mapped to a storage type.
When overridden in a derived class, this method returns provider-specific information.
The XmlReader object that represents the mapping to the underlying data store catalog.
The type of the information to return.
Gets the provider-specific information.
The provider-specific information.
The type of the information to return.
Indicates if the provider supports escaping strings to be used as patterns in a Like expression.
True if this provider supports escaping strings to be used as patterns in a Like expression; otherwise, false.
If the provider supports escaping, the character that would be used as the escape character.
Provider writers should override this method to return the argument with the wildcards and the escape character escaped. This method is only used if SupportsEscapingLikeArgument returns true.
The argument with the wildcards and the escape character escaped.
The argument to be escaped.
Returns a boolean that specifies whether the provider can handle expression trees
containing instances of DbInExpression.
The default implementation returns false for backwards compatibility. Derived classes can override this method.
false
Gets the namespace used by this provider manifest.
The namespace used by this provider manifest.
The factory for building command definitions; use the type of this object
as the argument to the IServiceProvider.GetService method on the provider
factory;
Constructs an EF provider that will use the obtained from
the app domain Singleton for resolving EF dependencies such
as the instance to use.
Constructs an EF provider that will use the given for
resolving EF dependencies such as the instance to use.
The resolver to use.
Registers a handler to process non-error messages coming from the database provider.
The connection to receive information for.
The handler to process messages.
Create a Command Definition object given a command tree.
command tree for the statement
an executable command definition object
This method simply delegates to the provider's implementation of CreateDbCommandDefinition.
Creates command definition from specified manifest and command tree.
The created command definition.
The manifest.
The command tree.
Creates a command definition object for the specified provider manifest and command tree.
An executable command definition object.
Provider manifest previously retrieved from the store provider.
Command tree for the statement.
Ensures that the data space of the specified command tree is the target (S-) space
The command tree for which the data space should be validated
Create the default DbCommandDefinition object based on the prototype command
This method is intended for provider writers to build a default command definition
from a command.
Note: This will clone the prototype
the prototype command
an executable command definition object
Returns provider manifest token given a connection.
The provider manifest token.
Connection to provider.
Returns provider manifest token for a given connection.
Connection to find manifest token from.
The provider manifest token for the specified connection.
Returns the provider manifest by using the specified version information.
The provider manifest by using the specified version information.
The token information associated with the provider manifest.
When overridden in a derived class, returns an instance of a class that derives from the DbProviderManifest.
A DbProviderManifest object that represents the provider manifest.
The token information associated with the provider manifest.
Gets the that will be used to execute methods that use the specified connection.
The database connection
A new instance of
Gets the that will be used to execute methods that use the specified connection.
Uses MetadataWorkspace for faster lookup.
The database connection
A new instance of
Gets the spatial data reader for the .
The spatial data reader.
The reader where the spatial data came from.
The manifest token associated with the provider manifest.
Gets the spatial services for the .
The spatial services.
The token information associated with the provider manifest.
Gets the spatial services for the .
The spatial services.
Information about the database that the spatial services will be used for.
Gets the spatial data reader for the .
The spatial data reader.
The reader where the spatial data came from.
The token information associated with the provider manifest.
Gets the spatial services for the .
The spatial services.
The token information associated with the provider manifest.
Sets the parameter value and appropriate facets for the given .
The parameter.
The type of the parameter.
The value of the parameter.
Returns providers given a connection.
The instanced based on the specified connection.
Connection to provider.
Retrieves the DbProviderFactory based on the specified DbConnection.
The retrieved DbProviderFactory.
The connection to use.
Return an XML reader which represents the CSDL description
An XmlReader that represents the CSDL description
Generates a data definition language (DDL script that creates schema objects (tables, primary keys, foreign keys) based on the contents of the StoreItemCollection parameter and targeted for the version of the database corresponding to the provider manifest token.
Individual statements should be separated using database-specific DDL command separator.
It is expected that the generated script would be executed in the context of existing database with
sufficient permissions, and it should not include commands to create the database, but it may include
commands to create schemas and other auxiliary objects such as sequences, etc.
A DDL script that creates schema objects based on the contents of the StoreItemCollection parameter and targeted for the version of the database corresponding to the provider manifest token.
The provider manifest token identifying the target version.
The structure of the database.
Generates a data definition language (DDL) script that creates schema objects
(tables, primary keys, foreign keys) based on the contents of the StoreItemCollection
parameter and targeted for the version of the database corresponding to the provider manifest token.
Individual statements should be separated using database-specific DDL command separator.
It is expected that the generated script would be executed in the context of existing database with
sufficient permissions, and it should not include commands to create the database, but it may include
commands to create schemas and other auxiliary objects such as sequences, etc.
The provider manifest token identifying the target version.
The structure of the database.
A DDL script that creates schema objects based on the contents of the StoreItemCollection parameter
and targeted for the version of the database corresponding to the provider manifest token.
Creates a database indicated by connection and creates schema objects
(tables, primary keys, foreign keys) based on the contents of storeItemCollection.
Connection to a non-existent database that needs to be created and populated with the store objects indicated with the storeItemCollection parameter.
Execution timeout for any commands needed to create the database.
The collection of all store items based on which the script should be created.
Creates a database indicated by connection and creates schema objects (tables, primary keys, foreign keys) based on the contents of a StoreItemCollection.
Connection to a non-existent database that needs to be created and populated with the store objects indicated with the storeItemCollection parameter.
Execution timeout for any commands needed to create the database.
The collection of all store items based on which the script should be created.
Returns a value indicating whether a given database exists on the server.
True if the provider can deduce the database only based on the connection.
Connection to a database whose existence is checked by this method.
Execution timeout for any commands needed to determine the existence of the database.
The collection of all store items from the model. This parameter is no longer used for determining database existence.
Returns a value indicating whether a given database exists on the server.
True if the provider can deduce the database only based on the connection.
Connection to a database whose existence is checked by this method.
Execution timeout for any commands needed to determine the existence of the database.
The collection of all store items from the model. This parameter is no longer used for determining database existence.
Deletes the specified database.
Connection to an existing database that needs to be deleted.
Execution timeout for any commands needed to delete the database.
The collection of all store items from the model. This parameter is no longer used for database deletion.
Deletes the specified database.
Connection to an existing database that needs to be deleted.
Execution timeout for any commands needed to delete the database.
The collection of all store items from the model. This parameter is no longer used for database deletion.
Expands |DataDirectory| in the given path if it begins with |DataDirectory| and returns the expanded path,
or returns the given string if it does not start with |DataDirectory|.
The path to expand.
The expanded path.
Adds an that will be used to resolve additional default provider
services when a derived type is registered as an EF provider either using an entry in the application's
config file or through code-based registration in .
The resolver to add.
Called to resolve additional default provider services when a derived type is registered as an
EF provider either using an entry in the application's config file or through code-based
registration in . The implementation of this method in this
class uses the resolvers added with the AddDependencyResolver method to resolve
dependencies.
Use this method to set, add, or change other provider-related services. Note that this method
will only be called for such services if they are not already explicitly configured in some
other way by the application. This allows providers to set default services while the
application is still able to override and explicitly configure each service if required.
See and for more details.
The type of the service to be resolved.
An optional key providing additional information for resolving the service.
An instance of the given type, or null if the service could not be resolved.
Called to resolve additional default provider services when a derived type is registered as an
EF provider either using an entry in the application's config file or through code-based
registration in . The implementation of this method in this
class uses the resolvers added with the AddDependencyResolver method to resolve
dependencies.
The type of the service to be resolved.
An optional key providing additional information for resolving the service.
All registered services that satisfy the given type and key, or an empty enumeration if there are none.
A specialization of the ProviderManifest that accepts an XmlReader
Initializes a new instance of the class.
An object that provides access to the XML data in the provider manifest file.
Returns the list of facet descriptions for the specified Entity Data Model (EDM) type.
A collection of type that contains the list of facet descriptions for the specified EDM type.
An for which the facet descriptions are to be retrieved.
Returns the list of primitive types supported by the storage provider.
A collection of type that contains the list of primitive types supported by the storage provider.
Returns the list of provider-supported functions.
A collection of type that contains the list of provider-supported functions.
Gets the namespace name supported by this provider manifest.
The namespace name supported by this provider manifest.
Gets the best mapped equivalent Entity Data Model (EDM) type for a specified storage type name.
The best mapped equivalent EDM type for a specified storage type name.
Gets the best mapped equivalent storage primitive type for a specified storage type name.
The best mapped equivalent storage primitive type for a specified storage type name.
Class for representing a collection of items.
Most of the implementation for actual maintenance of the collection is
done by MetadataCollection
Class representing a read-only wrapper around MetadataCollection
The type of items in this collection
The constructor for constructing a read-only metadata collection to wrap another MetadataCollection.
The metadata collection to wrap
Thrown if collection argument is null
Retrieves an item from this collection by using the specified identity.
An item from this collection.
The identity of the item to be searched for.
true to perform the case-insensitive search; otherwise, false.
Determines whether the collection contains an item with the specified identity.
true if the collection contains the item to be searched for; otherwise, false. The default is false.
The identity of the item.
Retrieves an item from this collection by using the specified identity.
true if there is an item that matches the search criteria; otherwise, false.
The identity of the item to be searched for.
true to perform the case-insensitive search; otherwise, false.
When this method returns, this output parameter contains an item from the collection. If there is no matched item, this output parameter contains null.
Returns an enumerator that can iterate through this collection.
A that can be used to iterate through this
.
Returns the index of the specified value in this collection.
The index of the specified value in this collection.
A value to seek.
Gets a value indicating whether this collection is read-only.
true if this collection is read-only; otherwise, false.
Gets an item from this collection by using the specified identity.
An item from this collection.
The identity of the item to be searched for.
Returns the metadata collection over which this collection is the view
The enumerator for MetadataCollection
Constructor for the enumerator
The collection that this enumerator should enumerate on
Disposes of this enumerator.
Moves to the next member in the collection of type
.
true if the enumerator is moved in the collection of type
; otherwise, false.
Positions the enumerator before the first position in the collection of type
.
Gets the member at the current position.
The member at the current position.
Gets the member at the current position
The default constructor for ItemCollection
Adds an item to the collection
The item to add to the list
Thrown if item argument is null
Thrown if the item passed in or the collection itself instance is in ReadOnly state
Thrown if the item that is being added already belongs to another ItemCollection
Thrown if the ItemCollection already contains an item with the same identity
Adds a collection of items to the collection
The items to add to the list
Thrown if item argument is null
Thrown if the item passed in or the collection itself instance is in ReadOnly state
Thrown if the item that is being added already belongs to another ItemCollection
Thrown if the ItemCollection already contains an item with the same identity
Returns a strongly typed object by using the specified identity.
The item that is specified by the identity.
The identity of the item.
The type returned by the method.
Returns a strongly typed object by using the specified identity from this item collection.
true if there is an item that matches the search criteria; otherwise, false.
The identity of the item.
When this method returns, the output parameter contains a
object. If there is no global item with the specified identity in the item collection, this output parameter contains null.
The type returned by the method.
Returns a strongly typed object by using the specified identity from this item collection.
true if there is an item that matches the search criteria; otherwise, false.
The identity of the item.
true to perform the case-insensitive search; otherwise, false.
When this method returns, the output parameter contains a
object. If there is no global item with the specified identity in the item collection, this output parameter contains null.
The type returned by the method.
Returns a strongly typed object by using the specified identity with either case-sensitive or case-insensitive search.
The item that is specified by the identity.
The identity of the item.
true to perform the case-insensitive search; otherwise, false.
The type returned by the method.
Returns all the items of the specified type from this item collection.
A collection of type that contains all the items of the specified type.
The type returned by the method.
Returns an object by using the specified type name and the namespace name in this item collection.
An object that represents the type that matches the specified type name and the namespace name in this item collection. If there is no matched type, this method returns null.
The name of the type.
The namespace of the type.
Returns an object by using the specified type name and the namespace name from this item collection.
true if there is a type that matches the search criteria; otherwise, false.
The name of the type.
The namespace of the type.
When this method returns, this output parameter contains an
object. If there is no type with the specified name and namespace name in this item collection, this output parameter contains null.
Returns an object by using the specified type name and the namespace name from this item collection.
An object that represents the type that matches the specified type name and the namespace name in this item collection. If there is no matched type, this method returns null.
The name of the type.
The namespace of the type.
true to perform the case-insensitive search; otherwise, false.
Returns an object by using the specified type name and the namespace name from this item collection.
true if there is a type that matches the search criteria; otherwise, false.
The name of the type.
The namespace of the type.
true to perform the case-insensitive search; otherwise, false.
When this method returns, this output parameter contains an
object. If there is no type with the specified name and namespace name in this item collection, this output parameter contains null.
Returns all the overloads of the functions by using the specified name from this item collection.
A collection of type that contains all the functions that have the specified name.
The full name of the function.
Returns all the overloads of the functions by using the specified name from this item collection.
A collection of type that contains all the functions that have the specified name.
The full name of the function.
true to perform the case-insensitive search; otherwise, false.
Returns all the overloads of the functions by using the specified name from this item collection.
A collection of type ReadOnlyCollection that contains all the functions that have the specified name.
A dictionary of functions.
The full name of the function.
true to perform the case-insensitive search; otherwise, false.
Gets the function as specified by the function key.
All parameters are assumed to be .
Name of the function
types of the parameters
true for case-insensitive lookup
The function that needs to be returned
The function as specified in the function key or null
if functionName or parameterTypes argument is null
if no function is found with the given name or with given input parameters
Returns an object by using the specified entity container name.
If there is no entity container, this method returns null; otherwise, it returns the first one.
The name of the entity container.
Returns an object by using the specified entity container name. If there is no entity container, the output parameter contains null; otherwise, it contains the first entity container.
true if there is an entity container that matches the search criteria; otherwise, false.
The name of the entity container.
When this method returns, it contains an object. If there is no entity container, this output parameter contains null; otherwise, it contains the first entity container.
Returns an object by using the specified entity container name.
If there is no entity container, this method returns null; otherwise, it returns the first entity container.
The name of the entity container.
true to perform the case-insensitive search; otherwise, false.
Returns an object by using the specified entity container name. If there is no entity container, this output parameter contains null; otherwise, it contains the first entity container.
true if there is an entity container that matches the search criteria; otherwise, false.
The name of the entity container.
true to perform the case-insensitive search; otherwise, false.
When this method returns, it contains an object. If there is no entity container, this output parameter contains null; otherwise, it contains the first entity container.
Given the canonical primitive type, get the mapping primitive type in the given dataspace
canonical primitive type
The mapped scalar type
Determines whether this item collection is equivalent to another. At present, we look only
at object reference equivalence. This is a somewhat reasonable approximation when caching
is enabled, because collections are identical when their source resources (including
provider) are known to be identical.
Collection to compare.
true if the collections are equivalent; false otherwise
Gets the data model associated with this item collection.
The data model associated with this item collection.
Return the function lookUpTable
EntityRecordInfo class providing a simple way to access both the type information and the column information.
Initializes a new instance of the class of a specific entity type with an enumerable collection of data fields and with specific key and entity set information.
The of the entity represented by the
described by this
object.
An enumerable collection of objects that represent column information.
The key for the entity.
The entity set to which the entity belongs.
Reusing TypeUsage and FieldMetadata from another EntityRecordInfo which has all the same info
but with a different EntityKey instance.
Gets the for the entity.
The key for the entity.
AST node for an aliased expression.
Represents base class for nodes in the eSQL abstract syntax tree OM.
Ast Node error context.
Constructs an aliased expression node.
Constructs an aliased expression node with null alias.
Returns expression alias identifier, or null if not aliased.
Represents apply expression.
Initializes apply clause item.
Returns apply left expression.
Returns apply right expression.
Returns apply kind (cross,outer).
Represents apply kind (cross,outer).
An ast node represents a generic list of ast nodes.
Default constructor.
Initializes adding one item to the list.
expression
Add an item to the list, return the updated list.
Returns the number of elements in the list.
Indexer to the list entries.
integer position of the element in the list
Represents a builtin expression ast node.
Defines the function class of builtin expressions.
Represents the Seached Case Expression - CASE WHEN THEN [ELSE] END.
Initializes case expression without else sub-expression.
whenThen expression list
Initializes case expression with else sub-expression.
whenThen expression list
else expression
Returns the list of WhenThen expressions.
Returns the optional Else expression.
Represents an ast node for a collection type definition.
Initializes collection type definition using the element type definition.
Returns collection element type defintion.
Represents eSQL command as node.
Initializes eSQL command.
optional namespace imports
command statement
Returns optional namespace imports. May be null.
Returns command statement.
Represents DEREF(epxr) expression.
Initializes DEREF expression node.
Ieturns ref argument expression.
Represents KEY(expr) expression.
Initializes KEY expression.
Returns KEY argument expression.
Represents multiset constructor expression.
Returns list of elements as alias expressions.
Represents CREATEREF(entitySet, keys) expression.
Initializes CreateRefExpr.
expression representing the entity set
Initializes CreateRefExpr.
Returns the expression for the entity set.
Returns the expression for the keys.
Gets optional typeidentifier. May be null.
Represents distinct kind (none=all,all,distinct).
Represents dotExpr: expr.Identifier
initializes
Returns true if all parts of this expression are identifiers like in "a.b.c",
false for expressions like "FunctionCall().a.b.c".
For the following expression: "a.b.c.d", Left returns "a.b.c".
For the following expression: "a.b.c.d", Identifier returns "d".
Represents from clause.
Initializes from clause.
List of from clause items.
Represents single from clause item.
Initializes as 'simple' aliased expression.
Initializes as join clause item.
Initializes as apply clause item.
From clause item expression.
From clause item kind (alias,join,apply).
From clause item kind.
Represents an ast node for an inline function definition.
Initializes function definition using the name, the optional argument definitions and the body expression.
Returns function name.
Returns optional parameter definition list. May be null.
Returns function body.
Returns start position of the function definition in the command text.
Returns end position of the function definition in the command text.
Base class for and .
True if it is a "distinct" aggregate.
Represents group by clause.
Initializes GROUP BY clause
Group items.
Represents GROUPPARTITION(expr) expression.
Initializes GROUPPARTITION expression node.
Return GROUPPARTITION argument expression.
Represents having clause.
Initializes having clause.
Returns having inner expression.
True if predicate has method calls.
Represents an identifier ast node.
Initializes identifier.
Returns identifier name (without escaping chars).
True if an identifier is escaped.
Represents join clause item.
Initializes join clause item without ON expression.
Initializes join clause item with ON expression.
Returns join left expression.
Returns join right expression.
Join kind (cross, inner, full, left outer,right outer).
Returns join on expression.
Represents join kind (cross,inner,leftouter,rightouter).
Represents a literal ast node.
Initializes a literal ast node.
literal value in cql string representation
literal value class
query
input position
Static factory to create boolean literals by value only.
Prefix a numeric literal with a sign.
Performs conversion of numeric strings that have no type suffix hint.
Converts boolean literal value.
Returns the string literal value.
Converts hex string to byte array.
Parse single hex char.
PRECONDITION - hexChar must be a valid hex digit.
Converts datetime literal value.
Converts time literal value.
Converts guid literal value.
True if literal is a number.
True if literal is a signed number.
True if literal is a string.
True if literal is a unicode string.
True if literal is the eSQL untyped null.
Returns the original literal value.
Returns literal converted value.
Returns literal value type. If value is eSQL untyped null, returns null.
Defines literal value kind, including the eSQL untyped NULL.
Represents invocation expression: expr(...)
Initializes method ast node.
Intializes a method ast node with relationships.
For the following expression: "a.b.c.Foo()", returns "a.b.c.Foo".
Argument list.
True if there are associated relationship expressions.
Optional relationship list.
Represents an ast node for namespace import (using nsABC;)
Initializes a single name import.
Initializes a single name import.
Initializes aliased import.
Returns ns alias id if exists.
Returns namespace name.
Represents a relationship navigation operator NAVIGATE(sourceRefExpr, Relationship-Type-Name [,ToEndName [,FromEndName]]).
Also used in WITH RELATIONSHIP clause as RELATIONSHIP(targetRefExpr, Relationship-Type-Name [,FromEndName [,ToEndName]]).
Initializes relationship navigation expression.
Entity reference expression.
Relship type name.
TO end identifier.
FROM end identifier.
Represents order by clause.
Initializes order by clause.
Returns order by clause items.
Returns skip sub clause ast node.
Returns limit sub-clause ast node.
True if order by has method calls.
Represents a order by clause item.
Initializes non-collated order by clause item.
Initializes collated order by clause item.
optional Collation identifier
Oeturns order expression.
Returns order kind (none,asc,desc).
Returns collattion identifier if one exists.
Represents order kind (none=asc,asc,desc).
Represents a paren expression ast node.
Initializes paren expression.
Returns the parenthesized expression.
Represents a query expression ast node.
Initializes a query expression ast node.
select clause
from clasuse
optional where clause
optional group by clause
optional having clause
optional order by clause
Returns select clause.
Returns from clause.
Returns optional where clause (expr).
Returns optional group by clause.
Returns optional having clause (expr).
Returns optional order by clause.
Returns true if method calls are present.
Represents an ast node for a query parameter.
Initializes parameter
Thrown if the parameter name does not conform to the expected format
Returns parameter parameterName (without @ sign).
Represents query statement AST.
Represents base class for the following statements:
- QueryStatement
- InsertStatement
- UpdateStatement
- DeleteStatement
Initializes query statement.
optional function definitions
query top level expression
Returns optional function defintions. May be null.
Returns query top-level expression.
Represents REF(expr) expression.
Initializes REF expression node.
Return ref argument expression.
Represents an ast node for a reference type definition.
Initializes reference type definition using the referenced type identifier.
Returns referenced type identifier.
Represents Row contructor expression.
Returns list of elements as aliased expressions.
Represents an ast node for a row type definition.
Initializes row type definition using the property definitions.
Returns property definitions.
Represents select clause.
Initialize SelectKind.SelectRow clause.
Projection list.
Select kind (row or value).
Distinct kind (none,all,distinct).
Optional top expression.
True if select list has method calls.
Represents select kind (value,row).
Represents an ast node for a property definition (name/type)
Initializes property definition using the name and the type definition.
Returns property name.
Returns property type.
Represents the when then sub expression.
Initializes WhenThen sub-expression.
When expression
Then expression
Returns When expression.
Returns Then Expression.
Error reporting Helper
Reports function overload resolution error.
provides error feedback for aliases already used in a given context
Reports incompatible type error
navigates through the type structure to find where the incompatibility happens
Represents Cql scanner and helper functions.
set for DOT expressions
set for AS expressions
set for function definitions
Defines the set of characters to be interpreted as mandatory line breaks
according to UNICODE 5.0, section 5.8 Newline Guidelines.These are 'mandatory'
line breaks. We do not handle other 'line breaking opportunities'as defined by
UNICODE 5.0 since they are intended for presentation. The mandatory line break
defines breaking opportunities that must not be ignored. For all practical purposes
the interpretation of mandatory breaks determines the end of one line and consequently
the start of the next line of query text.
NOTE that CR and CRLF is treated as a composite 'character' and was obviously and intentionaly
omitted in the character set bellow.
Intializes scanner
input query
parser options
Creates a new token.
tokenid
ast node
Creates a new token representing a terminal.
tokenid
lexical value
Advances input position.
updated input position
returns true if given term is a eSQL keyword
Map lexical symbol to a keyword or an identifier.
lexeme
Token
Returns true when current symbol looks like a caninical function name in a function call.
Method only treats canonical functions with names ovelapping eSQL keywords.
This check allows calling these canonical functions without escaping their names.
Check lookAheadChar for a left paren to see if looks like a function call, check symbol against the list of
canonical functions with names overlapping keywords.
Skip insignificant whitespace to reach the first potentially significant char.
Resets "symbol as identifier" state.
see function callers for more info
Maps operator to respective token
operator lexeme
Token
Maps punctuator to respective token
punctuator
Token
Maps double quoted string to a literal or an idendifier
Token
Creates literal token
literal
literal kind
Literal Token
Creates parameter token
param
Parameter Token
handles escaped identifiers
ch will always be translated i.e. normalized.
Returns true if given char is a new line character defined by
UNICODE 5.0, section 5.8 Newline Guidelines.
These are 'mandatory' line breaks. NOTE that CRLF is treated as a
composite 'character' and was intentionaly omitted in the character set bellow.
extracts single quoted literal 'payload'. literal MUST BE normalized.
returns true if guid literal value format is valid
returns true if binary literal value format is valid
Returns true if datetime literal value format is valid
allowed format is: dddd-d?d-d?d{space}+d?d:d?d(:d?d(.d?d?d)?)?
where d is any decimal digit.
Returns true if time literal value format is valid
allowed format is: +d?d:d?d(:d?d(.d?d?d)?)?
where d is any decimal digit.
Returns true if datetimeoffset literal value format is valid
allowed format is: dddd-d?d-d?d{space}+d?d:d?d(:d?d(.d?d?d)?)?([+-]d?d:d?d)?
where d is any decimal digit.
Returns current lexeme
Returns current input position
Represents a token to be used in parser stack.
Represents a terminal token
Represents the Cql Parser engine. Also, implements helpers and util routines.
Contains inclusive count of method expressions.
Main entry point for parsing cql.
query text
Thrown when Syntatic rules are violated and the query cannot be accepted
Abstract Syntax Tree
Internal entry point
Returns query string
Returns ParserOptions used
Once parse has been invoked, ParserOptions are frozen and cannot be changed. otherwise a EntityException exception will be thrown
Provides eSQL text Parsing and Compilation services.
This class exposes services that perform syntactic and semantic analysis of eSQL commands.
The syntactic validation ensures the given command conforms to eSQL formal grammar. The semantic analysis will
perform (list not exhaustive): type resolution and validation, ensure semantic and scoping rules, etc.
The services exposed by this class are:
-
Translation from eSQL text commands to valid
s
-
Translation from eSQL text commands to valid
s
Queries can be formulated in O-Space, C-Space and S-Space and the services exposed by this class are agnostic of the especific typespace or
metadata instance passed as required parameter in the semantic analysis by the perspective parameter. It is assumed that the perspective and
metadata was properly initialized.
Provided that the command is syntacticaly correct and meaningful within the given typespace, the result will be a valid
or
otherwise EntityException will be thrown indicating the reason(s) why the given command cannot be accepted.
It is also possible that MetadataException and MappingException be thrown if mapping or metadata related problems are encountered during compilation.
-
-
-
Compiles an eSQL command producing a validated .
eSQL command text
perspective
parser options
ordinary parameters
A parse result with the command tree produced by parsing the given command.
Thrown when Syntatic or Semantic rules are violated and the query cannot be accepted
Thrown when metadata related service requests fail
Thrown when mapping related service requests fail
This method is not thread safe.
Compiles an eSQL query command producing a validated .
eSQL query command text
perspective
parser options
ordinary command parameters
command free variables
The query expression tree produced by parsing the given query command.
Thrown when Syntatic or Semantic rules are violated and the query expression cannot be accepted
Thrown when metadata related service requests fail
Thrown when mapping related service requests fail
This method is not thread safe.
Parse eSQL command string into an AST
eSQL command
parser options
Ast
Thrown when Syntatic or Semantic rules are violated and the query cannot be accepted
This method is not thread safe.
Performs semantic conversion, validation on a command AST and creates a
Abstract Syntax Tree of the command
perspective
parser options
ordinary command parameters
a parse result with a valid command tree
Parameters name/types must be bound before invoking this method
Thrown when Syntatic or Semantic rules are violated and the query cannot be accepted.
Thrown as inner exception of a EntityException when metadata related service requests fail.
Thrown as inner exception of a EntityException when mapping related service requests fail.
This method is not thread safe.
Performs semantic conversion, validation on a query command AST and creates a
Abstract Syntax Tree of the query command
perspective
parser options
ordinary command parameters
command free variables
Parameters name/types must be bound before invoking this method
Thrown when Syntatic or Semantic rules are violated and the query cannot be accepted.
Thrown as inner exception of a EntityException when metadata related service requests fail.
Thrown as inner exception of a EntityException when mapping related service requests fail.
This method is not thread safe.
Represents an utility for creating anonymous IDisposable implementations.
Represents an eSQL expression classified as .
Abstract class representing the result of an eSQL expression classification.
Public Entity SQL Parser class.
Construct a parser bound to the specified workspace with the specified perspective.
Parse the specified query with the specified parameters.
The containing
and information describing inline function definitions if any.
The EntitySQL query to be parsed.
The optional query parameters.
Parse a specific query with a specific set variables and produce a
.
The containing
and information describing inline function definitions if any.
The query to be parsed.
The optional query variables.
Represents eSQL error context.
Represents the position of the error in the input stream.
Represents the additional/contextual information related to the error position/cause.
Defines how ErrorContextInfo should be interpreted.
Represents a referece to the original command text.
Represents eSQL expression class.
A value expression such as a literal, variable or a value-returning expression.
An expression returning an entity container.
An expression returning a metadata member such as a type, function group or namespace.
Represents group aggregate information during aggregate construction/resolution.
Updates referenced scope index of the aggregate.
Function call is not allowed after has been called.
Validates the aggregate info and computes property.
Seals the aggregate info object (no more AddContainedAggregate(...), RemoveContainedAggregate(...) and UpdateScopeIndex(...) calls allowed).
Recursively validates that of all contained aggregates
is outside of the range of scope regions defined by and
.
Throws in the case of violation.
Function call is not allowed after has been called.
Adding new contained aggregate may invalidate the current aggregate.
Function call is _allowed_ after has been called.
Removing contained aggregates cannot invalidate the current aggregate.
Consider the following query:
select value max(a + anyelement(select value max(b + max(a + anyelement(select value c1
from {2} as c group by c as c1)))
from {1} as b group by b as b1))
from {0} as a group by a as a1
Outer aggregate - max1, middle aggregate - max2, inner aggregate - max3.
In this query after max1 have been processed as a collection function, max2 and max3 are wired as containing/contained.
There is a point later when max1 is processed as an aggregate, max2 is processed as a collection function and max3 is processed as
an aggregate. Note that at this point the "aggregate" version of max2 is dropped and detached from the AST node when the middle scope region
completes processing; also note that because evaluating scope region of max3 is the outer scope region, max3 aggregate info is still attached to
the AST node and it is still wired to the dropped aggregate info object of max2. At this point max3 does not see new max2 as a containing aggregate,
and it rewires to max1, during this rewiring it needs to to remove itself from the old max2 and add itself to max1.
The old max2 at this point is sealed, so the removal is performed on the sealed object.
Null when is created for a group key processing.
Scope region that contains the aggregate expression.
Gets/sets the innermost referenced scope region of the current aggregate.
This property is used to save/restore the scope region value during a potentially throw-away attempt to
convert an as a collection function in the
method.
Setting the value is not allowed after has been called.
Scope region that evaluates the aggregate expression.
Parent aggregate expression that contains the current aggregate expression.
May be null.
Entity SQL query inline function definition, returned as a part of .
Function name.
Function body and parameters.
Start position of the function definition in the eSQL query text.
End position of the function definition in the eSQL query text.
Represents function overload resolution mechanism, used by L2E and eSQL frontends.
Resolves against the list of function signatures.
Funciton metadata
Resolves against the list of function signatures.
Funciton metadata
Resolves against the list of function signatures.
function formal signature getter
TypeUsage getter for a signature param
ParameterMode getter for a signature param
Funciton metadata
Check promotability, returns true if argument list is promotable to the overload and overload was successfully ranked, otherwise false.
Ranks the overload parameter types against the argument list.
list of argument types
flattened list of argument types
list of overload parameter types
TypeUsage getter for the overload parameters
ParameterMode getter for the overload parameters
returns total promotion rank of the overload, 0 if no arguments
returns individual promotion ranks of the overload parameters, empty array if no arguments
Ranks the -> promotion.
Range of values: 0 to negative infinity, with 0 as the best rank (promotion to self).
must be promotable to , otherwise internal error is thrown.
Inside of an aggregate function (Max, Min, etc).
All range variables originating on the defining scope of this aggregate should yield
.
Inside of GROUPPARTITION expression.
All range variables originating on the defining scope of this aggregate should yield
.
Inside of a group key definition
All range variables originating on the defining scope of this aggregate should yield
.
Represents group key during GROUP BY clause processing phase, used during group aggregate search mode.
This entry will be replaced by the when GROUP BY processing is complete.
Represents an entry in the scope.
Returns CQT expression corresponding to the scope entry.
Returns based expression during the
construction process, otherwise null.
Returns based expression during the construction process, otherwise null.
If current scope entry reperesents an alternative group key name (see SemanticAnalyzer.ProcessGroupByClause(...) for more info)
then this property returns the alternative name, otherwise null.
Represents an eSQL metadata member expression classified as .
Abstract class representing an eSQL expression classified as .
Return the name of the for error messages.
Represents a group input scope entry that should no longer be referenced.
Represents an eSQL metadata member expression classified as .
Represents an eSQL metadata member expression classified as .
Represents eSQL metadata member expression class.
Represents an eSQL metadata member expression classified as .
Represents an eSQL metadata member expression classified as .
Represents a pair of types to avoid uncessary enumerations to split kvp elements
Entity SQL Parser result information.
A command tree produced during parsing.
List of objects describing query inline function definitions.
Represents eSQL compilation options.
Sets/Gets eSQL parser compilation mode.
Normal mode. Compiles eSQL command without restrictions.
Name resolution is case-insensitive (eSQL default).
View generation mode: optimizes compilation process to ignore uncessary eSQL constructs:
- GROUP BY, HAVING and ORDER BY clauses are ignored.
- WITH RELATIONSHIP clause is allowed in type constructors.
- Name resolution is case-sensitive.
Same as CompilationMode.Normal plus WITH RELATIONSHIP clause is allowed in type constructors.
Represents a scope of key-value pairs.
Initialize using a given key comparer.
Add new key to the scope. If key already exists - throw.
Remove an entry from the scope.
Returns true if the key belongs to the scope.
Search item by key. Returns true in case of success and false otherwise.
Represents a group input scope entry that should no longer be referenced.
True if given scope is in the current scope region.
Marks current scope region as performing group/folding operation.
Clears the flag on the group scope.
Adds group aggregate name to the scope region.
Applies to all scope entries in the current scope region.
Applies to all scope entries in the current scope region.
First scope of the region.
Index of the scope region.
Outer scope regions have smaller index value than inner scope regions.
True when the scope region performs group/folding operation.
Returns list of group aggregates evaluated on the scope region.
True if a recent expression resolution was correlated.
Implements Semantic Analysis and Conversion
Provides the translation service between an abstract syntax tree to a canonical command tree
For complete documentation of the language syntax and semantics, refer to http://sqlweb/default.asp?specDirId=764
The class was designed to be edmType system agnostic by delegating to a given SemanticResolver instance all edmType related services as well as to TypeHelper class, however
we rely on the assumption that metadata was pre-loaded and is relevant to the query.
Initializes semantic analyzer
initialized SemanticResolver instance for a given typespace/edmType system
Entry point to semantic analysis. Converts AST into a .
ast command tree
Thrown when Syntatic or Semantic rules are violated and the query cannot be accepted
Thrown when metadata related service requests fail
Thrown when mapping related service requests fail
ParseResult with a valid DbCommandTree
Converts query command AST into a .
ast command tree
Thrown when Syntatic or Semantic rules are violated and the query cannot be accepted
Thrown when metadata related service requests fail
Thrown when mapping related service requests fail
DbExpression
Converts namespace imports and adds them to the edmType resolver.
Dispatches/Converts statement expressions.
SemanticResolver instance relative to a especif typespace/system
Converts query statement AST to a
SemanticResolver instance relative to a especif typespace/system
Converts the query statement to a normalized and validated .
This entry point to the semantic analysis phase is used when producing a
query command tree or producing only a .
The query statement
The instance to use
An instance of , adjusted to handle 'inline' projections and validated to produce a result edmType appropriate for the root of a query command tree.
Ensures that the result of a query expression is valid.
Converts query inline function defintions. Returns empty list in case of no definitions.
Converts general expressions (AST.Node)
Converts general expressions (AST.Node) to a .
Returns .
Throws if conversion resulted an a non resolution.
Throws if conversion resulted in the untyped null.
Converts general expressions (AST.Node) to a .
Returns .
Returns null if expression is the untyped null.
Throws if conversion resulted an a non resolution.
Converts left and right expressions. If any of them is the untyped null, derives the edmType and converts to a typed null.
Throws if conversion is not possible.
Converts literal expression (AST.Literal)
Converts identifier expression (Identifier)
Converts member access expression (AST.DotExpr)
Converts paren expression (AST.ParenExpr)
Converts GROUPPARTITION expression (AST.GroupPartitionExpr).
Converts invocation expression (AST.MethodExpr)
If methodExpr.Expr is in the form of "Name1.Name2(...)" then ignore entity containers during resolution of the left expression
in the context of the invocation: "EntityContainer.EntitySet(...)" is not a valid expression and it should not shadow
a potentially valid interpretation as "Namespace.EntityType/Function(...)".
If methodExpr.Expr is in the form of "Name1.Name2(...)"
and we are in the view generation mode
and schema version is less than V2
then ignore types in the resolution of Name1.
This is needed in order to support the following V1 case:
C-space edmType: AdventureWorks.Store
S-space edmType: [AdventureWorks.Store].Customer
query: select [AdventureWorks.Store].Customer(1, 2, 3) from ...
Attempts to create a representing the inline function call.
Returns false if .DistinctKind != .None.
Returns false if no one of the overloads matched the given arguments.
Throws if given arguments cause overload resolution ambiguity.
Converts group aggregates.
This method converts group aggregates in two phases:
Phase 1 - it will resolve the actual inner (argument) expression and then anotate the ast node and add the resolved aggregate
to the scope
Phase 2 - if ast node was annotated, just extract the precomputed expression from the scope.
Try to convert as pre resolved group aggregate.
Try convert method expr in a group scope as a collection aggregate
argTypes are returned regardless of the function result
Creates representing a new instance of the given edmType.
Validates and infers argument types.
Creates representing a model function call.
Validates overloads.
Converts function call arguments into a list of s.
In case of no arguments returns an empty list.
Converts command parameter reference expression (AST.QueryParameter)
Converts WITH RELATIONSHIP (AST.RelshipNavigationExpr)
the ast expression
The entity that is being constructed for with this RELATIONSHIP clause is processed.
the Semantic Resolver context
a DbRelatedEntityRef instance
Converts relationship navigation expression (AST.RelshipNavigationExpr)
Converts REF expression (AST.RefExpr)
Converts DEREF expression (AST.DerefExpr)
Converts CREATEREF expression (AST.CreateRefExpr)
Converts KEY expression (AST.KeyExpr)
Converts a builtin expression (AST.BuiltInExpr).
Converts Arithmetic Expressions Args
SemanticResolver instance relative to a especif typespace/system
Converts Plus Args - specific case since string edmType is an allowed edmType for '+'
SemanticResolver instance relative to a especif typespace/system
Converts Logical Expression Args
SemanticResolver instance relative to a especif typespace/system
Converts Equal Comparison Expression Args
SemanticResolver instance relative to a especif typespace/system
Converts Order Comparison Expression Args
SemanticResolver instance relative to a especif typespace/system
Converts Set Expression Args
SemanticResolver instance relative to a especif typespace/system
Converts Set 'IN' expression args
SemanticResolver instance relative to a especif typespace/system
Converts a edmType name.
Type name can be represented by
- AST.Identifier, such as "Product"
- AST.DotExpr, such as "Northwind.Product"
- AST.MethodExpr, such as "Edm.Decimal(10,4)", where "10" and "4" are edmType arguments.
Converts row constructor expression (AST.RowConstructorExpr)
Converts multiset constructor expression (AST.MultisetConstructorExpr)
Converts case-when-then expression (AST.CaseExpr)
Converts query expression (AST.QueryExpr)
Process Select Clause
Process FROM clause.
Process generic FROM clause item: aliasedExpr, JoinClauseItem or ApplyClauseItem.
Returns and the list with entries created by the clause item.
Process a simple FROM clause item.
Returns and the list with a single entry created for the clause item.
Process a JOIN clause item.
Returns and the list with a join-left and join-right entries created for the clause item.
Maps to .
Process an APPLY clause item.
Returns and the list with an apply-left and apply-right entries created for the clause item.
Maps to .
Process WHERE clause.
Process HAVING clause.
Process WHERE or HAVING clause predicate.
Process Group By Clause
Generates the list of projections for GROUPPARTITION definitions.
All GROUPPARTITION definitions over the trivial projection of input are reduced to the value of groupAggregateVarRef,
only one projection item is created for such definitions.
Returns null if all GROUPPARTITION definitions are reduced to the value of groupAggregateVarRef.
Returns true if lambda accepts a collection variable and trivially projects out its elements.
Process ORDER BY clause.
Convert "x in multiset(y1, y2, ..., yn)" into
x = y1 or x = y2 or x = y3 ...
left-expression (the probe)
right expression (the collection)
Or tree of equality comparisons
The primary name of the group key. It is used to refer to the key from other expressions.
Optional alternative name of the group key.
Used to support the following scenario:
SELECT Price, p.Price FROM ... as p GROUP BY p.Price
In this case the group key Name is "Price" and the AlternativeName is "p.Price" as if it is coming as an escaped identifier.
Implements the semantic resolver in the context of a metadata workspace and typespace.
not thread safe
Creates new instance of .
Creates a copy of with clean scopes and shared inline function definitions inside of the type resolver.
Validates that the specified parameters have valid, non-duplicated names
The set of query parameters
A valid dictionary that maps parameter names to s using the current NameComparer
Validates that the specified variables have valid, non-duplicated names
The set of free variables
A valid dictionary that maps variable names to s using the current NameComparer
Returns the appropriate expression from a given scope entry.
May return null for scope entries like .
Performs scope lookup returning the scope entry and its index.
Resolve property off the .
Try resolving as a property of the value returned by the .
If returns a reference, then deref and try resolving as a property of the dereferenced value.
Resolve entity set or function import in the
Resolve namespace, type or function in the
Try resolving an internal aggregate name.
Try resolving multipart identifier as an alternative name of a group key (see SemanticAnalyzer.ProcessGroupByClause(...) for more info).
Generates unique internal name.
Creates a new alias name based on the information.
Returns alias name from ast node if it contains an alias,
otherwise creates a new alias name based on the .Expr or
information.
Enters a new scope region.
Rollback all scopes above the .
Enter a new scope.
Leave the current scope.
Returns true if any of the ScopeRegions from the closest to the outermost has IsAggregating = true
Sets the scope region correlation flag based on the scope index of the referenced scope entry.
Enters processing of a function group aggregate.
Enters processing of a group partition aggregate.
Enters processing of a group partition aggregate.
Returns ordinary command parameters. Empty dictionary in case of no parameters.
Returns command free variables. Empty dictionary in case of no variables.
TypeSpace/Metadata/Perspective dependent type resolver.
Returns current Parser Options.
Returns the current string comparer.
Returns the list of scope regions: outer followed by inner.
Returns the current scope region.
Returns the current scope.
Returns index of the current scope.
Returns the current group aggregate info when processing group aggregate argument.
Represents simple source var scope entry.
Prepend to the property chain.
Replace existing var at the head of the property chain with the new .
Rebuild the current scope entry expression as the property chain off the expression.
Also build
- off the expression;
- off the expression.
This adjustment is reversable by (...).
Rolls back the (...) adjustment, clears the
.
Represents a projection item definition scope entry.
Represents a free variable scope entry.
Example: parameters of an inline function definition are free variables in the scope of the function definition.
Represents a generic list of scopes.
Initialize scope manager using given key-string comparer.
Enter a new scope.
Leave the current scope.
Get a scope by the index.
Rollback all scopes to the scope at the index.
True if key exists in current scope.
Return current scope index.
Outer scopes have smaller index values than inner scopes.
Return current scope.
Represents eSQL type and namespace name resolver.
name -> list(overload)
Initializes TypeResolver instance
Adds an aliased namespace import.
Adds a non-aliased namespace import.
Declares inline function in the query local metadata.
Try get type from the model using the fully qualified name.
Try get function from the model using the fully qualified name.
Try get function from the local metadata using the fully qualified name.
Builds a dot-separated multipart identifier off the provided .
Returns perspective.
Returns namespace imports.
Returns for .
Returns for .
Returns for .
Represents an eSQL expression classified as .
Null if represents the untyped null.
Zips two enumerables together (e.g., given {1, 3, 5} and {2, 4, 6} returns {{1, 2}, {3, 4}, {5, 6}})
Returns true if the type implements ICollection<>
Helper method to determine the element type of the collection contained by the given property.
If an unambiguous element type cannot be found, then an InvalidOperationException is thrown.
This is used when we need to determine a concrete collection type given some type that may be
abstract or an interface.
The rules are:
If the collection is defined as a concrete type with a publicly accessible parameterless constructor, then create an instance of that type
Else, if HashSet{T} can be assigned to the type, then use HashSet{T}
Else, if List{T} can be assigned to the type, then use List{T}
Else, throw a nice exception.
The type of collection that was requested
The type to instantiate, or null if we cannot find a supported type to instantiate
Returns the Type object that should be used to identify the type in the o-space
metadata. This is normally just the type that is passed in, but if the type
is a proxy that we have generated, then its base type is returned instead.
This ensures that both proxy entities and normal entities are treated as the
same kind of entity in the metadata and places where the metadata is used.
Provides a standard helper method for quoting identifiers
Identifier to be quoted. Does not validate that this identifier is valid.
Quoted string
Returns the PropertyInfo and Type where a given property is defined
This is done by traversing the type hierarchy to find the type match.
You must never renumber these, because we rely upon them when
we get an exception report once we release the bits.
Some assertion failed
Thrown when SQL gen produces parameters for anything other than a
modification command tree.
Thrown when an invalid data request is presented to a PropagatorResult in
the update pipeline (confusing simple/complex values, missing key values, etc.).
Thrown when the update pipeline encounters an invalid PrimitiveTypeKind
during a cast.
Thrown when an unknown node type is encountered in ELinq expression translation.
Thrown by result assembly upon encountering a collection column that does not use any columns
nor has a descriminated nested collection.
Thrown when a lambda expression argument has an unexpected node type.
Thrown when a CommandTree is defined on a stored procedure EntityCommand instance.
Thrown when an operation in the BoolExpr library is exceeding anticipated complexity.
Thrown when type A is promotable to type B, but ranking algorithm fails to rank the promotion.
Compares objects using reference equality.
The primary factory method to produce the BridgeDataReader; given a store data
reader and a column map, create the BridgeDataReader, hooking up the IteratorSources
and ResultColumn Hierarchy. All construction of top level data readers go through
this method.
column map of the first result set
enumerable of the column maps for NextResult() calls.
Wraps access to the transaction object on the underlying store connection and ensures that the
Entity Framework executes commands on the database within the context of that transaction.
An instance of this class is retrieved by calling BeginTransaction() on the
object.
Constructs the DbContextTransaction object with the associated connection object
The EntityConnection object owning this transaction
Constructs the DbContextTransaction object with the associated connection object
and with the given isolation level
The EntityConnection object owning this transaction
The database isolation level with which the underlying store transaction will be created
Commits the underlying store transaction
Rolls back the underlying store transaction
Cleans up this transaction object and ensures the Entity Framework
is no longer using that transaction.
Cleans up this transaction object
true to release both managed and unmanaged resources; false to release only unmanaged resources
Gets the database (store) transaction that is underlying this context transaction.
A service for obtaining the correct from a given
.
On .NET 4.5 the provider is publicly accessible from the connection. On .NET 4 the
default implementation of this service uses some heuristics to find the matching
provider. If these fail then a new implementation of this service can be registered
on to provide an appropriate resolution.
Returns the for the given connection.
The connection.
The provider factory for the connection.
A DbContext instance represents a combination of the Unit Of Work and Repository patterns such that
it can be used to query from a database and group together changes that will then be written
back to the store as a unit.
DbContext is conceptually similar to ObjectContext.
DbContext is usually used with a derived type that contains properties for
the root entities of the model. These sets are automatically initialized when the
instance of the derived class is created. This behavior can be modified by applying the
attribute to either the entire derived context
class, or to individual properties on the class.
The Entity Data Model backing the context can be specified in several ways. When using the Code First
approach, the properties on the derived context are used to build a model
by convention. The protected OnModelCreating method can be overridden to tweak this model. More
control over the model used for the Model First approach can be obtained by creating a
explicitly from a and passing this model to one of the DbContext constructors.
When using the Database First or Model First approach the Entity Data Model can be created using the
Entity Designer (or manually through creation of an EDMX file) and then this model can be specified using
entity connection string or an object.
The connection to the database (including the name of the database) can be specified in several ways.
If the parameterless DbContext constructor is called from a derived context, then the name of the derived context
is used to find a connection string in the app.config or web.config file. If no connection string is found, then
the name is passed to the DefaultConnectionFactory registered on the class. The connection
factory then uses the context name as the database name in a default connection string. (This default connection
string points to .\SQLEXPRESS on the local machine unless a different DefaultConnectionFactory is registered.)
Instead of using the derived context name, the connection/database name can also be specified explicitly by
passing the name to one of the DbContext constructors that takes a string. The name can also be passed in
the form "name=myname", in which case the name must be found in the config file or an exception will be thrown.
Note that the connection found in the app.config or web.config file can be a normal database connection
string (not a special Entity Framework connection string) in which case the DbContext will use Code First.
However, if the connection found in the config file is a special Entity Framework connection string, then the
DbContext will use Database/Model First and the model specified in the connection string will be used.
An existing or explicitly created DbConnection can also be used instead of the database/connection name.
A can be applied to a class derived from DbContext to set the
version of conventions used by the context when it creates a model. If no attribute is applied then the
latest version of conventions will be used.
Interface implemented by objects that can provide an instance.
The class implements this interface to provide access to the underlying
ObjectContext.
Gets the object context.
The object context.
Constructs a new context instance using conventions to create the name of the database to
which a connection will be made. The by-convention name is the full name (namespace + class name)
of the derived context class.
See the class remarks for how this is used to create a connection.
Constructs a new context instance using conventions to create the name of the database to
which a connection will be made, and initializes it from the given model.
The by-convention name is the full name (namespace + class name) of the derived context class.
See the class remarks for how this is used to create a connection.
The model that will back this context.
Constructs a new context instance using the given string as the name or connection string for the
database to which a connection will be made.
See the class remarks for how this is used to create a connection.
Either the database name or a connection string.
Constructs a new context instance using the given string as the name or connection string for the
database to which a connection will be made, and initializes it from the given model.
See the class remarks for how this is used to create a connection.
Either the database name or a connection string.
The model that will back this context.
Constructs a new context instance using the existing connection to connect to a database.
The connection will not be disposed when the context is disposed if
is false.
An existing connection to use for the new context.
If set to true the connection is disposed when the context is disposed, otherwise the caller must dispose the connection.
Constructs a new context instance using the existing connection to connect to a database,
and initializes it from the given model.
The connection will not be disposed when the context is disposed if
is false.
An existing connection to use for the new context.
The model that will back this context.
If set to true the connection is disposed when the context is disposed, otherwise the caller must dispose the connection.
Constructs a new context instance around an existing ObjectContext.
An existing ObjectContext to wrap with the new context.
If set to true the ObjectContext is disposed when the DbContext is disposed, otherwise the caller must dispose the connection.
Initializes the internal context, discovers and initializes sets, and initializes from a model if one is provided.
Discovers DbSets and initializes them.
This method is called when the model for a derived context has been initialized, but
before the model has been locked down and used to initialize the context. The default
implementation of this method does nothing, but it can be overridden in a derived class
such that the model can be further configured before it is locked down.
Typically, this method is called only once when the first instance of a derived context
is created. The model for that context is then cached and is for all further instances of
the context in the app domain. This caching can be disabled by setting the ModelCaching
property on the given ModelBuidler, but note that this can seriously degrade performance.
More control over caching is provided through use of the DbModelBuilder and DbContextFactory
classes directly.
The builder that defines the model for the context being created.
Internal method used to make the call to the real OnModelCreating method.
The model builder.
Returns a DbSet instance for access to entities of the given type in the context,
the ObjectStateManager, and the underlying store.
See the DbSet class for more details.
The type entity for which a set should be returned.
A set for the given entity type.
Returns a non-generic DbSet instance for access to entities of the given type in the context,
the ObjectStateManager, and the underlying store.
The type of entity for which a set should be returned.
A set for the given entity type.
See the DbSet class for more details.
Saves all changes made in this context to the underlying database.
The number of objects written to the underlying database.
Thrown if the context has been disposed.
Asynchronously saves all changes made in this context to the underlying database.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
A task that represents the asynchronous save operation.
The task result contains the number of objects written to the underlying database.
Thrown if the context has been disposed.
Asynchronously saves all changes made in this context to the underlying database.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
A to observe while waiting for the task to complete.
A task that represents the asynchronous save operation.
The task result contains the number of objects written to the underlying database.
Thrown if the context has been disposed.
Validates tracked entities and returns a Collection of containing validation results.
Collection of validation results for invalid entities. The collection is never null and must not contain null values or results for valid entities.
1. This method calls DetectChanges() to determine states of the tracked entities unless
DbContextConfiguration.AutoDetectChangesEnabled is set to false.
2. By default only Added on Modified entities are validated. The user is able to change this behavior
by overriding ShouldValidateEntity method.
Extension point allowing the user to override the default behavior of validating only
added and modified entities.
DbEntityEntry instance that is supposed to be validated.
true to proceed with validation; false otherwise.
Extension point allowing the user to customize validation of an entity or filter out validation results.
Called by .
DbEntityEntry instance to be validated.
User-defined dictionary containing additional info for custom validation. It will be passed to
and will be exposed as
. This parameter is optional and can be null.
Entity validation result. Possibly null when overridden.
Internal method that calls the protected ValidateEntity method.
DbEntityEntry instance to be validated.
Entity validation result. Possibly null when ValidateEntity is overridden.
Gets a object for the given entity providing access to
information about the entity and the ability to perform actions on the entity.
The type of the entity.
The entity.
An entry for the entity.
Gets a object for the given entity providing access to
information about the entity and the ability to perform actions on the entity.
The entity.
An entry for the entity.
Calls the protected Dispose method.
Disposes the context. The underlying is also disposed if it was created
is by this context or ownership was passed to this context when this context was created.
The connection to the database ( object) is also disposed if it was created
is by this context or ownership was passed to this context when this context was created.
true to release both managed and unmanaged resources; false to release only unmanaged resources.
Creates a Database instance for this context that allows for creation/deletion/existence checks
for the underlying database.
Returns the Entity Framework ObjectContext that is underlying this context.
Thrown if the context has been disposed.
Provides access to features of the context that deal with change tracking of entities.
An object used to access features that deal with change tracking.
Provides access to configuration options for the context.
An object used to access configuration options.
Provides access to the underlying InternalContext for other parts of the internal design.
Explicitly implemented by to prevent certain members from showing up
in the IntelliSense of scaffolded migrations.
Adds a custom to the migration.
Custom operation implementors are encouraged to create extension methods on
that provide a fluent-style API for adding new operations.
The operation to add.
A default implementation of that uses the
underlying provider to get the manifest token.
Note that to avoid multiple queries, this implementation using caching based on the actual type of
instance, the property,
and the property.
A service for getting a provider manifest token given a connection.
The class is used by default and makes use of the
underlying provider to get the token which often involves opening the connection.
A different implementation can be used instead by adding an
to that may use any information in the connection to return
the token. For example, if the connection is known to point to a SQL Server 2008 database then
"2008" can be returned without opening the connection.
Returns the manifest token to use for the given connection.
The connection for which a manifest token is required.
The manifest token to use.
A strategy that is used to execute a command or query against the database, possibly with logic to retry when a failure occurs.
Executes the specified operation.
A delegate representing an executable operation that doesn't return any results.
Executes the specified operation and returns the result.
The return type of .
A delegate representing an executable operation that returns the result of type .
The result from the operation.
Executes the specified asynchronous operation.
A function that returns a started task.
A cancellation token used to cancel the retry operation, but not operations that are already in flight
or that already completed successfully.
A task that will run to completion if the original task completes successfully (either the
first time or after retrying transient failures). If the task fails with a non-transient error or
the retry limit is reached, the returned task will become faulted and the exception must be observed.
Executes the specified asynchronous operation and returns the result.
The result type of the returned by .
A function that returns a started task of type .
A cancellation token used to cancel the retry operation, but not operations that are already in flight
or that already completed successfully.
A task that will run to completion if the original task completes successfully (either the
first time or after retrying transient failures). If the task fails with a non-transient error or
the retry limit is reached, the returned task will become faulted and the exception must be observed.
Indicates whether this might retry the execution after a failure.
Provides the base implementation of the retry mechanism for unreliable operations and transient conditions that uses
exponentially increasing delays between retries.
A new instance will be created each time an operation is executed.
The following formula is used to calculate the delay after retryCount number of attempts:
min(random(1, 1.1) * (2 ^ retryCount - 1), maxDelay)
The retryCount starts at 0.
The random factor distributes uniformly the retry attempts from multiple simultaneous operations failing simultaneously.
The default number of retry attempts, must be nonnegative.
The default maximum random factor, must not be lesser than 1.
The default base for the exponential function used to compute the delay between retries, must be positive.
The default coefficient for the exponential function used to compute the delay between retries, must be nonnegative.
The default maximum time delay between retries, must be nonnegative.
Creates a new instance of .
The default retry limit is 5, which means that the total amount of time spent between retries is 26 seconds plus the random factor.
Creates a new instance of with the specified limits for number of retries and the delay between retries.
The maximum number of retry attempts.
The maximum delay in milliseconds between retries.
Repetitively executes the specified operation while it satisfies the current retry policy.
A delegate representing an executable operation that doesn't return any results.
if the retry delay strategy determines the operation shouldn't be retried anymore
if an existing transaction is detected and the execution strategy doesn't support it
if this instance was already used to execute an operation
Repetitively executes the specified operation while it satisfies the current retry policy.
The type of result expected from the executable operation.
A delegate representing an executable operation that returns the result of type .
The result from the operation.
if the retry delay strategy determines the operation shouldn't be retried anymore
if an existing transaction is detected and the execution strategy doesn't support it
if this instance was already used to execute an operation
Repetitively executes the specified asynchronous operation while it satisfies the current retry policy.
A function that returns a started task.
A cancellation token used to cancel the retry operation, but not operations that are already in flight
or that already completed successfully.
A task that will run to completion if the original task completes successfully (either the
first time or after retrying transient failures). If the task fails with a non-transient error or
the retry limit is reached, the returned task will become faulted and the exception must be observed.
if the retry delay strategy determines the operation shouldn't be retried anymore
if an existing transaction is detected and the execution strategy doesn't support it
if this instance was already used to execute an operation
Repeatedly executes the specified asynchronous operation while it satisfies the current retry policy.
The result type of the returned by .
A function that returns a started task of type .
A cancellation token used to cancel the retry operation, but not operations that are already in flight
or that already completed successfully.
A task that will run to completion if the original task completes successfully (either the
first time or after retrying transient failures). If the task fails with a non-transient error or
the retry limit is reached, the returned task will become faulted and the exception must be observed.
if the retry delay strategy determines the operation shouldn't be retried anymore
if an existing transaction is detected and the execution strategy doesn't support it
if this instance was already used to execute an operation
Determines whether the operation should be retried and the delay before the next attempt.
The exception thrown during the last execution attempt.
Returns the delay indicating how long to wait for before the next execution attempt if the operation should be retried;
null otherwise
Recursively gets InnerException from as long as it's an
, or
and passes it to
The exception to be unwrapped.
A delegate that will be called with the unwrapped exception.
The result from .
Determines whether the specified exception represents a transient failure that can be compensated by a retry.
The exception object to be verified.
true if the specified exception is considered as transient, otherwise false.
Returns true to indicate that might retry the execution after a failure.
A key used for resolving . It consists of the ADO.NET provider invariant name
and the database server name as specified in the connection string.
Initializes a new instance of
The ADO.NET provider invariant name indicating the type of ADO.NET connection for which this execution strategy will be used.
A string that will be matched against the server name in the connection string.
The ADO.NET provider invariant name indicating the type of ADO.NET connection for which this execution strategy will be used.
A string that will be matched against the server name in the connection string.
Implement this interface on your context to use custom logic to calculate the key used to lookup an already created model in the cache.
This interface allows you to have a single context type that can be used with different models in the same AppDomain,
or multiple context types that use the same model.
Gets the cached key associated with the provider.
The cached key associated with the provider.
Used by and when resolving
a provider invariant name from a .
Gets the name of the provider.
The name of the provider.
Represents a custom pluralization term to be used by the
Create a new instance
A non null or empty string representing the singular.
A non null or empty string representing the plural.
Get the singular.
Get the plural.
Default pluralization service implementation to be used by Entity Framework. This pluralization
service is based on English locale.
Pluralization services to be used by the EF runtime implement this interface.
By default the is used, but the pluralization service to use
can be set in a class derived from .
Pluralize a word using the service.
The word to pluralize.
The pluralized word
Singularize a word using the service.
The word to singularize.
The singularized word.
Constructs a new instance of default pluralization service
used in Entity Framework.
Constructs a new instance of default pluralization service
used in Entity Framework.
A collection of user dictionary entries to be used by this service.These inputs
can customize the service according the user needs.
Returns the plural form of the specified word.
The plural form of the input parameter.
The word to be made plural.
Returns the singular form of the specified word.
The singular form of the input parameter.
The word to be made singular.
captalize the return word if the parameter is capitalized
if word is "Table", then return "Tables"
separate one combine word in to two parts, prefix word and the last word(suffix word)
return true when the word is "[\s]*" or leading or tailing with spaces
or contains non alphabetical characters
The exception that is thrown when the action failed again after being retried the configured number of times.
Provider exception - Used by the entity client.
Initializes a new instance of the class.
Initializes a new instance of the class.
The message that describes the error.
Initializes a new instance of the class.
The error message that explains the reason for the exception.
The exception that caused the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified.
Initializes a new instance of the class.
The that holds the serialized object data about the exception being thrown.
The that contains contextual information about the source or destination.
Initializes a new instance of the class with no error message.
Initializes a new instance of the class with a specified error message.
The message that describes the error.
Initializes a new instance of the class.
The message that describes the error.
The exception that is the cause of the current exception.
Initializes a new instance of the class.
The that holds the serialized object data about the exception being thrown.
The that contains contextual information about the source or destination.
The parameter is null.
The class name is null or is zero (0).
An that doesn't retry operations if they fail.
Executes the specified operation once.
A delegate representing an executable operation that doesn't return any results.
Executes the specified operation once and returns the result.
The return type of .
A delegate representing an executable operation that returns the result of type .
The result from the operation.
Executes the specified asynchronous operation once, without retrying on failure.
A function that returns a started task.
A cancellation token used to cancel the retry operation, but not operations that are already in flight
or that already completed successfully.
A task that will run to completion if the original task completes successfully.
Executes the specified asynchronous operation once, without retrying on failure.
The result type of the returned by .
A function that returns a started task.
A cancellation token used to cancel the retry operation, but not operations that are already in flight
or that already completed successfully.
A task that will run to completion if the original task completes successfully.
Returns false to indicate that will not retry the execution after a failure.
Asynchronous version of the interface that allows elements to be retrieved asynchronously.
This interface is used to interact with Entity Framework queries and shouldn't be implemented by custom classes.
Gets an enumerator that can be used to asynchronously enumerate the sequence.
Enumerator for asynchronous enumeration over the sequence.
Asynchronously executes the provided action on each element of the .
The action to be executed.
The token to monitor for cancellation requests.
A Task representing the asynchronous operation.
Asynchronously executes the provided action on each element of the .
The action to be executed.
The token to monitor for cancellation requests.
A Task representing the asynchronous operation.
Asynchronously creates a from the .
The type that the elements will be cast to.
A containing a that contains elements from the input sequence.
Asynchronously creates a from the .
The type that the elements will be cast to.
The token to monitor for cancellation requests.
A containing a that contains elements from the input sequence.
Asynchronously creates a from the .
A containing a that contains elements from the input sequence.
Asynchronously creates a from the .
The token to monitor for cancellation requests.
A containing a that contains elements from the input sequence.
Asynchronously creates a T[] from an by enumerating it asynchronously.
The type of the elements of .
A containing a T[] that contains elements from the input sequence.
Asynchronously creates a T[] from an by enumerating it asynchronously.
The type of the elements of .
The token to monitor for cancellation requests.
A containing a T[] that contains elements from the input sequence.
Asynchronously creates a from an
by enumerating it asynchronously according to a specified key selector function.
The type of the elements of .
The type of the key returned by .
A function to extract a key from each element.
A containing a that contains selected keys and values.
Asynchronously creates a from an
by enumerating it asynchronously according to a specified key selector function.
The type of the elements of .
The type of the key returned by .
A function to extract a key from each element.
The token to monitor for cancellation requests.
A containing a that contains selected keys and values.
Asynchronously creates a from an
by enumerating it asynchronously according to a specified key selector function and a comparer.
The type of the elements of .
The type of the key returned by .
A function to extract a key from each element.
An to compare keys.
A containing a that contains selected keys and values.
Asynchronously creates a from an
by enumerating it asynchronously according to a specified key selector function and a comparer.
The type of the elements of .
The type of the key returned by .
A function to extract a key from each element.
An to compare keys.
The token to monitor for cancellation requests.
A containing a that contains selected keys and values.
Asynchronously creates a from an
by enumerating it asynchronously according to a specified key selector and an element selector function.
The type of the elements of .
The type of the key returned by .
The type of the value returned by .
A function to extract a key from each element.
A transform function to produce a result element value from each element.
A containing a that contains values of type
selected from the input sequence.
Asynchronously creates a from an
by enumerating it asynchronously according to a specified key selector and an element selector function.
The type of the elements of .
The type of the key returned by .
The type of the value returned by .
A function to extract a key from each element.
A transform function to produce a result element value from each element.
The token to monitor for cancellation requests.
A containing a that contains values of type
selected from the input sequence.
Asynchronously creates a from an
by enumerating it asynchronously according to a specified key selector function, a comparer, and an element selector function.
The type of the elements of .
The type of the key returned by .
The type of the value returned by .
A function to extract a key from each element.
A transform function to produce a result element value from each element.
An to compare keys.
A containing a that contains values of type
selected from the input sequence.
Asynchronously creates a from an
by enumerating it asynchronously according to a specified key selector function, a comparer, and an element selector function.
The type of the elements of .
The type of the key returned by .
The type of the value returned by .
A function to extract a key from each element.
A transform function to produce a result element value from each element.
An to compare keys.
The token to monitor for cancellation requests.
A containing a that contains values of type
selected from the input sequence.
Asynchronous version of the interface that allows elements of the enumerable sequence to be retrieved asynchronously.
This interface is used to interact with Entity Framework queries and shouldn't be implemented by custom classes.
The type of objects to enumerate.
Gets an enumerator that can be used to asynchronously enumerate the sequence.
Enumerator for asynchronous enumeration over the sequence.
Represents a SQL query for entities that is created from a
and is executed using the connection from that context.
Instances of this class are obtained from the instance for the
entity type. The query is not executed when this object is created; it is executed
each time it is enumerated, for example by using foreach.
SQL queries for non-entities are created using .
See for a generic version of this class.
Represents a SQL query for non-entities that is created from a
and is executed using the connection from that context.
Instances of this class are obtained from the instance.
The query is not executed when this object is created; it is executed
each time it is enumerated, for example by using foreach.
SQL queries for entities are created using .
See for a generic version of this class.
Initializes a new instance of the class.
The internal query.
Returns a new query that will stream the results instead of buffering.
A new query with AsStreaming applied.
Returns an which when enumerated will execute the SQL query against the database.
An object that can be used to iterate through the elements.
Returns an which when enumerated will execute the SQL query against the database.
An object that can be used to iterate through the elements.
Asynchronously enumerates the query results and performs the specified action on each element.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
The action to perform on each element.
A task that represents the asynchronous operation.
Asynchronously enumerates the query results and performs the specified action on each element.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
The action to perform on each element.
A to observe while waiting for the task to complete.
A task that represents the asynchronous operation.
Creates a from the query by enumerating it asynchronously.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
A task that represents the asynchronous operation.
The task result contains a that contains elements from the query.
Creates a from the query by enumerating it asynchronously.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
A to observe while waiting for the task to complete.
A task that represents the asynchronous operation.
The task result contains a that contains elements from the query.
Returns a that contains the SQL string that was set
when the query was created. The parameters are not included.
A that represents this instance.
Throws an exception indicating that binding directly to a store query is not supported.
Never returns; always throws.
Gets the internal query.
The internal query.
Returns false.
false .
Initializes a new instance of the class.
The internal query.
Creates an instance of a when called from the constructor of a derived
type that will be used as a test double for . Methods and properties
that will be used by the test double must be implemented by the test double except AsNoTracking
and AsStreaming where the default implementation is a no-op.
Returns a new query where the results of the query will not be tracked by the associated
.
A new query with NoTracking applied.
Returns a new query that will stream the results instead of buffering.
A new query with AsStreaming applied.
Represents a SQL query for entities that is created from a
and is executed using the connection from that context.
Instances of this class are obtained from the instance for the
entity type. The query is not executed when this object is created; it is executed
each time it is enumerated, for example by using foreach.
SQL queries for non-entities are created using .
See for a non-generic version of this class.
Represents a SQL query for non-entities that is created from a
and is executed using the connection from that context.
Instances of this class are obtained from the instance.
The query is not executed when this object is created; it is executed
each time it is enumerated, for example by using foreach.
SQL queries for entities are created using .
See for a non-generic version of this class.
Initializes a new instance of the class.
The internal query.
Returns a new query that will stream the results instead of buffering.
A new query with AsStreaming applied.
Returns an which when enumerated will execute the SQL query against the database.
An object that can be used to iterate through the elements.
Returns an which when enumerated will execute the SQL query against the database.
An object that can be used to iterate through the elements.
Returns an which when enumerated will execute the SQL query against the database.
An object that can be used to iterate through the elements.
Returns an which when enumerated will execute the SQL query against the database.
An object that can be used to iterate through the elements.
Asynchronously enumerates the query results and performs the specified action on each element.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
The action to be executed.
A task that represents the asynchronous operation.
Asynchronously enumerates the query results and performs the specified action on each element.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
The action to be executed.
A to observe while waiting for the task to complete.
A task that represents the asynchronous operation.
Creates a from the query by enumerating it asynchronously.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
A task that represents the asynchronous operation.
The task result contains a that contains elements from the input sequence.
Creates a from the query by enumerating it asynchronously.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
A to observe while waiting for the task to complete.
A task that represents the asynchronous operation.
The task result contains a that contains elements from the input sequence.
Creates an array from the query by enumerating it asynchronously.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
A task that represents the asynchronous operation.
The task result contains an array that contains elements from the input sequence.
Creates an array from the query by enumerating it asynchronously.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
A to observe while waiting for the task to complete.
A task that represents the asynchronous operation.
The task result contains an array that contains elements from the input sequence.
Creates a from the query by enumerating it asynchronously
according to a specified key selector function.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
The type of the key returned by .
A function to extract a key from each element.
A task that represents the asynchronous operation.
The task result contains a that contains selected keys and values.
Creates a from the query by enumerating it asynchronously
according to a specified key selector function.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
The type of the key returned by .
A function to extract a key from each element.
A to observe while waiting for the task to complete.
A task that represents the asynchronous operation.
The task result contains a that contains selected keys and values.
Creates a from the query by enumerating it asynchronously
according to a specified key selector function and a comparer.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
The type of the key returned by .
A function to extract a key from each element.
An to compare keys.
A task that represents the asynchronous operation.
The task result contains a that contains selected keys and values.
Creates a from the query by enumerating it asynchronously
according to a specified key selector function and a comparer.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
The type of the key returned by .
A function to extract a key from each element.
An to compare keys.
A to observe while waiting for the task to complete.
A task that represents the asynchronous operation.
The task result contains a that contains selected keys and values.
Creates a from the query by enumerating it asynchronously
according to a specified key selector and an element selector function.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
The type of the key returned by .
The type of the value returned by .
A function to extract a key from each element.
A transform function to produce a result element value from each element.
A task that represents the asynchronous operation.
The task result contains a that contains values of type
selected from the query.
Creates a from the query by enumerating it asynchronously
according to a specified key selector and an element selector function.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
The type of the key returned by .
The type of the value returned by .
A function to extract a key from each element.
A transform function to produce a result element value from each element.
A to observe while waiting for the task to complete.
A task that represents the asynchronous operation.
The task result contains a that contains values of type
selected from the query.
Creates a from the query by enumerating it asynchronously
according to a specified key selector function, a comparer, and an element selector function.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
The type of the key returned by .
The type of the value returned by .
A function to extract a key from each element.
A transform function to produce a result element value from each element.
An to compare keys.
A task that represents the asynchronous operation.
The task result contains a that contains values of type
selected from the input sequence.
Creates a from the query by enumerating it asynchronously
according to a specified key selector function, a comparer, and an element selector function.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
The type of the key returned by .
The type of the value returned by .
A function to extract a key from each element.
A transform function to produce a result element value from each element.
An to compare keys.
A to observe while waiting for the task to complete.
A task that represents the asynchronous operation.
The task result contains a that contains values of type
selected from the input sequence.
Asynchronously returns the first element of the query.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
A task that represents the asynchronous operation.
The task result contains the first element in the query result.
The query result is empty.
Asynchronously returns the first element of the query.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
A to observe while waiting for the task to complete.
A task that represents the asynchronous operation.
The task result contains the first element in the query result.
The query result is empty.
Asynchronously returns the first element of the query that satisfies a specified condition.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
A function to test each element for a condition.
A task that represents the asynchronous operation.
The task result contains the first element in the query result that satisfies a specified condition.
is
null
.
The query result is empty.
Asynchronously returns the first element of the query that satisfies a specified condition.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
A function to test each element for a condition.
A to observe while waiting for the task to complete.
A task that represents the asynchronous operation.
The task result contains the first element in the query result that satisfies a specified condition.
is
null
.
The query result is empty.
Asynchronously returns the first element of the query, or a default value if the the query result contains no elements.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
A task that represents the asynchronous operation.
The task result contains default ( ) if query result is empty;
otherwise, the first element in the query result.
Asynchronously returns the first element of the query, or a default value if the the query result contains no elements.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
A to observe while waiting for the task to complete.
A task that represents the asynchronous operation.
The task result contains default ( ) if query result is empty;
otherwise, the first element in the query result.
Asynchronously returns the first element of the query that satisfies a specified condition
or a default value if no such element is found.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
A function to test each element for a condition.
A task that represents the asynchronous operation.
The task result contains default ( ) if query result is empty
or if no element passes the test specified by ; otherwise, the first element
in the query result that passes the test specified by .
is
null
.
Asynchronously returns the first element of the query that satisfies a specified condition
or a default value if no such element is found.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
A function to test each element for a condition.
A to observe while waiting for the task to complete.
A task that represents the asynchronous operation.
The task result contains default ( ) if query result is empty
or if no element passes the test specified by ; otherwise, the first element
in the query result that passes the test specified by .
is
null
.
Asynchronously returns the only element of the query, and throws an exception
if there is not exactly one element in the sequence.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
A task that represents the asynchronous operation.
The task result contains the single element of the query result.
The query result has more than one element.
The query result is empty.
Asynchronously returns the only element of the query, and throws an exception
if there is not exactly one element in the sequence.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
A to observe while waiting for the task to complete.
A task that represents the asynchronous operation.
The task result contains the single element of the query result.
The query result has more than one element.
The query result is empty.
Asynchronously returns the only element of the query that satisfies a specified condition,
and throws an exception if more than one such element exists.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
A function to test each element for a condition.
A task that represents the asynchronous operation.
The task result contains the single element of the query result that satisfies the condition in
.
is
null
.
No element satisfies the condition in
.
More than one element satisfies the condition in
.
Asynchronously returns the only element of the query that satisfies a specified condition,
and throws an exception if more than one such element exists.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
A function to test each element for a condition.
A to observe while waiting for the task to complete.
A task that represents the asynchronous operation.
The task result contains the single element of the query result that satisfies the condition in
.
is
null
.
No element satisfies the condition in
.
More than one element satisfies the condition in
.
Asynchronously returns the only element of a sequence, or a default value if the sequence is empty;
this method throws an exception if there is more than one element in the sequence.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
A task that represents the asynchronous operation.
The task result contains the single element of the query result, or default ()
if the sequence contains no elements.
The query result has more than one element.
Asynchronously returns the only element of a sequence, or a default value if the sequence is empty;
this method throws an exception if there is more than one element in the sequence.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
A to observe while waiting for the task to complete.
A task that represents the asynchronous operation.
The task result contains the single element of the query result, or default ()
if the sequence contains no elements.
The query result has more than one element.
Asynchronously returns the only element of the query that satisfies a specified condition or
a default value if no such element exists; this method throws an exception if more than one element
satisfies the condition.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
A function to test each element for a condition.
A task that represents the asynchronous operation.
The task result contains the single element of the query result that satisfies the condition in
, or default ( ) if no such element is found.
is
null
.
More than one element satisfies the condition in
.
Asynchronously returns the only element of the query that satisfies a specified condition or
a default value if no such element exists; this method throws an exception if more than one element
satisfies the condition.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
A function to test each element for a condition.
A to observe while waiting for the task to complete.
A task that represents the asynchronous operation.
The task result contains the single element of the query result that satisfies the condition in
, or default ( ) if no such element is found.
is
null
.
More than one element satisfies the condition in
.
Asynchronously determines whether the query contains a specified element by using the default equality comparer.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
The object to locate in the query result.
A task that represents the asynchronous operation.
The task result contains true if the query result contains the specified value; otherwise, false.
Asynchronously determines whether the query contains a specified element by using the default equality comparer.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
The object to locate in the query result.
A to observe while waiting for the task to complete.
A task that represents the asynchronous operation.
The task result contains true if the query result contains the specified value; otherwise, false.
Asynchronously determines whether the query contains any elements.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
A task that represents the asynchronous operation.
The task result contains true if the query result contains any elements; otherwise, false.
Asynchronously determines whether the query contains any elements.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
A to observe while waiting for the task to complete.
A task that represents the asynchronous operation.
The task result contains true if the query result contains any elements; otherwise, false.
Asynchronously determines whether any element of the query satisfies a condition.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
A function to test each element for a condition.
A task that represents the asynchronous operation.
The task result contains true if any elements in the query result pass the test in the specified predicate; otherwise, false.
Asynchronously determines whether any element of the query satisfies a condition.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
A function to test each element for a condition.
A to observe while waiting for the task to complete.
A task that represents the asynchronous operation.
The task result contains true if any elements in the query result pass the test in the specified predicate; otherwise, false.
Asynchronously determines whether all the elements of the query satisfy a condition.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
A function to test each element for a condition.
A task that represents the asynchronous operation.
The task result contains true if every element of the query result passes the test in the specified predicate; otherwise, false.
is
null
.
Asynchronously determines whether all the elements of the query satisfy a condition.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
A function to test each element for a condition.
A to observe while waiting for the task to complete.
A task that represents the asynchronous operation.
The task result contains true if every element of the query result passes the test in the specified predicate; otherwise, false.
is
null
.
Asynchronously returns the number of elements in the query.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
A task that represents the asynchronous operation.
The task result contains the number of elements in the query result.
The number of elements in the query result is larger than
.
Asynchronously returns the number of elements in the query.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
A to observe while waiting for the task to complete.
A task that represents the asynchronous operation.
The task result contains the number of elements in the query result.
The number of elements in the query result is larger than
.
Asynchronously returns the number of elements in the query that satisfy a condition.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
A function to test each element for a condition.
A task that represents the asynchronous operation.
The task result contains the number of elements in the query result that satisfy the condition in the predicate function.
The number of elements in the query result that satisfy the condition in the predicate function
is larger than
.
Asynchronously returns the number of elements in the query that satisfy a condition.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
A function to test each element for a condition.
A to observe while waiting for the task to complete.
A task that represents the asynchronous operation.
The task result contains the number of elements in the query result that satisfy the condition in the predicate function.
The number of elements in the query result that satisfy the condition in the predicate function
is larger than
.
Asynchronously returns an that represents the total number of elements in the query.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
A task that represents the asynchronous operation.
The task result contains the number of elements in the query result.
The number of elements in the query result is larger than
.
Asynchronously returns an that represents the total number of elements in the query.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
A to observe while waiting for the task to complete.
A task that represents the asynchronous operation.
The task result contains the number of elements in the query result.
The number of elements in the query result is larger than
.
Asynchronously returns an that represents the number of elements in the query
that satisfy a condition.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
A function to test each element for a condition.
A task that represents the asynchronous operation.
The task result contains the number of elements in the query result that satisfy the condition in the predicate function.
The number of elements in the query result that satisfy the condition in the predicate function
is larger than
.
Asynchronously returns an that represents the number of elements in the query
that satisfy a condition.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
A function to test each element for a condition.
A to observe while waiting for the task to complete.
A task that represents the asynchronous operation.
The task result contains the number of elements in the query result that satisfy the condition in the predicate function.
The number of elements in the query result that satisfy the condition in the predicate function
is larger than
.
Asynchronously returns the minimum value of the query.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
A task that represents the asynchronous operation.
The task result contains the minimum value in the query result.
Asynchronously returns the minimum value of the query.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
A to observe while waiting for the task to complete.
A task that represents the asynchronous operation.
The task result contains the minimum value in the query result.
Asynchronously returns the maximum value of the query.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
A task that represents the asynchronous operation.
The task result contains the maximum value in the query result.
Asynchronously returns the maximum value of the query.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
A to observe while waiting for the task to complete.
A task that represents the asynchronous operation.
The task result contains the maximum value in the query result.
Returns a that contains the SQL string that was set
when the query was created. The parameters are not included.
A that represents this instance.
Throws an exception indicating that binding directly to a store query is not supported.
Never returns; always throws.
Gets the internal query.
The internal query.
Returns false.
false .
Initializes a new instance of the class.
The internal query.
Creates an instance of a when called from the constructor of a derived
type that will be used as a test double for . Methods and properties
that will be used by the test double must be implemented by the test double except AsNoTracking and
AsStreaming where the default implementation is a no-op.
Returns a new query where the entities returned will not be cached in the .
A new query with NoTracking applied.
Returns a new query that will stream the results instead of buffering.
A new query with AsStreaming applied.
Asynchronous version of the interface that allows elements to be retrieved asynchronously.
This interface is used to interact with Entity Framework queries and shouldn't be implemented by custom classes.
Advances the enumerator to the next element in the sequence, returning the result asynchronously.
A to observe while waiting for the task to complete.
A task that represents the asynchronous operation.
The task result contains true if the enumerator was successfully advanced to the next element; false if the enumerator has passed the end of the sequence.
Gets the current element in the iteration.
Defines methods to create and asynchronously execute queries that are described by an
object.
This interface is used to interact with Entity Framework queries and shouldn't be implemented by custom classes.
Asynchronously executes the query represented by a specified expression tree.
An expression tree that represents a LINQ query.
A to observe while waiting for the task to complete.
A task that represents the asynchronous operation.
The task result contains the value that results from executing the specified query.
Asynchronously executes the strongly-typed query represented by a specified expression tree.
The type of the value that results from executing the query.
An expression tree that represents a LINQ query.
A to observe while waiting for the task to complete.
A task that represents the asynchronous operation.
The task result contains the value that results from executing the specified query.
Asynchronous version of the interface that allows elements to be retrieved asynchronously.
This interface is used to interact with Entity Framework queries and shouldn't be implemented by custom classes.
The type of objects to enumerate.
Gets the current element in the iteration.
Represents a key value that uniquely identifies an Entity Framework model that has been loaded into memory.
Determines whether the current cached model key is equal to the specified cached model key.
true if the current cached model key is equal to the specified cached model key; otherwise, false.
The cached model key to compare to the current cached model key.
Returns the hash function for this cached model key.
The hash function for this cached model key.
Initializes a new instance of
Function that returns a Task containing the . Should not return null.
Thrown when an operation can't be performed because there are existing migrations that have not been applied to the database.
Represents errors that occur inside the Code First Migrations pipeline.
Initializes a new instance of the MigrationsException class.
Initializes a new instance of the MigrationsException class.
The message that describes the error.
Initializes a new instance of the MigrationsException class.
The message that describes the error.
The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified.
Initializes a new instance of the MigrationsException class with serialized data.
The that holds the serialized object data about the exception being thrown.
The that contains contextual information about the source or destination.
Initializes a new instance of the MigrationsPendingException class.
Initializes a new instance of the MigrationsPendingException class.
The message that describes the error.
Initializes a new instance of the MigrationsPendingException class.
The message that describes the error.
The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified.
Initializes a new instance of the MigrationsPendingException class with serialized data.
The that holds the serialized object data about the exception being thrown.
The that contains contextual information about the source or destination.
A migration operation to add a new stored procedure to the database.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
Initializes a new instance of the class.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
The name of the stored procedure.
The body of the stored procedure expressed in SQL.
Use anonymous type syntax to specify arguments e.g. 'new { SampleArgument = "MyValue" }'.
Gets an operation to drop the stored procedure.
For testing.
Check if specified type is a EntityTypeConfiguration instance.
The type to check.
True if type is a EntityTypeConfiguration, else false.
Check if specified type is a ComplexTypeConfiguration instance.
The type to check.
True if type is a ComplexTypeConfiguration, else false.
Allows configuration to be performed for a lightweight convention based on
the properties in a model.
Filters the properties that this convention applies to based on a predicate.
A function to test each property for a condition.
A instance so that multiple calls can be chained.
Filters the properties that this convention applies to based on a predicate
while capturing a value to use later during configuration.
Type of the captured value.
A function to capture a value for each property. If the value is null, the
property will be filtered out.
A instance so that multiple calls can be chained.
Allows configuration of the properties that this convention applies to.
An action that performs configuration against a
.
Gets the of the current instance.
The exact runtime type of the current instance.
Allows configuration to be performed for a lightweight convention based on
the properties of entity types in a model and a captured value.
Allows configuration of the properties that this convention applies to.
An action that performs configuration against a
using a captured value.
Gets the of the current instance.
The exact runtime type of the current instance.
Allows configuration to be performed for a stored procedure that is used to modify a relationship.
The type of the entity that the relationship is being configured from.
Configures a parameter for this stored procedure.
The same configuration instance so that multiple calls can be chained.
A lambda expression representing the property to configure the parameter for. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty
The name of the parameter.
The type of the property.
Configures a parameter for this stored procedure.
The same configuration instance so that multiple calls can be chained.
A lambda expression representing the property to configure the parameter for. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty
The name of the parameter.
The type of the property.
Configures a parameter for this stored procedure.
The same configuration instance so that multiple calls can be chained.
A lambda expression representing the property to configure the parameter for. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty
The name of the parameter.
Configures a parameter for this stored procedure.
The same configuration instance so that multiple calls can be chained.
A lambda expression representing the property to configure the parameter for. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty
The name of the parameter.
Creates a convention that configures stored procedures to be used to delete entities in the database.
Creates a convention that configures stored procedures to be used to modify entities in the database.
Configures the name of the stored procedure.
The same configuration instance so that multiple calls can be chained.
The stored procedure name.
Configures the name of the stored procedure.
The same configuration instance so that multiple calls can be chained.
The stored procedure name.
The schema name.
Configures a parameter for this stored procedure.
The same configuration instance so that multiple calls can be chained.
The name of the property to configure the parameter for.
The name of the parameter.
Configures a parameter for this stored procedure.
The same configuration instance so that multiple calls can be chained.
The property to configure the parameter for.
The name of the parameter.
Configures the output parameter that returns the rows affected by this stored procedure.
The same configuration instance so that multiple calls can be chained.
The name of the parameter.
Creates a convention that configures stored procedures to be used to insert entities in the database.
Configures the name of the stored procedure.
The same configuration instance so that multiple calls can be chained.
The stored procedure name.
Configures the name of the stored procedure.
The same configuration instance so that multiple calls can be chained.
The stored procedure name.
The schema name.
Configures a parameter for this stored procedure.
The same configuration instance so that multiple calls can be chained.
The name of the property to configure the parameter for.
The name of the parameter.
Configures a parameter for this stored procedure.
The same configuration instance so that multiple calls can be chained.
The property to configure the parameter for.
The name of the parameter.
Configures a column of the result for this stored procedure to map to a property.
This is used for database generated columns.
The same configuration instance so that multiple calls can be chained.
The name of the property to configure the result for.
The name of the result column.
Configures a column of the result for this stored procedure to map to a property.
This is used for database generated columns.
The same configuration instance so that multiple calls can be chained.
The property to configure the result for.
The name of the result column.
Creates a convention that configures stored procedures to be used to modify entities in the database.
Configures stored procedure used to insert entities.
The same configuration instance so that multiple calls can be chained.
A lambda expression that performs configuration for the stored procedure.
Configures stored procedure used to update entities.
The same configuration instance so that multiple calls can be chained.
A lambda expression that performs configuration for the stored procedure.
Configures stored procedure used to delete entities.
The same configuration instance so that multiple calls can be chained.
A lambda expression that performs configuration for the stored procedure.
Gets the of the current instance.
The exact runtime type of the current instance.
Creates a convention that configures stored procedures to be used to update entities in the database.
Configures the name of the stored procedure.
The same configuration instance so that multiple calls can be chained.
The stored procedure name.
Configures the name of the stored procedure.
The same configuration instance so that multiple calls can be chained.
The stored procedure name.
The schema name.
Configures a parameter for this stored procedure.
The same configuration instance so that multiple calls can be chained.
The name of the property to configure the parameter for.
The name of the parameter.
Configures a parameter for this stored procedure.
The same configuration instance so that multiple calls can be chained.
The property to configure the parameter for.
The name of the parameter.
Configures a parameter for this stored procedure.
The same configuration instance so that multiple calls can be chained.
The name of the property to configure the parameter for.
The current value parameter name.
The original value parameter name.
Configures a parameter for this stored procedure.
The same configuration instance so that multiple calls can be chained.
The property to configure the parameter for.
The current value parameter name.
The original value parameter name.
Configures a column of the result for this stored procedure to map to a property.
This is used for database generated columns.
The same configuration instance so that multiple calls can be chained.
The name of the property to configure the result for.
The name of the result column.
Configures a column of the result for this stored procedure to map to a property.
This is used for database generated columns.
The same configuration instance so that multiple calls can be chained.
The property to configure the result for.
The name of the result column.
Configures the output parameter that returns the rows affected by this stored procedure.
The same configuration instance so that multiple calls can be chained.
The name of the parameter.
Allows configuration to be performed for a stored procedure that is used to modify a many to many relationship.
The type of the entity that the relationship is being configured from.
The type of the entity that the other end of the relationship targets.
Performs configuration of a stored procedure uses to modify an entity in the database.
Sets the name of the stored procedure.
Name of the procedure.
The same configuration instance so that multiple calls can be chained.
Sets the name of the stored procedure.
Name of the procedure.
Name of the schema.
The same configuration instance so that multiple calls can be chained.
Configures the parameter for the left key value(s).
A lambda expression representing the property to be configured. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty
Name of the parameter.
The same configuration instance so that multiple calls can be chained.
Configures the parameter for the left key value(s).
A lambda expression representing the property to be configured. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty
Name of the parameter.
The same configuration instance so that multiple calls can be chained.
Configures the parameter for the left key value(s).
A lambda expression representing the property to be configured. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty
Name of the parameter.
The same configuration instance so that multiple calls can be chained.
Configures the parameter for the left key value(s).
A lambda expression representing the property to be configured. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty
Name of the parameter.
The same configuration instance so that multiple calls can be chained.
Configures the parameter for the right key value(s).
A lambda expression representing the property to be configured. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty
Name of the parameter.
The same configuration instance so that multiple calls can be chained.
Configures the parameter for the right key value(s).
A lambda expression representing the property to be configured. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty
Name of the parameter.
The same configuration instance so that multiple calls can be chained.
Configures the parameter for the right key value(s).
A lambda expression representing the property to be configured. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty
Name of the parameter.
The same configuration instance so that multiple calls can be chained.
Configures the parameter for the right key value(s).
A lambda expression representing the property to be configured. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty
Name of the parameter.
The same configuration instance so that multiple calls can be chained.
Allows configuration to be performed for a stored procedure that is used to modify a many to many relationship.
The type of the entity that the relationship is being configured from.
The type of the entity that the other end of the relationship targets.
Configures stored procedure used to insert relationships.
The same configuration instance so that multiple calls can be chained.
A lambda expression that performs configuration for the stored procedure.
Configures stored procedure used to delete relationships.
The same configuration instance so that multiple calls can be chained.
A lambda expression that performs configuration for the stored procedure.
Gets the of the current instance.
The exact runtime type of the current instance.
Allows configuration to be performed for a stored procedure that is used to delete entities.
The type of the entity that the stored procedure can be used to delete.
Configures the name of the stored procedure.
The same configuration instance so that multiple calls can be chained.
The stored procedure name.
Configures the name of the stored procedure.
The same configuration instance so that multiple calls can be chained.
The stored procedure name.
The schema name.
Configures a parameter for this stored procedure.
The same configuration instance so that multiple calls can be chained.
A lambda expression representing the property to configure the parameter for. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty
The name of the parameter.
Configures a parameter for this stored procedure.
The same configuration instance so that multiple calls can be chained.
A lambda expression representing the property to configure the parameter for. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty
The name of the parameter.
Configures a parameter for this stored procedure.
The same configuration instance so that multiple calls can be chained.
A lambda expression representing the property to configure the parameter for. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty
The name of the parameter.
Configures a parameter for this stored procedure.
The same configuration instance so that multiple calls can be chained.
A lambda expression representing the property to configure the parameter for. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty
The name of the parameter.
Configures a parameter for this stored procedure.
The same configuration instance so that multiple calls can be chained.
A lambda expression representing the property to configure the parameter for. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty
The name of the parameter.
Configures a parameter for this stored procedure.
The same configuration instance so that multiple calls can be chained.
A lambda expression representing the property to configure the parameter for. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty
The name of the parameter.
Configures the output parameter that returns the rows affected by this stored procedure.
The same configuration instance so that multiple calls can be chained.
The name of the parameter.
Configures parameters for a relationship where the foreign key property is not included in the class.
The same configuration instance so that multiple calls can be chained.
A lambda expression representing the navigation property for the relationship. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty
A lambda expression that performs the configuration.
The type of the principal entity in the relationship.
Configures parameters for a relationship where the foreign key property is not included in the class.
The same configuration instance so that multiple calls can be chained.
A lambda expression representing the navigation property for the relationship. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty
A lambda expression that performs the configuration.
The type of the principal entity in the relationship.
Allows configuration to be performed for a stored procedure that is used to insert entities.
The type of the entity that the stored procedure can be used to insert.
Configures the name of the stored procedure.
The same configuration instance so that multiple calls can be chained.
The stored procedure name.
Configures the name of the stored procedure.
The same configuration instance so that multiple calls can be chained.
The stored procedure name.
The schema name.
Configures a parameter for this stored procedure.
The same configuration instance so that multiple calls can be chained.
A lambda expression representing the property to configure the parameter for. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty
The name of the parameter.
Configures a parameter for this stored procedure.
The same configuration instance so that multiple calls can be chained.
A lambda expression representing the property to configure the parameter for. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty
The name of the parameter.
Configures a parameter for this stored procedure.
The same configuration instance so that multiple calls can be chained.
A lambda expression representing the property to configure the parameter for. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty
The name of the parameter.
Configures a parameter for this stored procedure.
The same configuration instance so that multiple calls can be chained.
A lambda expression representing the property to configure the parameter for. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty
The name of the parameter.
Configures a parameter for this stored procedure.
The same configuration instance so that multiple calls can be chained.
A lambda expression representing the property to configure the parameter for. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty
The name of the parameter.
Configures a parameter for this stored procedure.
The same configuration instance so that multiple calls can be chained.
A lambda expression representing the property to configure the parameter for. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty
The name of the parameter.
Configures a column of the result for this stored procedure to map to a property.
This is used for database generated columns.
The same configuration instance so that multiple calls can be chained.
A lambda expression representing the property to configure the result for. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty
The name of the result column.
Configures a column of the result for this stored procedure to map to a property.
This is used for database generated columns.
The same configuration instance so that multiple calls can be chained.
A lambda expression representing the property to configure the result for. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty
The name of the result column.
Configures a column of the result for this stored procedure to map to a property.
This is used for database generated columns.
The same configuration instance so that multiple calls can be chained.
A lambda expression representing the property to configure the result for. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty
The name of the result column.
Configures a column of the result for this stored procedure to map to a property.
This is used for database generated columns.
The same configuration instance so that multiple calls can be chained.
A lambda expression representing the property to configure the result for. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty
The name of the result column.
Configures a column of the result for this stored procedure to map to a property.
This is used for database generated columns.
The same configuration instance so that multiple calls can be chained.
A lambda expression representing the property to configure the result for. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty
The name of the result column.
Configures a column of the result for this stored procedure to map to a property.
This is used for database generated columns.
The same configuration instance so that multiple calls can be chained.
A lambda expression representing the property to configure the result for. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty
The name of the result column.
Configures parameters for a relationship where the foreign key property is not included in the class.
The same configuration instance so that multiple calls can be chained.
A lambda expression representing the navigation property for the relationship. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty
A lambda expression that performs the configuration.
The type of the principal entity in the relationship.
Configures parameters for a relationship where the foreign key property is not included in the class.
The same configuration instance so that multiple calls can be chained.
A lambda expression representing the navigation property for the relationship. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty
A lambda expression that performs the configuration.
The type of the principal entity in the relationship.
Allows configuration to be performed for a stored procedure that is used to update entities.
The type of the entity that the stored procedure can be used to update.
Configures the name of the stored procedure.
The same configuration instance so that multiple calls can be chained.
The stored procedure name.
Configures the name of the stored procedure.
The same configuration instance so that multiple calls can be chained.
The stored procedure name.
The schema name.
Configures a parameter for this stored procedure.
The same configuration instance so that multiple calls can be chained.
A lambda expression representing the property to configure the parameter for. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty
The name of the parameter.
Configures a parameter for this stored procedure.
The same configuration instance so that multiple calls can be chained.
A lambda expression representing the property to configure the parameter for. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty
The name of the parameter.
Configures a parameter for this stored procedure.
The same configuration instance so that multiple calls can be chained.
A lambda expression representing the property to configure the parameter for. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty
The name of the parameter.
Configures a parameter for this stored procedure.
The same configuration instance so that multiple calls can be chained.
A lambda expression representing the property to configure the parameter for. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty
The name of the parameter.
Configures a parameter for this stored procedure.
The same configuration instance so that multiple calls can be chained.
A lambda expression representing the property to configure the parameter for. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty
The name of the parameter.
Configures a parameter for this stored procedure.
The same configuration instance so that multiple calls can be chained.
A lambda expression representing the property to configure the parameter for. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty
The name of the parameter.
Configures a parameter for this stored procedure.
The same configuration instance so that multiple calls can be chained.
A lambda expression representing the property to configure the parameter for. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty
The current value parameter name.
The original value parameter name.
Configures a parameter for this stored procedure.
The same configuration instance so that multiple calls can be chained.
A lambda expression representing the property to configure the parameter for. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty
The current value parameter name.
The original value parameter name.
Configures a parameter for this stored procedure.
The same configuration instance so that multiple calls can be chained.
A lambda expression representing the property to configure the parameter for. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty
The current value parameter name.
The original value parameter name.
Configures a parameter for this stored procedure.
The same configuration instance so that multiple calls can be chained.
A lambda expression representing the property to configure the parameter for. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty
The current value parameter name.
The original value parameter name.
Configures a parameter for this stored procedure.
The same configuration instance so that multiple calls can be chained.
A lambda expression representing the property to configure the parameter for. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty
The current value parameter name.
The original value parameter name.
The same configuration instance so that multiple calls can be chained.
A lambda expression representing the property to configure the parameter for. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty
The current value parameter name.
The original value parameter name.
Configures a column of the result for this stored procedure to map to a property.
This is used for database generated columns.
The same configuration instance so that multiple calls can be chained.
A lambda expression representing the property to configure the result for. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty
The name of the result column.
Configures a column of the result for this stored procedure to map to a property.
This is used for database generated columns.
The same configuration instance so that multiple calls can be chained.
A lambda expression representing the property to configure the result for. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty
The name of the result column.
Configures a column of the result for this stored procedure to map to a property.
This is used for database generated columns.
The same configuration instance so that multiple calls can be chained.
A lambda expression representing the property to configure the result for. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty
The name of the result column.
Configures a column of the result for this stored procedure to map to a property.
This is used for database generated columns.
The same configuration instance so that multiple calls can be chained.
A lambda expression representing the property to configure the result for. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty
The name of the result column.
Configures a column of the result for this stored procedure to map to a property.
This is used for database generated columns.
The same configuration instance so that multiple calls can be chained.
A lambda expression representing the property to configure the result for. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty
The name of the result column.
Configures a column of the result for this stored procedure to map to a property.
This is used for database generated columns.
The same configuration instance so that multiple calls can be chained.
A lambda expression representing the property to configure the result for. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty
The name of the result column.
Configures the output parameter that returns the rows affected by this stored procedure.
The same configuration instance so that multiple calls can be chained.
The name of the parameter.
Configures parameters for a relationship where the foreign key property is not included in the class.
The same configuration instance so that multiple calls can be chained.
A lambda expression representing the navigation property for the relationship. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty
A lambda expression that performs the configuration.
The type of the principal entity in the relationship.
Configures parameters for a relationship where the foreign key property is not included in the class.
The same configuration instance so that multiple calls can be chained.
A lambda expression representing the navigation property for the relationship. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty
A lambda expression that performs the configuration.
The type of the principal entity in the relationship.
Allows configuration to be performed for a stored procedure that is used to modify entities.
The type of the entity that the stored procedure can be used to modify.
Configures stored procedure used to insert entities.
The same configuration instance so that multiple calls can be chained.
A lambda expression that performs configuration for the stored procedure.
Configures stored procedure used to update entities.
The same configuration instance so that multiple calls can be chained.
A lambda expression that performs configuration for the stored procedure.
Configures stored procedure used to delete entities.
The same configuration instance so that multiple calls can be chained.
A lambda expression that performs configuration for the stored procedure.
Gets the of the current instance.
The exact runtime type of the current instance.
Used to configure a primitive property of an entity type or complex type.
This configuration functionality is available via lightweight conventions.
Initializes a new instance of the class.
The for this property
The configuration object that this instance wraps.
Configures the name of the database column used to store the property.
The name of the column.
The same instance so that multiple calls can be chained.
Calling this will have no effect once it has been configured.
Configures the name of the parameter used in stored procedures for this property.
Name of the parameter.
The same instance so that multiple calls can be chained.
Configures the order of the database column used to store the property.
This method is also used to specify key ordering when an entity type has a composite key.
The order that this column should appear in the database table.
The same instance so that multiple calls can be chained.
Calling this will have no effect once it has been configured.
Configures the data type of the database column used to store the property.
Name of the database provider specific data type.
The same instance so that multiple calls can be chained.
Calling this will have no effect once it has been configured.
Configures the property to be used as an optimistic concurrency token.
The same instance so that multiple calls can be chained.
Calling this will have no effect once it has been configured.
Configures whether or not the property is to be used as an optimistic concurrency token.
Value indicating if the property is a concurrency token or not.
The same instance so that multiple calls can be chained.
Calling this will have no effect once it has been configured.
Configures how values for the property are generated by the database.
The pattern used to generate values for the property in the database.
The same instance so that multiple calls can be chained.
Calling this will have no effect once it has been configured.
Configures the property to be optional.
The database column used to store this property will be nullable.
The same instance so that multiple calls can be chained.
Calling this will have no effect once it has been configured.
Configures the property to be required.
The database column used to store this property will be non-nullable.
The same instance so that multiple calls can be chained.
Calling this will have no effect once it has been configured.
Configures the property to support Unicode string content.
The same instance so that multiple calls can be chained.
Calling this will have no effect once it has been configured.
This method throws if the property is not a .
Configures whether or not the property supports Unicode string content.
Value indicating if the property supports Unicode string content or not.
The same instance so that multiple calls can be chained.
Calling this will have no effect once it has been configured.
This method throws if the property is not a .
Configures the property to be fixed length.
Use HasMaxLength to set the length that the property is fixed to.
The same instance so that multiple calls can be chained.
Calling this will have no effect once it has been configured.
This method throws if the property does not have length facets.
Configures the property to be variable length.
Properties are variable length by default.
The same instance so that multiple calls can be chained.
Calling this will have no effect once it has been configured.
This method throws if the property does not have length facets.
Configures the property to have the specified maximum length.
The maximum length for the property.
The same instance so that multiple calls can be chained.
Calling this will have no effect once it has been configured.
This method throws if the property does not have length facets.
Configures the property to allow the maximum length supported by the database provider.
The same instance so that multiple calls can be chained.
Calling this will have no effect once it has been configured.
This method throws if the property does not have length facets.
Configures the precision of the property.
If the database provider does not support precision for the data type of the column then the value is ignored.
Precision of the property.
The same instance so that multiple calls can be chained.
Calling this will have no effect once it has been configured.
This method will throw if the property is not a .
Configures the precision and scale of the property.
The precision of the property.
The scale of the property.
The same instance so that multiple calls can be chained.
Calling this will have no effect once it has been configured.
This method will throw if the property is not a .
Configures the property to be a row version in the database.
The actual data type will vary depending on the database provider being used.
Setting the property to be a row version will automatically configure it to be an
optimistic concurrency token.
The same instance so that multiple calls can be chained.
Calling this will have no effect once it has been configured.
This method throws if the property is not a .
Configures this property to be part of the entity type's primary key.
The same instance so that
multiple calls can be chained.
Gets the of the current instance.
The exact runtime type of the current instance.
Gets the for this property.
Provides a mechanism to ensure an exception is thrown on concurrent execution of a critical section.
Acquires an exclusive lock on this instance.
Any subsequent call to Enter before a call to Exit will result in an exception.
Releases an exclusive lock on this instance.
Throws an exception if an exclusive lock has been acquired on this instance.
An implementation of that does nothing. Using this
initializer disables database initialization for the given context type. Passing an instance
of this class to is equivalent to passing null.
When is being used to resolve initializers an instance of
this class must be used to disable initialization.
An implementation of this interface is used to initialize the underlying database when
an instance of a derived class is used for the first time.
This initialization can conditionally create the database and/or seed it with data.
The strategy used is set using the static InitializationStrategy property of the
class.
The following implementations are provided: ,
, .
Executes the strategy to initialize the database for the given context.
The context.
Ask for a spatial provider. If one has been registered then we will use it, otherwise we will
fall back on using the SQL provider and if this is not available then the default provider.
Determines whether the given exception requires additional context from the update pipeline (in other
words, whether the exception should be wrapped in an UpdateException).
Exception to test.
true if exception should be wrapped; false otherwise
FieldMetadata class providing the correlation between the column ordinals and MemberMetadata.
Initializes a new object with the specified ordinal value and field type.
An integer specified the location of the metadata.
The field type.
Gets the type of field for this object.
The type of field for this object.
Gets the ordinal for this object.
An integer representing the ordinal value.
Provides singleton model TypeUsages for each DbType that can be expressed using a supported EDM type and appropriate facet values.
Used by EntityParameter.GetTypeUsage - if you add additional TypeUsage fields here, review the impact on that method.
For collection results, we really want to know the expression to
get the coordinator from its stateslot as well, so we have an
additional one...
Type returned by the Translator visitor; allows us to put the logic
to ensure a specific return type in a single place, instead of in
each Visit method.
Return the expression; wrapped with the appropriate cast/convert
logic to guarantee its type.
Return the expression without attempting to cast/convert to the requested type.
Checks if the expression represents an wrapped entity and if so creates an expression
that extracts the raw entity from the wrapper.
Supports building a unique key for a column map so that compiled delegates ()
can be cached. The general rule: if the cares about some property of
the column map, the generated key must include that property value.
IMPORTANT:
The "X-" prefixes introduced in the different column map types should be unique. This avoids
conflicts for different column maps with similar properties (e.g. ComplexType and EntityType)
Basic Visitor Design Pattern support for ColumnMap hierarchy;
This visitor class will walk the entire hierarchy, but does not
return results; it's useful for operations such as printing and
searching.
Common List(ColumnMap) code
Returns a string uniquely identifying the given ColumnMap.
What we return from our materialization of a collection column must be
exactly the type that the compilers expected when they generated the
code that asked for it. This class wraps our enumerators and derives
from all the possible options, covering all the bases.
The thing we're compensating for
An expression that returns the source as a constant
Used in the Translator to aggregate information about a (nested) reader
coordinator. After the translator visits the columnMaps, it will compile
the coordinator(s) which produces an immutable CoordinatorFactory that
can be shared amongst many query instances.
Map from original expressions to expressions with detailed error handling.
Expressions that should be precompiled (i.e. reduced to constants in
compiled delegates.
List of all record types that we can return at this level in the query.
Allows sub-expressions to register an 'interest' in exceptions thrown when reading elements
for this coordinator. When an exception is thrown, we rerun the delegate using the slower
but more error-friendly versions of expressions (e.g. reader.GetValue + type check instead
of reader.GetInt32())
The lean and mean raw version of the expression
The slower version of the same expression with better error handling
Registers a lambda expression for pre-compilation (i.e. reduction to a constant expression)
within materialization expression. Otherwise, the expression will be compiled every time
the enclosing delegate is invoked.
Lambda expression to register.
Registers a coordinator for a nested collection contained in elements of this collection.
Use the information stored on the scratchpad to compile an immutable factory used
to construct the coordinators used at runtime when materializing results.
Allocates a new RecordStateScratchpad and adds it to the list of the ones we're
responsible for; will create the list if it hasn't alread been created.
For nested collections, returns the parent coordinator.
Gets or sets an Expression setting key values (these keys are used
to determine when a collection has entered a new chapter) from the
underlying store data reader.
Gets or sets an Expression returning 'true' when the key values for
the current nested result (see SetKeys) are equal to the current key
values on the underlying data reader.
Gets or sets an expression returning 'true' if the current row in
the underlying data reader contains an element of the collection.
Gets or sets an Expression yielding an element of the current collection
given values in the underlying data reader.
Gets or sets an Expression initializing the collection storing results from this coordinator.
Indicates which Shaper.State slot is home for this collection's coordinator.
Used by Parent to pull out nested collection aggregators/streamers.
Gets or sets the depth of the current coordinator. A root collection has depth 0.
Visitor supporting (non-recursive) replacement of LINQ sub-expressions and
compilation of inline delegates.
Visitor for LINQ expression trees.
The RecordState class is responsible for tracking state about a record
that should be returned from a data reader.
Where to find the static information about this record
The coordinator factory (essentially, the reader) that we're a part of.
True when the record is supposed to be null. (Null Structured Types...)
An EntityRecordInfo, with EntityKey and EntitySet populated; set
by the GatherData expression.
The column values; set by the GatherData expression. Really ought
to be in the Shaper.State.
Move the PendingValues to the CurrentValues for this record and all nested
records. We keep the pending values separate from the current ones because
we may have a nested reader in the middle, and while we're reading forward
on the nested reader we we'll blast over the pending values.
This should be called as part of the data reader's Read() method.
Implementation of DataReader's GetBytes method
Implementation of DataReader's GetChars method
Return the name of the column at the ordinal specified.
This is where the GetOrdinal method for DbDataReader/DbDataRecord end up.
Return the type of the column at the ordinal specified.
Returns true when the column at the ordinal specified is
a record or reader column that requires special handling.
Called whenever we hand this record state out as the default state for
a data reader; we will have already handled any existing data back to
the previous group of records (that is, we couldn't be using it from two
distinct readers at the same time).
Called from the Element expression on the Coordinator to gather all
the data for the record; we just turn around and call the expression
we build on the RecordStateFactory.
Called by the GatherData expression to set the data for the
specified column value
Called by the GatherData expression to set the data for the
EntityRecordInfo
Called from the Element expression on the Coordinator to indicate that
the record should be NULL.
Return the number of columns
Return the DataRecordInfo for this record; if we had an EntityRecordInfo
set, then return it otherwise return the static one from the factory.
Is the record NULL?
An immutable class used to generate new RecordStates, which are used
at runtime to produce value-layer (aka DataReader) results.
Contains static information collected by the Translator visitor. The
expressions produced by the Translator are compiled. The RecordStates
will refer to this object for all static information.
This class is cached in the query cache as part of the CoordinatorFactory.
Indicates which state slot in the Shaper.State is expected to hold the
value for this record state. Each unique record shape has it's own state
slot.
How many column values we have to reserve space for in this record.
The DataRecordInfo we must return for this record. If the record represents
an entity, this will be used to construct a unique EntityRecordInfo with the
EntityKey and EntitySet for the entity.
A function that will gather the data for the row and store it on the record state.
Collection of nested records for this record, such as a complex type that is
part of an entity. This does not include records that are part of a nested
collection, however.
The name for each column.
The type usage information for each column.
Tracks which columns might need special handling (nested readers/records)
Tracks whether there are ANY columns that need special handling.
A helper class to make the translation from name->ordinal.
Description of this RecordStateFactory, used for debugging only; while this
is not needed in retail code, it is pretty important because it's the only
description we'll have once we compile the Expressions; debugging a problem
with retail bits would be pretty hard without this.
It's GO time, create the record state.
Used in the Translator to aggregate information about a (nested) record
state. After the translator visits the columnMaps, it will compile
the recordState(s) which produces an immutable RecordStateFactory that
can be shared amongst many query instances.
Shapes store reader values into EntityClient/ObjectQuery results. Also maintains
state used by materializer delegates.
Keeps track of the entities that have been materialized so that we can fire an OnMaterialized
for them before returning control to the caller.
The store data reader we're pulling data from
The state slots we use in the coordinator expression.
The context the shaper is performing for.
The workspace we are performing for; yes we could get it from the context, but
it's much easier to just have it handy.
The merge option this shaper is performing under/for.
A mapping of CSpace AssociationTypes to OSpace AssociationTypes
Used for faster lookup/retrieval of AssociationTypes during materialization
Caches Tuples of EntitySet, AssociationType, and source member name for which RelatedEnds exist.
Utility method used to evaluate a multi-discriminator column map. Takes
discriminator values and determines the appropriate entity type, then looks up
the appropriate handler and invokes it.
REQUIRES:: entity is not null and MergeOption is OverwriteChanges or PreserveChanges
Handles state management for an entity returned by a query. Where an existing entry
exists, updates that entry and returns the existing entity. Otherwise, the entity
passed in is returned.
REQUIRES:: entity exists; MergeOption is AppendOnly
Handles state management for an entity with the given key. When the entity already exists
in the state manager, it is returned directly. Otherwise, the entityDelegate is invoked and
the resulting entity is returned.
Call to ensure a collection of full-spanned elements are added
into the state manager properly. We registers an action to be called
when the collection is closed that pulls the collection of full spanned
objects into the state manager.
Call to ensure a single full-spanned element is added into
the state manager properly.
Call to ensure a target entities key is added into the state manager
properly
Sets the IsLoaded flag to "true"
There are also rules for when this can be set based on MergeOption and the current value(s) in the related end.
REQUIRES:: entity is not null and MergeOption is OverwriteChanges or PreserveChanges
Calls through to HandleEntity after retrieving the EntityKey from the given entity.
Still need this so that the correct key will be used for iPOCOs that implement IEntityWithKey
in a non-default manner.
Calls through to the specified RecordState to set the value for the specified column ordinal.
Calls through to the specified RecordState to set the value for the EntityRecordInfo.
REQUIRES:: should be called only by delegate allocating this state.
Utility method assigning a value to a state slot. Returns an arbitrary value
allowing the method call to be composed in a ShapeEmitter Expression delegate.
REQUIRES:: should be called only by delegate allocating this state.
Utility method assigning a value to a state slot and return the value, allowing
the value to be accessed/set in a ShapeEmitter Expression delegate and later
retrieved.
Used to retrieve a property value with exception handling. Normally compiled
delegates directly call typed methods on the DbDataReader (e.g. GetInt32)
but when an exception occurs we retry using this method to potentially get
a more useful error message to the user.
Used to retrieve a column value with exception handling. Normally compiled
delegates directly call typed methods on the DbDataReader (e.g. GetInt32)
but when an exception occurs we retry using this method to potentially get
a more useful error message to the user.
Wire's one or more full-spanned entities into the state manager; used by
both full-spanned collections and full-spanned entities.
Gets value from reader using the same pattern as the materializer delegate. Avoids
the need to compile multiple delegates for error handling. If there is a failure
reading a value
Creates the exception thrown when the reader returns a null value
for a non nullable property/column.
Creates the exception thrown when the reader returns a value with
an incompatible type.
An immutable type used to generate Shaper instances.
Typed ShaperFactory
Factory method to create the Shaper for Object Layer queries.
Typed Shaper. Includes logic to enumerate results and wraps the _rootCoordinator,
which includes materializer delegates for the root query collection.
Which type of query is this, object layer (true) or value layer (false)
Keeps track of whether we've completed processing or not.
The enumerator we're using to read data; really only populated for value
layer queries.
Is the reader owned by the EF or was it supplied by the user?
Shapers and Coordinators work together in harmony to materialize the data
from the store; the shaper contains the state, the coordinator contains the
code.
Initialize the RecordStateFactory objects in their StateSlots.
Called when enumeration of results has completed.
Reads the next row from the store. If there is a failure, throws an exception message
in some scenarios (note that we respond to failure rather than anticipate failure,
avoiding repeated checks in the inner materialization loop)
Notify ObjectContext that we are about to start materializing an element
Notify ObjectContext that we are finished materializing the element
Events raised when the shaper has finished enumerating results. Useful for callback
to set parameter values.
Used to handle the read-ahead requirements of value-layer queries. This
field indicates the status of the current value of the _rootEnumerator; when
a bridge data reader "accepts responsibility" for the current value, it sets
this to false.
The enumerator that the value-layer bridge will use to read data; all nested
data readers need to use the same enumerator, so we put it on the Shaper, since
that is something that all the nested data readers (and data records) have access
to -- it prevents us from having to pass two objects around.
Optimized enumerator for queries not including nested results.
Enumerates (for each row in the input) an array of all coordinators producing new elements. The array
contains a position for each 'depth' in the result. A null value in any position indicates that no new
results were produced for the given row at the given depth. It is possible for a row to contain no
results for any row.
Wraps RowNestedResultEnumerator and yields results appropriate to an ObjectQuery instance. In particular,
root level elements (T) are returned only after aggregating all child elements.
Requires: the row is currently positioned at the start of an element.
Reads all rows in the element and sets up state for the next element (if any).
Reads rows until the start of a new element is found. If no element
is found before all rows are consumed, returns false.
Describes the state of this enumerator with respect to the _rowEnumerator
it wraps.
No rows have been read yet
Positioned at the start of a new root element. The previous element must
be stored in _previousElement. We read ahead in this manner so that
the previous element is fully populated (all of its children loaded)
before returning.
Positioned past the end of the rows. The last element in the enumeration
has not yet been returned to the user however, and is stored in _previousElement.
Positioned past the end of the rows. The last element has been returned to
the user.
Wraps RowNestedResultEnumerator and yields results appropriate to an EntityReader instance. In particular,
yields RecordState whenever a new element becomes available at any depth in the result hierarchy.
Gets depth of coordinator we're currently consuming. If _depth == -1, it means we haven't started
to consume the next row yet.
Translates query ColumnMap into ShaperFactory. Basically, we interpret the
ColumnMap and compile delegates used to materialize results.
The main entry point for the translation process. Given a ColumnMap, returns
a ShaperFactory which can be used to materialize results for a query.
Basic Visitor Design Pattern support for ColumnMap hierarchy;
This visitor class allows you to return results; it's useful for operations
that copy or manipulate the hierarchy.
Gets the O-Space Metadata workspace.
Gets structure telling us how to interpret 'span' rows (includes implicit
relationship span and explicit full span via ObjectQuery.Include().
Gets the MergeOption for the current query (influences our handling of
entities when they are materialized).
When true, indicates we're processing for the value layer (BridgeDataReader)
and not the ObjectMaterializer
Gets scratchpad for the coordinator builder for the nested reader currently
being translated or emitted.
Local cache of ObjectTypeMappings for EdmTypes (to prevent expensive lookups).
Visit(ComplexTypeColumnMap)
Visit(EntityColumnMap)
Prepare a list of PropertyBindings for each item in the specified property
collection such that the mapped property of the specified clrType has its
value set from the source data reader.
Along the way we'll keep track of non-public properties and properties that
have link demands, so we can ensure enforce them.
Visit(SimplePolymorphicColumnMap)
Visit(MultipleDiscriminatorPolymorphicColumnMap)
Helper method to simplify the construction of the types
Visit(RecordColumnMap)
Build expression to materialize LINQ initialization types (anonymous
types, IGrouping, EntityCollection)
Build expression to materialize a data record.
Build expression to materialize the spanned information
Visit(SimpleCollectionColumnMap)
Visit(DiscriminatedCollectionColumnMap)
Common code for both Simple and Discrminated Column Maps.
Common code for both Simple and Discriminated Column Maps.
Returns the CLR Type of the element of the collection
Build up the coordinator graph using Enter/ExitCoordinatorTranslateScope.
Return an expression to read the coordinator from a state slot at
runtime. This is the method where we store the expressions we've
been building into the CoordinatorScratchpad, which we'll compile
later, once we've left the visitor.
Visit(RefColumnMap)
If the entityKey has a value, then return it otherwise return a null
valued EntityKey. The EntityKey construction is the tricky part.
Visit(ScalarColumnMap)
Pretty basic stuff here; we just call the method that matches the
type of the column. Of course we have to handle nullable/non-nullable
types, and non-value types.
Visit(VarRefColumnMap)
This should throw; VarRefColumnMaps should be removed by the PlanCompiler.
Allocates a slot in 'Shaper.State' which can be used as storage for
materialization tasks (e.g. remembering key values for a nested collection)
Return the CLR type we're supposed to materialize for the TypeUsage
Return the CLR type we're supposed to materialize for the EdmType
Get the ConstructorInfo for the type specified, and ensure we keep track
of any security requirements that the type has.
Retrieves object mapping metadata for the given type. The first time a type
is encountered, we cache the metadata to avoid repeating the work for every
row in result.
Caching at the materializer rather than workspace/metadata cache level optimizes
for transient types (including row types produced for span, LINQ initializations,
collections and projections).
Remove spanned info from the edmType
Creates an expression representing an inline delegate of type Func{Shaper, body.Type};
Creates expression to construct an EntityKey. Assumes that both the key has
a value (Emit_EntityKey_HasValue == true) and that the EntitySet has value
(EntitySet != null).
Scratchpad for topmost nested reader coordinator.
Gets number of 'Shaper.State' slots allocated (used to hold onto intermediate
values during materialization)
Struct containing the requested type and parent column map used
as the arg in the Translator visitor.
Copied from System.Data.dll
Core function for parsing the multipart identifer string.
Note: Left quote strings need to correspond 1 to 1 with the right quote strings
example: "ab" "cd", passed in for the left and the right quote
would set a or b as a starting quote character.
If a is the starting quote char then c would be the ending quote char
otherwise if b is the starting quote char then d would be the ending quote character.
string to parse
set of characters which are valid quoteing characters to initiate a quote
set of characters which are valid to stop a quote, array index's correspond to the the leftquote array.
separator to use
Represents a compiled LINQ ObjectQuery cache entry
Represents the abstract base class for all cache entry values in the query cache
querycachekey for this entry
strong reference to the target object
cache entry constructor
The payload of this cache entry.
Returns the query cache key
The merge option that was inferred during expression conversion.
A dictionary that contains a plan for each combination of
merge option and UseCSharpNullComparisonBehavior flag.
constructor
The cache key that targets this cache entry
The inferred merge option that applies to this cached query
Retrieves the execution plan for the specified merge option and UseCSharpNullComparisonBehavior flag. May return null if the
plan for the given merge option and useCSharpNullComparisonBehavior flag is not present.
The merge option for which an execution plan is required.
Flag indicating if C# behavior should be used for null comparisons.
The corresponding execution plan, if it exists; otherwise null .
Attempts to set the execution plan for 's merge option and
flag on
this cache entry to . If a plan already exists for that merge option and UseCSharpNullComparisonBehavior flag, the
current value is not changed but is returned to the caller. Otherwise is returned to the caller.
The new execution plan to add to this cache entry.
Flag indicating if C# behavior should be used for null comparisons.
The execution plan that corresponds to 's merge option, which may be
or may be a previously added execution plan.
Convenience method to retrieve the result type from the first non-null execution plan found on this cache entry.
The result type of any execution plan that is or could be added to this cache entry
true if at least one execution plan was present and a result type could be retrieved; otherwise false
represents an abstract cache key
entry hit counter
default string comparison kind - Ordinal
Determines whether two instances of QueryCacheContext are equal.
Equality is value based.
Returns QueryCacheContext instance HashCode
Updates hit count
default string comparer
Cache entry hit count
Gets/Sets Aging index for cache entry
Determines equality of this key with respect to
Returns the hashcode for this cache key
Returns a string representation of the state of this cache key
A string representation that includes query text, parameter information, include path information and merge option information about this cache key.
Represents EntityCommand Cache key context
Stored procedure or command text?
Entity Sql statement
parameter collection token
number of parameters
Combined Hashcode based on field hashcodes
Creates a new instance of EntityClientCacheKey given a entityCommand instance
determines equality of two cache keys based on cache context values
Returns Context Hash Code
Returns a string representation of the parameter list
returns the composed cache key
Represents an Entity-SQL-based ObjectQuery Cache key context
Aggregate hashcode based the hashcode of the properties of this cache key
The name of the default container in effect when the Entity-SQL text was parsed
(affects whether or not the text can be successfully parsed)
Entity Sql statement
Parameter collection token
Number of parameters
Concatenated representation of the Include span paths
The merge option in effect
Result type affects assembly plan
Whether the query is streaming or buffering
Creates a new instance of ObjectQueryCacheKey given a entityCommand instance
The default container name in effect when parsing the query (may be null)
The Entity-SQL text of the query
The number of parameters to the query
A string representation of the parameters to the query (may be null)
A string representation of the Include span paths in effect (may be null)
The merge option in effect. Required for result assembly.
Determines equality of two cache keys based on cache context values
Returns the hashcode for this cache key
Returns a string representation of the state of this cache key
A string representation that includes query text, parameter information, include path information and merge option information about this cache key.
Represents an ELinq-based ObjectQuery Cache key context
Aggregate hashcode based the hashcode of the properties of this cache key
DbExpression key
Parameter collection token
Number of parameters
Concatenated representation of the Include span paths
The merge option in effect
Result type affects assembly plan.
Whether the query is streaming or buffering
Flag indicating if the C# behavior should be used for null comparisons
Creates a new instance of LinqQueryCacheKey.
The DbExpression key of the linq query
The number of parameters to the query
A string representation of the parameters to the query (may be null)
A string representation of the Include span paths in effect (may be null)
The merge option in effect. Required for result assembly.
Flag indicating if the C# behavior should be used for null comparisons
The type of each result item - for a given query as a CLR type instance
Determines equality of two cache keys based on cache context values
Returns the hashcode for this cache key
Returns a string representation of the state of this cache key
Provides Query Execution Plan Caching Service
Thread safe.
Dispose must be called as there is no finalizer for this class
Default Soft maximum number of entries in the cache
Default value: 1000
Default high mark for starting sweeping process
default value: 80% of MaxNumberOfEntries
Recycler timer period
cache lock object
cache data
soft maximum number of entries in the cache
high mark of the number of entries to trigger the sweeping process
Eviction timer
Constructs a new Query Cache Manager instance, with default values for all 'configurable' parameters.
A new instance of configured with default entry count, load factor and recycle period
Cache Constructor
Maximum number of entries that the cache should contain.
The number of entries that must be present, as a percentage, before entries should be removed according to the eviction policy. Must be greater than 0 and less than or equal to 1.0
The interval, in milliseconds, at which the number of entries will be compared to the load factor and eviction carried out if necessary.
Adds new entry to the cache using "abstract" cache context and
value; returns an existing entry if the key is already in the
dictionary.
The existing entry in the dicitionary if already there; inQueryCacheEntry if none was found and inQueryCacheEntry was added instead.
true if the output entry was already found; false if it had to be added.
Lookup service for a cached value.
Clears the Cache
lookup service
true if cache hit, false if cache miss
Recycler handler. This method is called directly by the eviction timer.
It should take no action beyond invoking the method on the
cache manager instance passed as .
The cache manager instance on which the 'recycle' handler should be invoked
Aging factor
Sweeps the cache removing old unused entries.
This method implements the query cache eviction policy.
Dispose instance
Dispose must be called as there are no finalizers for this class
Periodically invokes cache cleanup logic on a specified instance,
and allows this periodic callback to be suspended, resumed or stopped in a thread-safe way.
Used to control multi-threaded accesses to this instance
The required interval between invocations of the cache cleanup logic
The underlying QueryCacheManger that the callback will act on
The underlying that implements the periodic callback
Permanently stops the eviction timer.
It will no longer generate periodic callbacks and further calls to , , or
,
though thread-safe, will have no effect.
If this eviction timer has already been stopped (using the method), returns false ; otherwise, returns true to indicate that the call successfully stopped and cleaned up the underlying timer instance.
Thread safe. May be called regardless of the current state of the eviction timer.
Once stopped, an eviction timer cannot be restarted with the method.
Pauses the operation of the eviction timer.
If this eviction timer has already been stopped (using the method), returns false ; otherwise, returns true to indicate that the call successfully suspended the inderlying
and no further periodic callbacks will be generated until the method is called.
Thread-safe. May be called regardless of the current state of the eviction timer.
Once suspended, an eviction timer may be resumed or stopped.
Causes this eviction timer to generate periodic callbacks, provided it has not been permanently stopped (using the
method).
Thread-safe. May be called regardless of the current state of the eviction timer.
Generates monotonically increasing names of the form PrefixCounter, where Prefix is an optional prefix string and Counter is the string representation of a monotonically increasing int value that wraps to zero at int.MaxValue
Constructs a new AliasGenerator with the specified prefix string
The prefix string that will appear as the first part of all aliases generated by this AliasGenerator. May be null to indicate that no prefix should be used
Generates the next alias and increments the Counter.
The generated alias
Generates the alias for the index.
index to generate the alias for
The generated alias
Rewrites the terms in a Boolean expression tree.
Term type for leaf nodes of input
Term type for leaf nodes of output
Initialize a new translator
Translator delegate; must not be null
Base class for clauses, which are (constrained) combinations of literals.
Type of normal form literal.
Abstract base class for nodes in normal form expressions, e.g. Conjunctive Normal Form
sentences.
Type of expression leaf term identifiers.
Initialize a new normal form node representing the given expression. Caller must
ensure the expression is logically equivalent to the node.
Expression logically equivalent to this node.
Utility method for delegation that return the expression corresponding to a given
normal form node.
Type of node
Node to examine.
Equivalent Boolean expression for the given node.
Gets an expression that is logically equivalent to this node.
Initialize a new clause.
Literals contained in the clause.
Type of expression tree to produce from literals.
Gets the literals contained in this clause.
A CNF clause is of the form:
Literal1 + Literal2 . ...
Each literal is of the form:
Term
or
!Term
Type of normal form literal.
Initialize a CNF clause.
Literals in clause.
Represents a sentence in conjunctive normal form, e.g.:
Clause1 . Clause2 . ...
Where each DNF clause is of the form:
Literal1 + Literal2 + ...
Each literal is of the form:
Term
or
!Term
Type of expression leaf term identifiers.
Abstract base class for normal form sentences (CNF and DNF)
Type of expression leaf term identifiers.
Type of clauses in the sentence.
Initialize a sentence given the appropriate sentence clauses. Produces
an equivalent expression by composing the clause expressions using
the given tree type.
Sentence clauses
Tree type for sentence (and generated expression)
Manages state used to translate BoolExpr to decision diagram vertices and back again.
Specializations exist for generic and DomainConstraint expressions.
Gets the solver instance associated with this conversion context. Used to reterieve
canonical Decision Diagram vertices for this context.
Given a term in BoolExpr, returns the corresponding decision diagram vertex.
Describes a vertex as a series of literal->vertex successors such that the literal
logically implies the given vertex successor.
Handles conversion of expressions to different forms (decision diagram, etc)
Converts the decision diagram (Vertex) wrapped by this converter and translates it into DNF
and CNF forms. I'll first explain the strategy with respect to DNF, and then explain how CNF
is achieved in parallel. A DNF sentence representing the expression is simply a disjunction
of every rooted path through the decision diagram ending in one. For instance, given the
following decision diagram:
A
0/ \1
B C
0/ \1 0/ \1
One Zero One
the following paths evaluate to 'One'
!A, !B
A, C
and the corresponding DNF is (!A.!B) + (A.C)
It is easy to compute CNF from the DNF of the negation, e.g.:
!((A.B) + (C.D)) iff. (!A+!B) . (!C+!D)
To compute the CNF form in parallel, we negate the expression (by swapping One and Zero sinks)
and collect negation of the literals along the path. In the above example, the following paths
evaluate to 'Zero':
!A, B
A, !C
and the CNF (which takes the negation of all literals in the path) is (!A+B) . (A+!C)
A DNF clause is of the form:
Literal1 . Literal2 . ...
Each literal is of the form:
Term
or
!Term
Type of normal form literal.
Initialize a DNF clause.
Literals in clause.
Represents a sentence in disjunctive normal form, e.g.:
Clause1 + Clause2 . ...
Where each DNF clause is of the form:
Literal1 . Literal2 . ...
Each literal is of the form:
Term
or
!Term
Type of expression leaf term identifiers.
Represents a constraint of the form:
Var1 in Range
Type of the variable.
Type of range elements.
Constructs a new constraint for the given variable and range.
Variable in constraint.
Range of constraint.
Constructor supporting a singleton range domain constraint
Inverts this constraint (this iff. !result)
!(Var in Range) iff. Var in (Var.Domain - Range)
Gets the variable for this constraint.
Get the range for this constraint.
Specialization of ConversionContext for DomainConstraint BoolExpr
A map from domain variables to decision diagram variables.
Translates a domain constraint term to an N-ary DD vertex.
Represents a variable with finite domain, e.g., c in {1, 2, 3}
Type of the identifier (c above -- it need not be int).
Type of domain variables (int in the above example).
Constructs a new domain variable.
Identifier
Domain of variable.
Comparer of identifier
Gets the variable.
Gets the domain of this variable.
Enumeration of Boolean expression node types.
Boolean expression that evaluates to false.
The type of leaf term identifiers in this expression.
Gets the one instance of FalseExpr
Generic implementation of a ConversionContext
Services related to different identifier types for Boolean expressions.
Returns negation of the given literal.
Creates a new conversion context.
Performs local simplification appropriate to the current identifier.
A Visitor class that returns all the leaves in a boolean expression
Type of leaf term identifiers in expression.
Represents a literal in a normal form expression of the form:
Term
or
!Term
Initialize a new literal.
Term
Sign of term
Creates a negated version of this literal.
!this
Gets literal term.
Gets sign of term.
VertexLiteral pair, used for ConversionContext.GetSuccessors
A tree expression that evaluates to true iff. its (single) child evaluates to false.
The type of leaf term identifiers in this expression.
Initialize a new Not expression with the given child.
Supports construction of canonical Boolean expressions as Reduced Ordered
Boolean Decision Diagrams (ROBDD). As a side effect, supports simplification and SAT:
- The canonical form of a valid expression is Solver.One
- The canonical form of an unsatisfiable expression is Solver.Zero
- The lack of redundancy in the trees allows us to produce compact representations
of expressions
Any method taking a Vertex argument requires that the argument is either
a 'sink' (Solver.One or Solver.Zero) or generated by this Solver instance.
Creates a leaf vertex; all children must be sinks
Returns a Vertex with the given configuration. If this configuration
is known, returns the existing vertex. Otherwise, a new
vertex is created. This ensures the vertex is unique in the context
of this solver.
Composes the given vertices to produce a new ROBDD.
Given parts of an if-then-else statement, determines the top variable (nearest
root). Used to determine which variable forms the root of a composed Vertex.
Returns 'vertex' evaluated for the given value of 'variable'. Requires that
the variable is less than or equal to vertex.Variable.
Checks requirements for vertices.
Checks requirements for a vertex argument (must not be null, and must be in scope
for this solver)
Supports value comparison of vertices. In general, we use reference comparison
since the Solver ensures a single instance of each canonical Vertex. The Solver
needs this comparer to ensure a single instance of each canonical Vertex though...
Record structure containing three values.
A term is a leaf node in a Boolean expression. Its value (T/F) is undefined.
The type of leaf term identifiers in this expression.
Construct a term.
Value comparer to use when comparing two term expressions.
Identifier/tag for this term.
Gets identifier for this term. This value is used to determine whether
two terms as equivalent.
Converts a BoolExpr to a Vertex within a solver.
Boolean expression that evaluates to true.
The type of leaf term identifiers in this expression.
Gets the one instance of TrueExpr
A node in a Reduced Ordered Boolean Decision Diagram. Reads as:
if 'Variable' then 'Then' else 'Else'
Invariant: the Then and Else children must refer to 'deeper' variables,
or variables with a higher value. Otherwise, the graph is not 'Ordered'.
All creation of vertices is mediated by the Solver class which ensures
each vertex is unique. Otherwise, the graph is not 'Reduced'.
Initializes a sink BDD node (zero or one)
Sink node representing the Boolean function '1' (true)
Sink node representing the Boolean function '0' (false)
Gets the variable tested by this vertex. If this is a sink node, returns
int.MaxValue since there is no variable to test (and since this is a leaf,
this non-existent variable is 'deeper' than any existing variable; the
variable value is larger than any real variable)
Note: do not modify elements.
Gets the result when Variable evaluates to true. If this is a sink node,
returns null.
Returns true if this is '1'.
Returns true if this is '0'.
Returns true if this is '0' or '1'.
Extends IComparer support to the (non-IComparable) byte[] type, based on by-value comparison.
An implementation of IEqualityComparer{object} that compares byte[] instances by value, and
delegates all other equality comparisons to a specified IEqualityComparer. In the default case,
this provides by-value comparison for instances of the CLR equivalents of all EDM primitive types.
Provides by-value comparison for instances of the CLR equivalents of all EDM primitive types.
Contains utility methods for construction of DB commands through generic
provider interfaces.
Consumes all rows and result sets from the reader. This allows client to retrieve
parameter values and intercept any store exceptions.
Reader to consume.
Asynchronously consumes all rows and result sets from the reader. This allows client to retrieve
parameter values and intercept any store exceptions.
requires: commandText must not be null
The command text must be in the form Container.FunctionImportName.
Given an entity command and entity transaction, passes through relevant state to store provider
command.
Entity command. Must not be null.
Entity transaction. Must not be null.
Store provider command that is being setup. Must not be null.
Given an entity command, store provider command and a connection, sets all output parameter values on the entity command.
The connection is used to determine how to map spatial values.
Entity command on which to set parameter values. Must not be null.
Store provider command from which to retrieve parameter values. Must not be null.
The connection on which the command was run. Must not be null
Returns a new array with the first element equal to and the remaining
elements taken from .
The element type of the arrays
An array that provides the successive elements of the new array
An instance the provides the first element of the new array
A new array containing the specified argument as the first element and the specified successive elements
Builds a balanced binary tree with the specified nodes as leaves.
Note that the current elements of MAY be overwritten
as the leaves are combined to produce the tree.
The type of each node in the tree
The leaf nodes to combine into an balanced binary tree
A function that produces a new node that is the combination of the two specified argument nodes
The single node that is the root of the balanced binary tree
Uses a stack to non-recursively traverse a given tree structure and retrieve the leaf nodes.
The type of each node in the tree structure
The node that represents the root of the tree
A function that determines whether or not a given node should be considered a leaf node
A function that traverses the tree by retrieving the immediate descendants of a (non-leaf) node.
An enumerable containing the leaf nodes (as determined by ) retrieved by traversing the tree from
using .
Remembers the result of evaluating an expensive function so that subsequent
evaluations are faster. Thread-safe.
Type of the argument to the function.
Type of the function result.
Constructs
Required. Function whose values are being cached.
Optional. Comparer used to determine if two functions arguments are the same.
Evaluates the wrapped function for the given argument. If the function has already
been evaluated for the given argument, returns cached value. Otherwise, the value
is computed and returned.
Function argument.
Function result.
Encapsulates a 'deferred' result. The result is constructed with a delegate (must not
be null) and when the user requests a value the delegate is invoked and stored.
Returns an element type of the collection returned by the function import.
Returns false, if element type cannot be determined.
effects: determines if the given function import returns collection type, and if so returns the type
Gets the resultSetIndexth return parameter for functionImport, or null if resultSetIndex is out of range
Gets the resultSetIndexth result edm type, and ensure that it is consistent with EntityType.
check that the type TElement and function metadata are consistent
Returns true iff member's is a simple non-structures scalar such as primitive or enum.
Given a table EntitySet this function finds out all C-side EntitySets that are mapped to the table.
Builds an undirected graph (represented as a directional graph with reciprocal navigation edges) of the all the types in the workspace.
This is used to traverse inheritance hierarchy up and down.
O(n), where n=number of types
A dictionary of type t -> set of types {s}, such that there is an edge between t and elem(s) iff t and s are related DIRECTLY via inheritance (child or parent type)
is A parent of b?
Add and Edge a --> b
Assumes edge does not exist
O(1)
Checks wither the given AssociationEnd's keys are sufficient for identifying a unique tuple in the AssociationSet.
This is possible because refconstraints make certain Keys redundant. We subtract such redundant key sof "other" ends
and see if what is left is contributed only from the given end's keys.
Check if all the SchemaErrors have the serverity of SchemaErrorSeverity.Warning
Instance of empty set with default comparer.
Initialize set with the same values and comparer as other set.
Initialize empty set with default comparer.
Initialize a set with the given elements and using default comparer.
Initializes an empty set with the given comparer.
Initialize a set with the given elements and comparer.
Determines whether the given element exists in the set.
Requires: !IsReadOnly
Adds given element to the set. If the set already contains
the element, does nothing.
Requires: !IsReadOnly
Adds given elements to the set. If the set already contains
one of the elements, does nothing.
Requires: !IsReadOnly
Removes given element from the set. If the set does not contain
the element, does nothing.
Requires: !IsReadOnly
Removes all elements from the set.
Returns an array containing all elements of the set. Order is arbitrary.
Requires: other set must not be null and must have the same comparer.
Returns true if this set contains the same elements as the other set.
Requires: other set must not be null and must have the same comparer.
Returns true if all elements in this set are contained in the other set.
Requires: other set must not be null and must have the same comparer.
Returns true if this set and other set have some elements in common.
Requires: !IsReadOnly
Requires: other collection must not be null.
Subtracts other set from this set, leaving the result in this.
Requires: other collection must not be null.
Subtracts other set from this set, returning result.
Requires: !IsReadOnly
Requires: other collection must not be null.
Unions other set with this set, leaving the result in this set.
Requires: other collection must not be null.
Unions other set with this set, returning the result.
Requires: !IsReadOnly
Requires: other set must not be null and must have the same comparer.
Intersects this set and other set, leaving the result in this set.
Returns a readonly version of this set.
Makes this set readonly and returns this set.
Returns aggregate hash code of all elements in this set.
Returns typed enumerator over elements of the set.
Uses HashSet<TElement>.Enumerator to avoid boxing struct.
Returns an untyped enumeration of elements in the set.
Enumeration of set members.
Gets the number of elements in this set.
Gets the comparer used to determine equality and hash codes for elements of the set.
Converts an enumeration of values to a delimited string list.
Type of elements to convert.
Values. If null, returns empty string.
Converter. If null, uses default invariant culture converter.
Delimiter. If null, uses default (', ')
Delimited list of values in string.
Comparer that treats two strings as equivalent if they differ only by trailing
spaces, e.g. 'A' eq 'A '. Useful when determining if a set of values is unique
even given the possibility of padding (consider SQL Server char and nchar columns)
or to lookup values when the set of values is known to honor this uniqueness constraint.
Typed version of TrailingSpaceComparer.
Represents a node in a hierarchical collection of information strings.
Intended as a common way mechanism to represent tree structures for debugging (using the TreePrinter class).
A node consists of a string (represented as a StringBuilder), its collection of child nodes, and an optional Tag value.
Constructs a new TreeNode with the specified text, tag value and child nodes
The initial value of the new node's text
An optional list of initial child nodes
The current text of this node.
The collection of child nodes for this node, which may be empty.
Class representing a parameter collection used in EntityCommand
Adds the specified object to the .
The index of the new object.
An .
Adds an array of values to the end of the
.
The values to add.
Removes all the objects from the
.
Determines whether the specified is in this
.
true if the contains the value; otherwise false.
The value.
Copies all the elements of the current to the specified one-dimensional
starting at the specified destination index.
The one-dimensional that is the destination of the elements copied from the current
.
A 32-bit integer that represents the index in the at which copying starts.
Returns an enumerator that iterates through the
.
An for the
.
Gets the location of the specified with the specified name.
The zero-based location of the specified with the specified case-sensitive name. Returns -1 when the object does not exist in the
.
The case-sensitive name of the to find.
Gets the location of the specified in the collection.
The zero-based location of the specified that is a
in the collection. Returns -1 when the object does not exist in the
.
The to find.
Inserts an into the
at the specified index.
The zero-based index at which value should be inserted.
An to be inserted in the
.
Removes the specified parameter from the collection.
A object to remove from the collection.
Removes the from the
at the specified index.
The zero-based index of the object to remove.
Removes the from the
at the specified parameter name.
The name of the to remove.
Constructs the EntityParameterCollection object
Adds the specified object to the
.
A new object.
The to add to the collection.
The specified in the value parameter is already added to this or another
.
The parameter passed was not a .
The value parameter is null.
Adds a value to the end of the .
A object.
The name of the parameter.
The value to be added.
Adds a to the
given the parameter name and the data type.
A new object.
The name of the parameter.
One of the values.
Adds a to the
with the parameter name, the data type, and the column length.
A new object.
The name of the parameter.
One of the values.
The column length.
Adds an array of values to the end of the
.
The values to add.
Determines whether the specified is in this
.
true if the contains the value; otherwise false.
The value.
Copies all the elements of the current to the specified
starting at the specified destination index.
The that is the destination of the elements copied from the current
.
A 32-bit integer that represents the index in the
at which copying starts.
Gets the location of the specified in the collection.
The zero-based location of the specified that is a
in the collection. Returns -1 when the object does not exist in the
.
The to find.
Inserts a object into the
at the specified index.
The zero-based index at which value should be inserted.
A object to be inserted in the
.
Marks that this collection has been changed
Removes the specified from the collection.
A object to remove from the collection.
The parameter is not a .
The parameter does not exist in the collection.
Reset the dirty flag on the collection
Gets an Integer that contains the number of elements in the
.
The number of elements in the as an Integer.
Gets a value that indicates whether the
has a fixed size.
Returns true if the has a fixed size; otherwise false.
Gets a value that indicates whether the
is read-only.
Returns true if the is read only; otherwise false.
Gets a value that indicates whether the
is synchronized.
Returns true if the is synchronized; otherwise false.
Gets an object that can be used to synchronize access to the
.
An object that can be used to synchronize access to the
.
Gets the at the specified index.
The at the specified index.
The zero-based index of the parameter to retrieve.
The specified index does not exist.
Gets the with the specified name.
The with the specified name.
The name of the parameter to retrieve.
The specified name does not exist.
Gets whether this collection has been changes since the last reset
Class representing a command for the conceptual layer
Initializes a new instance of the class using the specified values.
Initializes a new instance of the class with the specified statement.
The text of the command.
Constructs the EntityCommand object with the given eSQL statement and the connection object to use
The eSQL command text to execute
The connection object
Resolver used to resolve DbProviderServices
Initializes a new instance of the class with the specified statement and connection.
The text of the command.
A connection to the data source.
Initializes a new instance of the class with the specified statement, connection and transaction.
The text of the command.
A connection to the data source.
The transaction in which the command executes.
Internal constructor used by EntityCommandDefinition
The prepared command definition that can be executed using this EntityCommand
Constructs a new EntityCommand given a EntityConnection and an EntityCommandDefition. This
constructor is used by ObjectQueryExecution plan to execute an ObjectQuery.
The connection against which this EntityCommand should execute
The prepared command definition that can be executed using this EntityCommand
Cancels the execution of an .
Creates a new instance of an object.
A new instance of an object.
Create and return a new parameter object representing a parameter in the eSQL statement
Executes the command and returns a data reader.
The that contains the results.
Compiles the into a command tree and passes it to the underlying store provider for execution, then builds an
out of the produced result set using the specified
.
The that contains the results.
One of the values.
Asynchronously executes the command and returns a data reader for reading the results. May only
be called on CommandType.CommandText (otherwise, use the standard Execute* methods)
A task that represents the asynchronous operation.
The task result contains an EntityDataReader object.
For stored procedure commands, if called
for anything but an entity collection result
Asynchronously executes the command and returns a data reader for reading the results. May only
be called on CommandType.CommandText (otherwise, use the standard Execute* methods)
A to observe while waiting for the task to complete.
A task that represents the asynchronous operation.
The task result contains an EntityDataReader object.
For stored procedure commands, if called
for anything but an entity collection result
Asynchronously executes the command and returns a data reader for reading the results. May only
be called on CommandType.CommandText (otherwise, use the standard Execute* methods)
The behavior to use when executing the command
A task that represents the asynchronous operation.
The task result contains an EntityDataReader object.
For stored procedure commands, if called
for anything but an entity collection result
Asynchronously executes the command and returns a data reader for reading the results. May only
be called on CommandType.CommandText (otherwise, use the standard Execute* methods)
The behavior to use when executing the command
A to observe while waiting for the task to complete.
A task that represents the asynchronous operation.
The task result contains an EntityDataReader object.
For stored procedure commands, if called
for anything but an entity collection result
Executes the command and returns a data reader for reading the results
The behavior to use when executing the command
A DbDataReader object
Asynchronously executes the command and returns a data reader for reading the results
The behavior to use when executing the command
The token to monitor for cancellation requests
A task that represents the asynchronous operation.
The task result contains a DbDataReader object.
Executes the current command.
The number of rows affected.
Asynchronously executes the command and discard any results returned from the command
A to observe while waiting for the task to complete.
A task that represents the asynchronous operation.
The task result contains the number of rows affected.
Executes the command, and returns the first column of the first row in the result set. Additional columns or rows are ignored.
The first column of the first row in the result set, or a null reference (Nothing in Visual Basic) if the result set is empty.
Clear out any "compile" state
Compiles the entity-level command and creates a prepared version of the command.
Creates a prepared version of this command without regard to the current connection state.
Called by both and .
Ensures we have the command tree, either the user passed us the tree, or an eSQL statement that we need to parse
Get the command definition for the command; will construct one if there is not already
one constructed, which means it will prepare the command on the client.
the command definition
Given an entity command, returns the associated entity transaction and performs validation
to ensure the transaction is consistent.
Entity transaction
Compiles the entity-level command and returns the store command text.
The store command text.
Gets an entitycommanddefinition from cache if a match is found for the given cache key.
out param. returns the entitycommanddefinition for a given cache key
true if a match is found in cache, false otherwise
Creates a commandDefinition for the command, using the options specified.
Note: This method must not be side-effecting of the command
the command definition
Checking the integrity of this command object to see if it's ready to be prepared or executed
Checking if the command is still tied to a data reader, if so, then the reader must still be open and we throw
Returns a dictionary of parameter name and parameter typeusage in s-space from the entity parameter
collection given by the user.
Call only when the reader associated with this command is closing. Copies parameter values where necessary.
Tells the EntityCommand about the underlying store provider command in case it needs to pull parameter values
when the reader is closing.
Gets or sets the used by the
.
The connection used by the entity command.
The connection object used for executing the command
Gets or sets an Entity SQL statement that specifies a command or stored procedure to execute.
The Entity SQL statement that specifies a command or stored procedure to execute.
Gets or sets the command tree to execute; only one of the command tree or the command text can be set, not both.
The command tree to execute.
Gets or sets the amount of time to wait before timing out.
The time in seconds to wait for the command to execute.
Gets or sets a value that indicates how the
property is to be interpreted.
One of the enumeration values.
Gets the parameters of the Entity SQL statement or stored procedure.
The parameters of the Entity SQL statement or stored procedure.
The collection of parameters for this command
Gets or sets the transaction within which the executes.
The transaction within which the executes.
The transaction that this command executes in
Gets or sets how command results are applied to rows being updated.
One of the values.
Gets or sets a value that indicates whether the command object should be visible in a Windows Form Designer control.
true if the command object should be visible in a Windows Form Designer control; otherwise, false.
Gets or sets a value that indicates whether the query plan caching is enabled.
true if the query plan caching is enabled; otherwise, false.
Event raised when the reader is closing.
Class for test purposes only, used to abstract the creation of object.
Class representing a connection for the conceptual layer. An entity connection may only
be initialized once (by opening the connection). It is subsequently not possible to change
the connection string, attach a new store connection, or change the store connection string.
Initializes a new instance of the class.
Initializes a new instance of the class, based on the connection string.
The provider-specific connection string.
An invalid connection string keyword has been provided, or a required connection string keyword has not been provided.
Initializes a new instance of the class with a specified
and
.
A to be associated with this
.
The underlying data source connection for this object.
The workspace or connection parameter is null.
The conceptual model is missing from the workspace.-or-The mapping file is missing from the workspace.-or-The storage model is missing from the workspace.-or-The connection is not in a closed state.
The connection is not from an ADO.NET Entity Framework-compatible provider.
Constructs the EntityConnection from Metadata loaded in memory
Workspace containing metadata information.
Store connection.
If set to true the store connection is disposed when the entity connection is disposed, otherwise the caller must dispose the store connection.
This constructor allows to skip the initialization code for testing purposes.
Handles the event when the database connection state changes.
The source of the event.
The data for the event.
Formats provider string to replace " with \" so it can be appended within quotation marks "..."
Returns the associated with this
.
The associated with this
.
The inline connection string contains an invalid Metadata keyword value.
Establishes a connection to the data source by calling the underlying data provider's Open method.
An error occurs when you open the connection, or the name of the underlying data provider is not known.
The inline connection string contains an invalid Metadata keyword value.
Asynchronously establishes a connection to the data store by calling the Open method on the underlying data provider
A to observe while waiting for the task to complete.
A task that represents the asynchronous operation.
Creates a new instance of an , with the
set to this
.
An object.
The name of the underlying data provider is not known.
Create a new command object that uses this connection object
Closes the connection to the database.
An error occurred when closing the connection.
Not supported.
Not supported.
When the method is called.
Begins a transaction by using the underlying provider.
A new . The returned
instance can later be associated with the
to execute the command under that transaction.
The underlying provider is not known.-or-The call to
was made on an
that already has a current transaction.-or-The state of the
is not
.
Begins a transaction with the specified isolation level by using the underlying provider.
A new . The returned
instance can later be associated with the
to execute the command under that transaction.
The isolation level of the transaction.
The underlying provider is not known.-or-The call to
was made on an
that already has a current transaction.-or-The state of the
is not
.
Begins a database transaction
The isolation level of the transaction
An object representing the new transaction
Enables the user to pass in a database transaction created outside of the Entity Framework
if you want the framework to execute commands within that external transaction.
Or pass in null to clear the Framework's knowledge of the current transaction.
the EntityTransaction wrapping the DbTransaction or null if cleared
Thrown if the transaction is already completed
Thrown if the connection associated with the object is already enlisted in a
transaction
Thrown if the connection associated with the object is already participating in a transaction
Thrown if the connection associated with the transaction does not match the Entity Framework's connection
Enlists this in the specified transaction.
The transaction object to enlist into.
The state of the is not
.
Cleans up this connection object
true to release both managed and unmanaged resources; false to release only unmanaged resources
Clears the current DbTransaction for this connection
Reinitialize this connection object to use the new connection string
The new connection string
Clears the current DbTransaction and the transaction the user enlisted the connection in
with EnlistTransaction() method.
Clears the transaction the user elinsted in using EnlistTransaction() method.
Event handler invoked when the transaction has completed (either by committing or rolling back).
The source of the event.
The that contains the event data.
Note that to avoid threading issues we never reset the field here.
Store-specific helper method invoked as part of Close()/Dispose().
Uses DbProviderFactory to create a DbConnection
Gets or sets the connection string.
The connection string required to establish the initial connection to a data source. The default value is an empty string. On a closed connection, the currently set value is returned. If no value has been set, an empty string is returned.
An attempt was made to set the property after the
’s was initialized. The
is initialized either when the instance is constructed through the overload that takes a
as a parameter, or when the
instance has been opened.
An invalid connection string keyword has been provided or a required connection string keyword has not been provided.
Gets the number of seconds to wait when attempting to establish a connection before ending the attempt and generating an error.
The time (in seconds) to wait for a connection to open. The default value is the underlying data provider's default time-out.
The value set is less than 0.
Gets the name of the current database, or the database that will be used after a connection is opened.
The value of the Database property of the underlying data provider.
The underlying data provider is not known.
Gets the property of the underlying provider if the
is open. Otherwise, returns
.
, if and only if both the
’s internal state and the underlying provider's
are open. If the
’s state is open but the provider's
is closed, this property returns
. Otherwise, it returns
.
Gets the name or network address of the data source to connect to.
The name of the data source. The default value is an empty string.
The underlying data provider is not known.
Gets a string that contains the version of the data source to which the client is connected.
The version of the data source that is contained in the provider connection string.
The connection is closed.
Gets the provider factory associated with EntityConnection
Gets the DbProviderFactory for the underlying provider
Provides access to the underlying data source connection that is used by the
object.
The for the data source connection.
Gets the current transaction that this connection is enlisted in
Whether the user has enlisted in transaction using EnlistTransaction method
Class representing a connection string builder for the entity client provider
Initializes a new instance of the class.
Initializes a new instance of the class using the supplied connection string.
A provider-specific connection string to the underlying data source.
Clears the contents of the instance.
Determines whether the contains a specific key.
Returns true if the contains an element that has the specified key; otherwise, false.
The key to locate in the .
Retrieves a value corresponding to the supplied key from this
.
Returns true if keyword was found in the connection string; otherwise, false.
The key of the item to retrieve.
The value corresponding to keyword.
keyword contains a null value (Nothing in Visual Basic).
Removes the entry with the specified key from the
instance.
Returns true if the key existed in the connection string and was removed; false if the key did not exist.
The key of the keyword/value pair to be removed from the connection string in this
.
keyword is null (Nothing in Visual Basic)
Gets or sets the name of a section as defined in a configuration file.
The name of a section in a configuration file.
Gets or sets the name of the underlying .NET Framework data provider in the connection string.
The invariant name of the underlying .NET Framework data provider.
Gets or sets the metadata locations in the connection string.
Gets or sets the metadata locations in the connection string.
Gets or sets the inner, provider-specific connection string.
The inner, provider-specific connection string.
Gets a value that indicates whether the
has a fixed size.
Returns true in every case, because the
supplies a fixed-size collection of keyword/value pairs.
Gets an that contains the keys in the
.
An that contains the keys in the
.
Returns a hash table object containing all the valid keywords. This is really the same as the Keys
property, it's just that the returned object is a hash table.
Gets or sets the value associated with the specified key. In C#, this property is the indexer.
The value associated with the specified key.
The key of the item to get or set.
keyword is a null reference (Nothing in Visual Basic).
Tried to add a key that does not exist in the available keys.
Invalid value in the connection string (specifically, a Boolean or numeric value was expected but not supplied).
A data reader class for the entity client provider
The constructor for the data reader, each EntityDataReader must always be associated with a EntityCommand and an underlying
DbDataReader. It is expected that EntityDataReader only has a reference to EntityCommand and doesn't assume responsibility
of cleaning the command object, but it does assume responsibility of cleaning up the store data reader object.
For test purposes only.
Closes the object.
Releases the resources consumed by this and calls
.
true to release both managed and unmanaged resources; false to release only unmanaged resources.
Gets the value of the specified column as a Boolean.
The value of the specified column.
The zero-based column ordinal.
Gets the value of the specified column as a byte.
The value of the specified column.
The zero-based column ordinal.
Reads a stream of bytes from the specified column, starting at location indicated by dataIndex , into the buffer, starting at the location indicated by bufferIndex .
The actual number of bytes read.
The zero-based column ordinal.
The index within the row from which to begin the read operation.
The buffer into which to copy the data.
The index with the buffer to which the data will be copied.
The maximum number of characters to read.
Gets the value of the specified column as a single character.
The value of the specified column.
The zero-based column ordinal.
Reads a stream of characters from the specified column, starting at location indicated by dataIndex , into the buffer, starting at the location indicated by bufferIndex .
The actual number of characters read.
The zero-based column ordinal.
The index within the row from which to begin the read operation.
The buffer into which to copy the data.
The index with the buffer to which the data will be copied.
The maximum number of characters to read.
Gets the name of the data type of the specified column.
The name of the data type.
The zero-based column ordinal.
Gets the value of the specified column as a object.
The value of the specified column.
The zero-based column ordinal.
Returns a object for the requested column ordinal that can be overridden with a provider-specific implementation.
A data reader.
The zero-based column ordinal.
Gets the value of the specified column as a object.
The value of the specified column.
The zero-based column ordinal.
Gets the value of the specified column as a double-precision floating point number.
The value of the specified column.
The zero-based column ordinal.
Gets the data type of the specified column.
The data type of the specified column.
The zero-based column ordinal.
Gets the value of the specified column as a single-precision floating point number.
The value of the specified column.
The zero-based column ordinal.
Gets the value of the specified column as a globally-unique identifier (GUID).
The value of the specified column.
The zero-based column ordinal.
Gets the value of the specified column as a 16-bit signed integer.
The value of the specified column.
The zero-based column ordinal.
Gets the value of the specified column as a 32-bit signed integer.
The value of the specified column.
The zero-based column ordinal.
Gets the value of the specified column as a 64-bit signed integer.
The value of the specified column.
The zero-based column ordinal.
Gets the name of the column, given the zero-based column ordinal.
The name of the specified column.
The zero-based column ordinal.
Gets the column ordinal given the name of the column.
The zero-based column ordinal.
The name of the column.
The name specified is not a valid column name.
Returns the provider-specific field type of the specified column.
The object that describes the data type of the specified column.
The zero-based column ordinal.
Gets the value of the specified column as an instance of .
The value of the specified column.
The zero-based column ordinal.
Gets all provider-specific attribute columns in the collection for the current row.
The number of instances of in the array.
An array of into which to copy the attribute columns.
Returns a that describes the column metadata of the
.
A that describes the column metadata.
Gets the value of the specified column as an instance of .
The value of the specified column.
The zero-based column ordinal.
Gets the value of the specified column as an instance of .
The value of the specified column.
The zero-based column ordinal.
Populates an array of objects with the column values of the current row.
The number of instances of in the array.
An array of into which to copy the attribute columns.
Gets a value that indicates whether the column contains nonexistent or missing values.
true if the specified column is equivalent to ; otherwise, false.
The zero-based column ordinal.
Advances the reader to the next result when reading the results of a batch of statements.
true if there are more result sets; otherwise, false.
Asynchronously moves the reader to the next result set when reading a batch of statements
A to observe while waiting for the task to complete.
A task that represents the asynchronous operation.
The task result contains true if there are more result sets; false otherwise.
Advances the reader to the next record in a result set.
true if there are more rows; otherwise, false.
Asynchronously moves the reader to the next row of the current result set
A to observe while waiting for the task to complete.
A task that represents the asynchronous operation.
The task result contains true if there are more rows; false otherwise.
Returns an that can be used to iterate through the rows in the data reader.
An that can be used to iterate through the rows in the data reader.
Returns a nested .
The nested data record.
The number of the DbDataRecord to return.
Returns nested readers as objects.
The nested readers as objects.
The ordinal of the column.
Gets a value indicating the depth of nesting for the current row.
The depth of nesting for the current row.
Gets the number of columns in the current row.
The number of columns in the current row.
Gets a value that indicates whether this contains one or more rows.
true if the contains one or more rows; otherwise, false.
Gets a value indicating whether the is closed.
true if the is closed; otherwise, false.
Gets the number of rows changed, inserted, or deleted by execution of the SQL statement.
The number of rows changed, inserted, or deleted. Returns -1 for SELECT statements; 0 if no rows were affected or the statement failed.
Gets the value of the specified column as an instance of .
The value of the specified column.
The zero-based column ordinal
Gets the value of the specified column as an instance of .
The value of the specified column.
The name of the column.
Gets the number of fields in the that are not hidden.
The number of fields that are not hidden.
Gets for this
.
The information of a data record.
Class representing a parameter used in EntityCommand
Initializes a new instance of the class using the default values.
Initializes a new instance of the class using the specified parameter name and data type.
The name of the parameter.
One of the values.
Initializes a new instance of the class using the specified parameter name, data type and size.
The name of the parameter.
One of the values.
The size of the parameter.
Initializes a new instance of the class using the specified properties.
The name of the parameter.
One of the values.
The size of the parameter.
The name of the source column.
Initializes a new instance of the class using the specified properties.
The name of the parameter.
One of the values.
The size of the parameter.
One of the values.
true to indicate that the parameter accepts null values; otherwise, false.
The number of digits used to represent the value.
The number of decimal places to which value is resolved.
The name of the source column.
One of the values.
The value of the parameter.
Helper method to validate the parameter name; Ideally we'd only call this once, but
we have to put an argumentName on the Argument exception, and the property setter would
need "value" which confuses folks when they call the constructor that takes the value
of the parameter. c'est la vie.
Resets the type associated with the .
Marks that this parameter has been changed
Determines the size of the given object
Clones this parameter object
The new cloned object
Clones this parameter object
Get the type usage for this parameter in model terms.
The type usage for this parameter
Because GetTypeUsage throws CommandValidationExceptions, it should only be called from EntityCommand during command execution
Reset the dirty flag on the collection
Returns a string representation of the parameter.
A string representation of the parameter.
Gets or sets the name of the entity parameter.
The name of the entity parameter.
Gets or sets the of the parameter.
One of the values.
Gets or sets the type of the parameter, expressed as an EdmType.
The type of the parameter, expressed as an EdmType.
Gets or sets the number of digits used to represent the
property.
The number of digits used to represent the value.
Gets or sets the number of decimal places to which
is resolved.
The number of decimal places to which value is resolved.
Gets or sets the value of the parameter.
The value of the parameter.
Gets whether this collection has been changes since the last reset
Indicates whether the DbType property has been set by the user;
Indicates whether the Direction property has been set by the user;
Indicates whether the IsNullable property has been set by the user;
Indicates whether the Precision property has been set by the user;
Indicates whether the Scale property has been set by the user;
Indicates whether the Size property has been set by the user;
Gets or sets the direction of the parameter.
One of the values.
Gets or sets a value that indicates whether the parameter accepts null values.
true if null values are accepted; otherwise, false.
Gets or sets the maximum size of the data within the column.
The maximum size of the data within the column.
Gets or sets the name of the source column mapped to the and used for loading or returning the
.
The name of the source column mapped to the dataset and used for loading or returning the value.
Gets or sets a value that indicates whether source column is nullable.
true if source column is nullable; otherwise, false.
Gets or sets the to use when loading the value.
One of the values.
Class representing a provider factory for the entity client provider
A singleton object for the entity client provider factory object.
This remains a public field (not property) because DbProviderFactory expects a field.
Constructs the EntityProviderFactory object, this is private as users shouldn't create it directly
Returns a new instance of the provider's class that implements the
class.
A new instance of .
Throws a . This method is currently not supported.
This method is currently not supported.
Returns a new instance of the provider's class that implements the
class.
A new instance of .
Returns a new instance of the provider's class that implements the
class.
A new instance of .
Throws a . This method is currently not supported.
This method is currently not supported.
Returns a new instance of the provider's class that implements the
class.
A new instance of .
Throws a . This method is currently not supported.
This method is currently not supported.
Returns the requested class.
A new instance of . The supported types are
,
, and
. Returns null (or Nothing in Visual Basic) for every other type.
The to return.
Class representing a transaction for the conceptual layer
Constructs the EntityTransaction object with an associated connection and the underlying store transaction
The EntityConnetion object owning this transaction
The underlying transaction object
Commits the underlying transaction.
Rolls back the underlying transaction.
Cleans up this transaction object
true to release both managed and unmanaged resources; false to release only unmanaged resources
Helper method to wrap EntityConnection.ClearCurrentTransaction()
Gets for this
.
An to the underlying data source.
The connection object owning this transaction object
Gets the isolation level of this .
An enumeration value that represents the isolation level of the underlying transaction.
Gets the DbTransaction for the underlying provider transaction
Copied from System.Data.dll
For testing.
The class for provider services of the entity client
Singleton object
Create a Command Definition object, given the connection and command tree
command tree for the statement
an executable command definition object
connection and commandTree arguments must not be null
Ensures that the data space of the specified command tree is the model (C-) space
The command tree for which the data space should be validated
Create a EntityCommandDefinition object based on the prototype command
This method is intended for provider writers to build a default command definition
from a command.
prototype argument must not be null
prototype argument must be a EntityCommand
The IEntityAdapter interface allows adapters to support updates of entities stored in an IEntityCache.
Persists the changes made in the entity cache to the store.
An asynchronous version of Update, which
persists modifications described in the given cache.
The token to monitor for cancellation requests.
A Task containing the number of cache entries affected by the update.
Gets or sets the connection used by this adapter.
Gets or sets whether the IEntityCache.AcceptChanges should be called during a call to IEntityAdapter.Update.
Gets of sets the command timeout for update operations. If null, indicates that the default timeout
for the provider should be used.
Determine whether the cache has changes to apply.
ObjectStateManager to check. Must not be null.
true if cache contains changes entries; false otherwise
Gets or sets the map connection used by this adapter.
Gets or sets the map connection used by this adapter.
Gets or sets whether the IEntityCache.AcceptChanges should be called during a call to IEntityAdapter.Update.
Gets of sets the command timeout for update operations. If null, indicates that the default timeout
for the provider should be used.
nested store command definitions
generates column map for the store result reader
list of the parameters that the resulting command should have
Set of entity sets exposed in the command.
For testing.
Creates a new instance of .
Cannot prepare the command definition for execution; consult the InnerException for more information.
The ADO.NET Data Provider you are using does not support CommandTrees.
Constructor for testing/mocking purposes.
Determines the store type for a function import.
Handles the following negative scenarios
Nested ComplexType Property in ComplexType
Retrieves mapping for the given C-Space functionCommandTree
Create a DbCommand object from the definition, that can be executed
Creates ColumnMap for result assembly using the given reader.
Creates ColumnMap for result assembly using the given reader's resultSetIndexth result set.
Constructs a EntityParameter from a CQT parameter.
Internal execute method -- copies command information from the map command
to the command objects, executes them, and builds the result assembly
structures needed to return the data reader
behavior must specify CommandBehavior.SequentialAccess
input parameters in the entityCommand.Parameters collection must have non-null values.
Internal execute method -- Asynchronously copies command information from the map command
to the command objects, executes them, and builds the result assembly
structures needed to return the data reader
behavior must specify CommandBehavior.SequentialAccess
input parameters in the entityCommand.Parameters collection must have non-null values.
Execute the store commands, and return IteratorSources for each one
Execute the store commands, and return IteratorSources for each one
Updates storeParameter size, precision and scale properties from user provided parameter properties.
Return the string used by EntityCommand and ObjectQuery<T> ToTraceString
Property to expose the known parameters for the query, so the Command objects
constructor can poplulate it's parameter collection from.
Set of entity sets exposed in the command.
Generates a column map given a data reader.
Given a data reader, returns column map.
Data reader.
Column map.
IColumnMapGenerator wrapping a constant instance of a column map (invariant with respect
to the given DbDataReader)
Generates column maps for a non-composable function mapping.
Copied from System.Data.dll
Represents a failure while trying to prepare or execute a CommandCompilation
This exception is intended to provide a common exception that people can catch to
hold provider exceptions (SqlException, OracleException) when using the EntityCommand
to execute statements.
Initializes a new instance of .
Initializes a new instance of .
The message that describes the error.
Initializes a new instance of .
The error message that explains the reason for the exception.
The exception that caused the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified.
initializes a new instance EntityCommandCompilationException with a given SerializationInfo and StreamingContext
Represents a failure while trying to prepare or execute a CommandExecution
This exception is intended to provide a common exception that people can catch to
hold provider exceptions (SqlException, OracleException) when using the EntityCommand
to execute statements.
Initializes a new instance of .
Initializes a new instance of .
The message that describes the error.
Initializes a new instance of .
The error message that explains the reason for the exception.
The exception that caused the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified.
initializes a new instance EntityCommandExecutionException with a given SerializationInfo and StreamingContext
An identifier for an entity.
A singleton EntityKey by which a read-only entity is identified.
Returns a singleton EntityKey identifying an entity resulted from a failed TREAT.
A dictionary of names so that singleton instances of names can be used
Initializes a new instance of the class.
Initializes a new instance of the class with an entity set name and a generic
collection.
A that is the entity set name qualified by the entity container name.
A generic collection.Each key/value pair has a property name as the key and the value of that property as the value. There should be one pair for each property that is part of the
. The order of the key/value pairs is not important, but each key property should be included. The property names are simple names that are not qualified with an entity type name or the schema name.
Initializes a new instance of the class with an entity set name and an
collection of
objects.
A that is the entity set name qualified by the entity container name.
An collection of
objects with which to initialize the key.
Initializes a new instance of the class with an entity set name and specific entity key pair.
A that is the entity set name qualified by the entity container name.
A that is the name of the key.
An that is the key value.
Constructs an EntityKey from an IExtendedDataRecord representing the entity.
EntitySet of the entity
an IExtendedDataRecord that represents the entity
Constructs an EntityKey from an IExtendedDataRecord representing the entity.
EntitySet of the entity
Constructs a temporary EntityKey with the given EntitySet.
Temporary keys do not store key field names
EntitySet of the entity
Constructor optimized for a singleton key.
SQLBUDT 478655: Performance optimization: Does no integrity checking on the key value.
SQLBUDT 523554: Performance optimization: Does no validate type of key members.
EntitySet of the entity
The single value that composes the entity's key, assumed to contain the correct type.
Constructor optimized for a composite key.
SQLBUDT 478655: Performance optimization: Does no integrity checking on the key values.
SQLBUDT 523554: Performance optimization: Does no validate type of key members.
EntitySet of the entity
A list of the values (at least 2) that compose the entity's key, assumed to contain correct types.
Gets the entity set for this entity key from the given metadata workspace.
The for the entity key.
The metadata workspace that contains the entity.
The entity set could not be located in the specified metadata workspace.
Returns a value that indicates whether this instance is equal to a specified object.
true if this instance and obj have equal values; otherwise, false.
An to compare with this instance.
Returns a value that indicates whether this instance is equal to a specified
.
true if this instance and other have equal values; otherwise, false.
An object to compare with this instance.
Serves as a hash function for the current object.
is suitable for hashing algorithms and data structures such as a hash table.
A hash code for the current .
Compares two objects.
true if the key1 and key2 values are equal; otherwise, false.
A to compare.
A to compare.
Compares two objects.
true if the key1 and key2 values are not equal; otherwise, false.
A to compare.
A to compare.
Internal function to compare two keys by their values.
a key to compare
a key to compare
Entity sets are not significant for conceptual null keys
true if the two keys are equal, false otherwise
Returns an array of string/ pairs, one for each key value in this EntityKey,
where the string is the key member name and the DbExpression is the value in this EntityKey
for that key member, represented as a with the same result
type as the key member.
The entity set to which this EntityKey refers; used to verify that this key has the required key members
The name -> expression mappings for the key member values represented by this EntityKey
Returns a string representation of this EntityKey, for use in debugging.
Note that the returned string contains potentially sensitive information
(i.e., key values), and thus shouldn't be publicly exposed.
Returns the appropriate value for the given key name.
Validates the record parameter passed to the EntityKey constructor,
and converts the data into the form required by EntityKey. For singleton keys,
this is a single object. For composite keys, this is an object array.
the entity set metadata object which this key refers to
the parameter to validate
Verify that the types of the objects passed in to be used as keys actually match the types from the model.
This error is also caught when the entity is materialized and when the key value is set, at which time it
also throws ThrowSetInvalidValue().
SQLBUDT 513838. This error is possible and should be caught at run time, not in an assertion.
MetadataWorkspace used to resolve and validate types of enum keys.
The EntitySet to validate against
Verify that the types of the objects passed in to be used as keys actually match the types from the model.
This error is also caught when the entity is materialized and when the key value is set, at which time it
also throws ThrowSetInvalidValue().
SQLBUDT 513838. This error is possible and should be caught at run time, not in an assertion.
MetadataWorkspace used to resolve and validate types of enum keys.
The EntitySet to validate against
Wether to throw ArgumentException or InvalidOperationException.
Name of the argument in case of ArgumentException.
Validates whether type of the key matches the type of the key value.
MetadataWorkspace used to resolve and validate types of enum keys.
Edm key member.
The value of the key.
Whether to throw ArgumentException or InvalidOperation exception if validation fails.
Name of the argument to be used for ArgumentExceptions.
Asserts that the "state" of the EntityKey is correct, by validating assumptions
based on whether the key is a singleton, composite, or temporary.
whether we expect this EntityKey to be marked temporary
Helper method that is used to deserialize an .
Describes the source and destination of a given serialized stream, and provides an additional caller-defined context.
Helper method that is used to deserialize an .
Describes the source and destination of a given serialized stream and provides an additional caller-defined context.
Dev Note: this must be called from within a _lock block on _nameLookup
Gets a singleton EntityKey by which a read-only entity is identified.
Gets a singleton EntityKey identifying an entity resulted from a failed TREAT.
Gets or sets the name of the entity set.
A value that is the name of the entity set for the entity to which the
belongs.
Gets or sets the name of the entity container.
A value that is the name of the entity container for the entity to which the
belongs.
Gets or sets the key values associated with this .
A of key values for this
.
Gets a value that indicates whether the is temporary.
true if the is temporary; otherwise, false.
Information about a key that is part of an EntityKey.
A key member contains the key name and value.
Initializes a new instance of the class.
Initializes a new instance of the class with the specified entity key pair.
The name of the key.
The key value.
Returns a string representation of the entity key.
A string representation of the entity key.
Ensures that the instance can be written to (value must be null)
Gets or sets the name of the entity key.
The key name.
Gets or sets the value of the entity key.
The key value.
Valid actions in an On<Operation> element
no action
Cascade to other ends
Summary description for SchemaElement.
Validates this element and its children
Set the current line number and position for an XmlReader
the reader whose position is desired
Get the current line number and position for an XmlReader
the reader whose position is desired
the line number
the line position
Use to handle an attribute with an int data type
the reader positioned at the int attribute
The int field to be given the value found
true if an int value was successfuly extracted from the attribute, false otherwise.
Use to handle an attribute with an int data type
the reader positioned at the int attribute
The int field to be given the value found
true if an int value was successfuly extracted from the attribute, false otherwise.
Use this to jump through an element that doesn't need any processing
xml reader currently positioned at an element
Call handler for the current attribute
XmlReader positioned at the attribute
This overload assumes the default namespace
Call handler for the current element
XmlReader positioned at the element
true if element content should be skipped
Handle text data.
XmlReader positioned at Text, CData, or SignificantWhitespace
Handler for the Minimum attribute
xml reader currently positioned at Minimum attribute
Handler for the Maximum attribute
xml reader currently positioned at Maximum attribute
Handler for the Default attribute
xml reader currently positioned at Default attribute
Handler for the Constant attribute
xml reader currently positioned at Constant attribute
Handler for the Default attribute
xml reader currently positioned at Default attribute
Handler for the Default attribute
xml reader currently positioned at Default attribute
Kind of collection (applied to Properties)
Property is not a Collection
Collection has Bag semantics( unordered and duplicates ok)
Collection has List semantics
(Order is deterministic and duplicates ok)
class representing the Schema element in the schema
The concurrency mode for properties.
Default concurrency mode: the property is never validated
at write time
Fixed concurrency mode: the property is always validated at
write time
Summary description for Documentation.
Returns the wrapped metaDocumentation instance
Represents an EntityContainer element.
Summary description for SchemaType.
Gets the Namespace that this type is in.
Constructs an EntityContainer
Reference to the schema element.
Resolves the names to element references.
Do all validation for this element here, and delegate to all sub elements
Find the EntityContainerEntitySet in the same EntityContainer with the name from the extent
attribute
the name of the EntityContainerProperty to find
The EntityContainerProperty it found or null if it fails to find it
Validates that if there are more than one relationship set referring to the same type, each role of the relationship type
never refers to the same entity set
Adds a child EntitySet's tableKey (Schema/Table combination) to the validation collection
This is used to validate that no child EntitySets share a Schema.Table combination
Returns true if the given two ends are similar - the relationship type that this ends belongs to is the same
and the entity set refered by the ends are same and they have the same role name
Return the fully qualified name for entity container. Since EntityContainer no longer lives in a schema,
the FQName should be same as that of the Name
Represents an AssociationSet element.
Represents an RelationshipSet element.
Constructs an EntityContainerRelationshipSet
Reference to the schema element.
The method that is called when an Association attribute is encountered.
An XmlReader positioned at the Association attribute.
Used during the resolve phase to resolve the type name to the object that represents that type
Do all validation for this element here, and delegate to all sub elements
Adds any ends that need to be infered
For the given relationship end, find the EntityContainer Property that will work for the extent
The relationship end of the RelationshipSet that needs and extent
Null is none could be found, or the EntityContainerProperty that is the valid extent
The parent element as an EntityContainer
Constructs an EntityContainerAssociationSet
Reference to the schema element.
The method that is called when an End element is encountered.
The XmlReader positioned at the EndElement.
Create and add a EntityContainerEnd from the IRelationshipEnd provided
The relationship end of the end to add.
The entitySet to associate with the relationship end.
The ends defined and infered for this AssociationSet
Represents an element.
Represents an RelationshipSetEnd element.
Constructs an EntityContainerRelationshipSetEnd
Reference to the schema element.
This is the method that is called when an EntitySet Attribute is encountered.
The XmlRead positned at the extent attribute.
Used during the resolve phase to resolve the type name to the object that represents that type
Do all validation for this element here, and delegate to all sub elements
the End in the parent’s Association that this element refers to
The parent element as an EntityContainerProperty
Constructs an EntityContainerAssociationSetEnd
Reference to the schema element.
This is the method that is called when an Role Attribute is encountered.
The XmlRead positned at the extent attribute.
Used during the resolve phase to resolve the type name to the object that represents that type
If the role name is missing but an entity set is given, figure out what the
relationship end should be
The given EntitySet
The appropriate relationship end
Represents an EntitySet element.
Constructs an EntityContainerEntitySet
Reference to the schema element.
The method that is called when a Type attribute is encountered.
An XmlReader positioned at the Type attribute.
The method that is called when a DbSchema attribute is encountered.
An XmlReader positioned at the Type attribute.
The method that is called when a DbTable attribute is encountered.
An XmlReader positioned at the Type attribute.
Used during the resolve phase to resolve the type name to the object that represents that type
Represents an DefiningQuery element.
Constructs an EntityContainerEntitySet
Reference to the schema element.
Represents an Key element in an EntityType element.
Constructs an EntityContainerAssociationSetEnd
Reference to the schema element.
Used during the resolve phase to resolve the type name to the object that represents that type
Validate all the key properties
Summary description for ErrorCode.
Namespace attribute must be specified.
Precision out of range
Scale out of range
One of the required facets is missing
The facet isn't allow by the property type.
This facet value is constant and is specified in the schema
Multiplicity value was malformed
The value for the Action attribute is invalid or not allowed in the current context
An error occured processing the On<Operation> elements
Ends were given for the Property element of a EntityContainer that is not a RelationshipSet
The extent name used in the EntittyContainerType End does not match the name of any of the EntityContainerProperties in the containing EntityContainer
An end element was not given, and cannot be inferred because too many EntityContainerEntitySet elements that are good possibilities.
An end element was not given, and cannot be infered because there is no EntityContainerEntitySets that are the correct type to be used as an EntitySet.
Not a valid parameter direction for the parameter in a function
Unable to infer an optional schema part, to resolve this, be more explicit
Invalid facet attribute(s) specified in provider manifest
Invalid role value in the relationship constraint
Invalid Property in relationship constraint
Type mismatch between ToProperty and FromProperty in the relationship constraint
Invalid multiplicty in FromRole in the relationship constraint
The number of properties in the FromProperty and ToProperty in the relationship constraint must be identical
No Properties defined in either FromProperty or ToProperty in the relationship constraint
Missing constraint in relationship type in ssdl
Same role referred in the ToRole and FromRole of a referential constraint
Invalid value for attribute ParameterTypeSemantics
Invalid type used for a Relationship End Type
Invalid PrimitiveTypeKind
Invalid TypeConversion DestinationType
Expected a integer value between 0 - 255
Invalid Type specified in function
Precision must not be greater than 28
Properties that are part of entity key must be of scalar type
Binary and spatial type properties which are part of entity key are currently not supported
The primitive type kind does not have a prefered mapping
More than one PreferredMapping for a PrimitiveTypeKind
End with * multiplicity cannot have operations specified
EntitySet type has no keys
InvalidNumberOfParametersForAggregateFunction
InvalidParameterTypeForAggregateFunction
Composable functions and function imports must declare a return type.
Non-composable functions must not declare a return type.
Non-composable functions do not permit the aggregate, niladic, or built-in attributes.
Composable functions can not include command text attribute.
Functions should not declare both a store name and command text (only one or the other
can be used).
SystemNamespace
Empty DefiningQuery text
Schema, Table and DefiningQuery are all specified, and are mutualy exlusive
Conurency can't change for any sub types of an EntitySet type.
Function import return type must be either empty, a collection of entities, or a singleton scalar.
Function import specifies a non-existent entity set.
Function import specifies entity type return but no entity set.
Function import specifies entity type that does not derive from element type of entity set.
Function import specifies a binding to an entity set but does not return entities.
InternalError
Same Entity Set Taking part in the same role of the relationship set in two different relationship sets
Entity key refers to the same property twice
Function declares a ReturnType attribute and element
Nullable Complex Type not supported in Edm V1
Only Complex Collections supported in Edm V1.1
No Key defined on Entity Type
Invalid namespace specified in using element
Need not specify system namespace in using
Cannot use a reserved/system namespace as alias
Invalid qualification specified for type
Invalid Entity Container Name in extends attribute
Must specify namespace or alias of the schema in which this type is defined
Entity Container cannot extend itself
Failed to retrieve provider manifest
Mismatched Provider Manifest token values in SSDL artifacts
Missing Provider Manifest token value in SSDL artifact(s)
Empty CommandText element
Inconsistent Provider values in SSDL artifacts
Inconsistent Provider Manifest token values in SSDL artifacts
Duplicated Function overloads
InvalidProvider
FunctionWithNonEdmTypeNotSupported
ComplexTypeAsReturnTypeAndDefinedEntitySet
ComplexTypeAsReturnTypeAndDefinedEntitySet
A function import can be either composable or side-effecting, but not both.
A function import can specify an entity set or an entity set path, but not both.
In model functions facet attribute is allowed only on ScalarTypes
Captures several conditions where facets are placed on element where it should not exist.
Return type has not been declared
Collection and reference type parameters are not allowed in function imports.
The structural annotation cannot use codegen namespaces
Function and type cannot have the same fully qualified name
Cannot load different version of schema in the same ItemCollection
Expected bool value
End without Multiplicity specified
In SSDL, if composable function returns a collection of rows (TVF), all row properties must be of scalar types.
Only nullable parameters are supported in function imports.
Defining expression and entity set can not be specified at the same time.
Function specifies return type that does not derive from element type of entity set.
The specified type cannot be used as the underlying type of Enum type.
Duplicate enumeration member.
The calculated value for an enum member is ouf of Int64 range.
The enumeration value for an enum member is out of its underlying type range.
The Srid value is out of range.
A CSDL spatial type in a file without the UseSpatialUnionType annotation
Summary description for FilteredSchemaTypes.
Summary description for ISchemaElementLookUpTable.
Look up a name case insensitively
the key to look up
the element or null
class representing the Schema element in the schema
ctor for a schema function
Perform local validation on function definition.
The method that is called when a DbSchema attribute is encountered.
An XmlReader positioned at the Type attribute.
Handler for the Version attribute
xml reader currently positioned at Version attribute
Handler for the Namespace attribute
xml reader currently positioned at Namespace attribute
Handler for the Alias attribute
xml reader currently positioned at Alias attribute
Handler for the NiladicFunctionAttribute attribute
xml reader currently positioned at Namespace attribute
Handler for the IsComposableAttribute attribute
xml reader currently positioned at Namespace attribute
Handler for the Parameter Element
xml reader currently positioned at Parameter Element
Handler for the ReturnType element
xml reader currently positioned at ReturnType element
Handles ParameterTypeSemantics attribute
Represents an CommandText element.
Constructs an FunctionCommandText
Reference to the schema element.
validate the following negative scenarios:
ReturnType="Collection(EntityTypeA)"
ReturnType="Collection(EntityTypeA)" EntitySet="ESet.EType is not oftype EntityTypeA"
EntitySet="A"
ReturnType="Collection(ComplexTypeA)" EntitySet="something"
ReturnType="Collection(ComplexTypeA)", but the ComplexTypeA has a nested complexType property, this scenario will be handle in the runtime
Handler for the Default attribute
xml reader currently positioned at Default attribute
Abstracts the properties of a relationship element
Finds an end given the roleName
The role name of the end you want to find
The relationship end reference to set if the end is found
True if the end was found, and the passed in reference was set, False otherwise.
Name of the Relationship
The list of ends defined in the Relationship.
Returns the list of constraints on this relation
Is this an Association, or ...
Is this a foreign key (FK) relationship?
Abstracts the properties of an End element in a relationship
Name of the End
Type of the End
Multiplicity of the End
The On<Operation>s defined for the End
Summary description for Item.
Summary description for StructuredType.
Find a property by name in the type hierarchy
simple property name
the StructuredProperty object if name exists, null otherwise
Determines whether this type is of the same type as baseType,
or is derived from baseType.
true if this type is of the baseType, false otherwise
Add a member to the type
the member being added
See if a name is a member in a type or any of its base types
name to look for
if defined, the type that defines it
if defined, the member that defines it
how name was defined
Determine if a cycle exists in the type hierarchy: use two pointers to
walk the chain, if one catches up with the other, we have a cycle.
true if a cycle exists in the type hierarchy, false otherwise
Represents PropertyRef Element for Entity keys and referential constraints
construct a KeyProperty object
Since this method can be used in different context, this method does not add any errors
Please make sure that the caller of this methods handles the error case and add errors
appropriately
property chain from KeyedType to Leaf property
class representing the Schema element in the schema
ctor for a schema function
Summary description for Association.
Creates a Property object
The parent element
Gets the Type of the property
Gets the Type of the property
Represents an OnDelete, OnCopy, OnSecure, OnLock or OnSerialize element
Handle the Action attribute
reader positioned at Action attribute
The operation
The action
the parent element.
The possible operations for an On<Operation> element
the delete operation
Summary description for StructuredProperty.
The virtual schema for primitive data types
class representing the Schema element in the schema
Populate the schema object from a schema
TextReader containing the schema xml definition
Uri containing path to a schema file (may be null)
list of errors
Populate the schema object from a schema
TextReader containing the schema xml definition
Uri containing path to a schema file (may be null)
list of errors
Called by the validating reader when the schema is xsd invalid
the validating reader
information about the validation error
Vaidate the schema.
Called when all attributes for the schema element have been handled
Look up a fully qualified type name reference.
element containing the reference
the fully qualified type name
the referenced schema type
false if there was an error
Handler for the Namespace attribute
xml reader currently positioned at Namespace attribute
Handler for the Alias attribute
xml reader currently positioned at Alias attribute
Handler for the Provider attribute
xml reader currently positioned at Provider attribute
Handler for the ProviderManifestToken attribute
xml reader currently positioned at ProviderManifestToken attribute
Handler for the using element
Handler for the EnumType element.
Source xml reader currently positioned on the EnumType element.
Handler for the top level element
xml reader currently positioned at top level element
Handler for the EntityType element
xml reader currently positioned at EntityType element
Handler for the TypeInformation element
xml reader currently positioned at EntityType element
Handler for the Function element
xml reader currently positioned at EntityType element
Handler for the Association element
xml reader currently positioned at Association element
Handler for the InlineType element
xml reader currently positioned at InlineType element
Handler for the EntityContainer element
xml reader currently positioned at EntityContainer element
reset the error collection
old error list
The namespaceUri of the winfs xml namespace
Version of the EDM that this schema represents.
Alias for the schema (null if none)
Namespace of the schema
Uri containing the file that defines the schema
List of all types defined in the schema
Fully qualified name of the schema (same as the namespace name)
List containing the current schema and all referenced schemas. Used for alias and namespace lookup.
The schema data model
The schema data model
Returns the alias that can be used for type in this
Namespace instead of the entire namespace name
Returns the TypeAuthority that is driving this schema
Summary description for UsingElement.
Represents an referential constraint on a relationship
construct a Referential constraint
Validate this referential constraint
Resolves the given property names to the property in the item
Also checks whether the properties form the key for the given type and whether all the properties are nullable or not
The parent element as an IRelationship
Represents an role element in referential constraint element.
Constructs an EntityContainerAssociationSetEnd
Reference to the schema element.
Used during the resolve phase to resolve the type name to the object that represents that type
Represents an Association element
Construct a Relationship object
the parent
the kind of relationship
do whole element validation
do whole element resolution
handle the End child element
XmlReader positioned at the end element
handle the constraint element
XmlReader positioned at the constraint element
List of Ends defined for this Association
Returns the list of constraints on this relation
Is this an Association
Is this a foreign key (aka foreign key) relationship?
Represents an End element in a relationship
construct a Relationship End
do whole element resolution
Do simple validation across attributes
Handle the Type attribute
reader positioned at Type attribute
Handle the Multiplicity attribute
reader positioned at Type attribute
Handle an OnDelete element
reader positioned at the element
Handle an On<Operation> element
reader positioned at the element
the kind of operation being handled
Type of the End
Multiplicity of the End
The On<Operation>s defined for the End
The parent element as an IRelationship
A collection of RelationshipEnds
Add a relationship end
the end to add
See if an end can be added to the collection
the end to add
true if the end is valid, false otherwise
Remove a relationship end
the end to remove
true if item was in list
See if a relationship end is in the collection
the name of the end
true if the end name is in the collection
See if a relationship end is in the collection
the name of the end
true if the end is in the collection
get a typed enumerator for the collection
the enumerator
get an un-typed enumerator for the collection
the enumerator
remove all elements from the collection
Not supported
the end
nothing
Not supported
the index
the end
Not supported
the index
copy all elements to an array
array to copy to
The zero-based index in array at which copying begins.
How many RelationshipEnds are in the collection
The data for the collection
the definition order collection
can the collection be modified
enumerator for the RelationshipEnd collection
the ends as traversed in the order in which they were added
construct the enumerator
the real data
the keys to the real data in inserted order
reset the enumerator
move to the next element in the collection
true if there is a next, false if not
dispose of the enumerator
get current relationship end from the enumerator
get current relationship end from the enumerator
Summary description for ReturnValue.
True is property is scalar, otherwise false.
During validation (after all types have been resolved).
This is an adapter to make PrimitiveTypeKindData fit in the Schema Object Model tree
Construct an internal (not from schema) CDM scalar type
the owning schema
the naem of the type
the PrimitiveTypeKind of the type
try to parse a string
the string to parse
the value of the string
true if the value is a valid value, false otherwise
Parses the default value for Edm Type Time based on the DateTime format "HH:mm:ss.fffffffz".
The value is first converted to DateTime value and then converted to TimeSpan.
The type kind of this type.
Returns the PrimitiveType of the scalar type.
Summary description for NestedType.
Which data model to target
Target the CDM data model
Target the data providers - SQL, Oracle, etc
Target the data providers - SQL, Oracle, etc
Summary description for SchemaElementLookUpTable.
Add the given type to the schema look up table. If there is an error, it
adds the error and returns false. otherwise, it adds the type to the lookuptable
and returns true
Summary description for SchemaElementLookUpTableEnumerator.
Represents enum Member element from the CSDL.
Value for this member.
Initializes a new instance of the class.
Parent element.
Generic handler for the Member element attributes
Xml reader positioned on an attribute.
true
if the attribute is a known attribute and was handled. Otherwise
false
Handler for the Member Value attribute.
XmlReader positioned on the Member Value attribute.
Gets the value of this enum member. Possibly null if not specified in the CSDL.
Represents EnumType element from CSDL.
Indicates whether the enum type is defined as flags (i.e. can be treated as a bit field)
Underlying type of this enum type as read from the schema.
Resolved underlying type of this enum type.
Members of this EnumType.
Initializes a new instance of the class.
Parent element.
Generic handler for the EnumType element child elements.
Xml reader positioned on a child element.
true if the child element is a known element and was handled. Otherwise false
Generic handler for the EnumType element attributes
Xml reader positioned on an attribute.
true
if the attribute is a known attribute and was handled. Otherwise
false
Handler for the Member element.
XmlReader positioned on the Member element.
Resolves the underlying type.
Validates the specified enumeration type as a whole.
Gets a value indicating whether the enum type is defined as flags (i.e. can be treated as a bit field)
Returns underlying type for this enum.
Gets members for this EnumType.
Reponsible for keep map from alias to namespace for a given schema.
Construct the LookUp table
Add a UsingElement to the table
the UsingElement to add
Get the Schema(s) a namespace or alias might refer to
returned schemas may be null is called before or during Schema Resolution
Resolves all the namespace specified in the using elements in this schema
Check if the given name is a reserved keyword. if yes, add appropriate error to the refschema
Kind of Name
It's an Alias
It's a namespace
Class responsible for parsing,validating a collection of schema
Add the namespace of the given schema to the namespace lookup table
Resolve the type - if the type is not found, return appropriate error
Returns true if this is a valid namespace name or else returns false
Checks if the xml reader has base uri. If it doesn't have, it adds error, other
returns the location from the base uri
Add the given list of newErrors to the error collection. If there is a error in the new errors,
it sets the errorEncountered to true. Returns true if the number of errors encountered is more
than max errors
Handler for the Default attribute
xml reader currently positioned at Default attribute
The pattern for Server Generated Properties.
Not a Server Generated Property. This is the default.
A value is generated on INSERT, and remains unchanged on update.
A value is generated on both INSERT and UPDATE.
Summary description for StructuredProperty.
Resolve the type string to a SchemaType object
Handles the Multiplicity attribute on the property.
Returns a TypeUsage that represent this property.
The nullablity of this property.
Specifies the type of the Collection.
By Default this is Single( i.e. not a Collection.
And in case of Collections, will be either Bag or List
Summary description for Documentation.
Responsible for parsing Type ProviderManifest
xml elements
Handler for the Precision element
xml reader currently positioned at Precision element
Handler for the Scale element
xml reader currently positioned at Scale element
Handler for the MaxLength element
xml reader currently positioned at MaxLength element
Handler for the Unicode element
xml reader currently positioned at Unicode element
Handler for the FixedLength element
xml reader currently positioned at FixedLength element
Handler for the SRID element
xml reader currently positioned at SRID element
Handler for the IsStrict element
xml reader currently positioned at SRID element
Handler for the PrimitiveTypeKind attribute
xml reader currently positioned at Version attribute
Return value from StructuredProperty RemoveTypeModifier
Type string has no modifier
Type string was of form Array(...)
Type string was of form Set(...)
Type string was of form Table(...)
Supports the construction of a type usage instance for a Scalar/Primitive
Type.
Element generating the TypeUsage (e.g. StructuredProperty)
effects: adds errors to _element if there are any; creates a TypeUsage instance using the
facet values aggregated by this builder and the given scalar type
Scalar type for the type usage
Handles concurrency attributes.
Validates the Precision value for DateTime family of types since the Min and Max allowed values for Precision for these types are same.
Gets the TypeUsage generated by this builder.
Gets the nullability of the type usage.
Gets default.
Gets parsed default value.
Indicates whether this usage has any user defined facets.
Summary description for Utils.
Helper methods used for Schema Object Model (validation) validation.
Validates whether facets are declared correctly.
Schema element being validated. Must not be null.
Resolved type (from declaration on the element). Possibly null.
TypeUsageBuilder for the current element. Must not be null.
Validated whether a type is declared correctly.
Schema element being validated. Must not be null.
Resolved type (from declaration on the element). Possibly null.
Child schema element. Possibly null.
For some elements (e.g. ReturnType) we allow the type to be defined inline in an attribute on the element itself or
by using nested elements. These definitions are mutually exclusive.
Validate that reference type is an entity type.
Schema element being validated. Must not be null.
Resolved type (from declaration on the element). Possibly null.
Builds a dictionary from XmlNamespace to XmlSchemaResource of both C and S space schemas
The built XmlNamespace to XmlSchemaResource dictionary.
Adds Store schema resource entries to the given XmlNamespace to XmlSchemaResoure map
The XmlNamespace to XmlSchemaResource map to add entries to.
Adds Mapping schema resource entries to the given XmlNamespace to XmlSchemaResoure map
The XmlNamespace to XmlSchemaResource map to add entries to.
Adds Edm schema resource entries to the given XmlNamespace to XmlSchemaResoure map,
when calling from SomSchemaSetHelper.ComputeSchemaSet(), all the imported xsd will be included
The XmlNamespace to XmlSchemaResource map to add entries to.
Represents an eSQL Query compilation exception;
The class of exceptional conditions that may cause this exception to be raised are mainly:
1) Syntax Errors: raised during query text parsing and when a given query does not conform to eSQL formal grammar;
2) Semantic Errors: raised when semantic rules of eSQL language are not met such as metadata or schema information
not accurate or not present, type validation errors, scoping rule violations, user of undefined variables, etc.
For more information, see eSQL Language Spec.
Initializes a new instance of .
Initializes a new instance of with a specialized error message.
The message that describes the error.
Initializes a new instance of the class that uses a specified error message and a reference to the inner exception that is the cause of this exception.
The error message that explains the reason for the exception.
The exception that caused the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified.
Initializes a new instance EntityException with an ErrorContext instance and a given error message.
Initializes a new instance EntityException with contextual information to allow detailed error feedback.
core constructor
Returns error context in the format [[errorContextInfo, ]line ddd, column ddd].
Returns empty string if errorPosition is less than 0 and errorContextInfo is not specified.
Returns error message in the format: "error such and such[, near errorContext]."
Gets a description of the error.
A string that describes the error.
Gets the approximate context where the error occurred, if available.
A string that describes the approximate context where the error occurred, if available.
Gets the approximate line number where the error occurred.
An integer that describes the line number where the error occurred.
Gets the approximate column number where the error occurred.
An integer that describes the column number where the error occurred.
This is the interface to a particular entry in an IEntityStateManager. It provides
information about the state of the entity in question and the ability to modify that state
as appropriate for an entity adapter to function in performing updates to a backing store.
Interface allowing an IEntityAdapter to analyze state/change tracking information maintained
by a state manager in order to perform updates on a backing store (and push back the results
of those updates).
Mapping exception class. Note that this class has state - so if you change even
its internals, it can be a breaking change
default constructor
default constructor
localized error message
constructor
localized error message
inner exception
constructor
Returns the inner exceptions stored in this
Thrown to indicate that a command tree is invalid.
Initializes a new instance of the class with a default message.
Initializes a new instance of the class with the specified message.
The exception message.
Initializes a new instance of the class with the specified message and inner exception.
The exception message.
The exception that is the cause of this .
Constructs a new InvalidCommandTreeException from the specified serialization info and streaming context.
Mapping exception class. Note that this class has state - so if you change even
its internals, it can be a breaking change
Initializes a new instance of .
Initializes a new instance of with a specialized error message.
The message that describes the error.
Initializes a new instance of that uses a specified error message and a reference to the inner exception.
The message that describes the error.
The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified.
constructor for deserialization
This class keeps recomputing the hash and adding it to the front of the
builder when the length of the string gets too long
this class collects several strings together, and allows you to (
add string like "typename Instance#1"
The class creates a default OCMapping between a TypeMetadata in O space
and an TypeMetadata in Edm space. The loader expects that for each member in
C space type there exists a member in O space type that has the same name. The member maps will be stored in
C space member order.
Class for representing a collection of mapping items in Edm space.
The default constructor for ItemCollection
Search for a Mapping metadata with the specified type key.
identity of the type
The dataspace that the type for which map needs to be returned belongs to
Returns false if no match found.
Search for a Mapping metadata with the specified type key.
Search for a Mapping metadata with the specified type key.
Returns false if no match found.
Search for a Mapping metadata with the specified type key.
identity of the type
The dataspace that the type for which map needs to be returned belongs to
true for case-insensitive lookup
Thrown if mapping space is not valid
Search for a Mapping metadata with the specified type key.
identity of the type
The dataspace that the type for which map needs to be returned belongs to
true for case-insensitive lookup
Returns false if no match found.
Search for a Mapping metadata with the specified type key.
identity of the type
The dataspace that the type for which map needs to be returned belongs to
Thrown if mapping space is not valid
Constructor to create an instance of DefaultObjectMappingItemCollection.
To start with we will create a Schema under which maps will be created.
Search for a Mapping metadata with the specified type key.
identity of the type
The dataspace that the type for which map needs to be returned belongs to
true for case-insensitive lookup
Thrown if mapping space is not valid
Search for a Mapping metadata with the specified type key.
identity of the type
The dataspace that the type for which map needs to be returned belongs to
true for case-insensitive lookup
Returns false if no match found.
Search for a Mapping metadata with the specified type key.
identity of the type
The dataspace that the type for which map needs to be returned belongs to
Thrown if mapping space is not valid
Search for a Mapping metadata with the specified type key.
identity of the type
The dataspace that the type for which map needs to be returned belongs to
Returns false if no match found.
Search for a Mapping metadata with the specified type key.
Search for a Mapping metadata with the specified type key.
Returns false if no match found.
The method creates a default mapping between two TypeMetadatas - one in
C space and one in O space. The precondition for calling this method is that
the type in Object space contains the members with the same name as those of defined in
C space. It is not required the otherway.
Convert CSpace TypeMetadata into OSpace TypeMetadata
OSpace type metadata
Convert CSpace TypeMetadata into OSpace TypeMetadata
OSpace type metadata
The method fills up the children of ObjectMapping. It goes through the
members in CDM type and finds the member in Object space with the same name
and creates a member map between them. These member maps are added
as children of the object mapping.
Tries and get the mapping ospace member for the given edmMember and the ospace type
Validates the scalar property on the cspace side and ospace side and creates a new
ObjectPropertyMapping, if everything maps property
Load the entity type or complex type mapping
Validates whether CSpace enum type and OSpace enum type match.
CSpace enum type.
OSpace enum type.
Loads Association Type Mapping
The method loads the EdmMember mapping for complex members.
It goes through the CDM members of the Complex Cdm type and
tries to find the corresponding members in Complex Clr type.
Base class for the type created at design time to store the generated views.
Returns the key/value pair at the specified index, which contains the view and its key.
The key/value pair at index , which contains the view and its key.
The index of the view.
Returns the cached dictionary of (ExtentName,EsqlView)
Gets or sets the name of .
The container name.
Gets or sets in storage schema.
Container name.
Hash value.
Hash value.
Hash value of views.
Hash value.
Gets or sets view count.
View count.
Attribute to mark the assemblies that contain the generated views type.
Initializes a new instance of the class.
The view type.
Gets the T:System.Type of the view.
The T:System.Type of the view.
Gets all (concrete) entity types implied by this type mapping.
Represents a mapping from a model function import to a store composable or non-composable function.
Gets model function (or source of the mapping)
Gets store function (or target of the mapping)
Null if default mapping is not allowed.
for more info.
A default mapping (property "Foo" maps by convention to column "Foo"), if allowed, has the lowest precedence.
A mapping for a specific type (EntityType="Bar") takes precedence over a mapping for a hierarchy (EntityType="IsTypeOf(Bar)"))
If there are two hierarchy mappings, the most specific mapping takes precedence.
For instance, given the types Base, Derived1 : Base, and Derived2 : Derived1,
w.r.t. Derived1 "IsTypeOf(Derived1)" takes precedence over "IsTypeOf(Base)" when you ask for the rename of Derived1
Empty for default rename mapping.
Represents a mapping from a model function import to a store composable function.
Command parameter refs created from m_edmFunction parameters.
Used as arguments to target (s-space) function calls in the generated command tree.
Result mapping as entity type hierarchy.
Keys inside the result set of the target function. Inferred based on the mapping (using c-space entity type keys).
ITree template. Requires function argument substitution during function view expansion.
Handles copying of operators
A visitor implementation that allows subtrees to be modified (in a bottom-up
fashion)
Simple implementation of the BasicOpVisitorOfT interface"/>
type parameter
Simply iterates over all children, and manages any updates
The current node
Simply iterates over all children, and manages any updates, but in reverse order
The current node
Simple wrapper to invoke the appropriate action on a node
the node to process
A default processor for any node. Visits the children and returns itself unmodified.
the node to process
a potentially new node
No processing yet for this node - raises an exception
Catch-all processor - raises an exception
A default processor for all AncillaryOps.
Allows new visitors to just override this to handle all AncillaryOps
the AncillaryOp
the node to process
a potentially modified subtree
VarDefOp
VarDefListOp
A default processor for all PhysicalOps.
Allows new visitors to just override this to handle all PhysicalOps
the PhysicalOp
the node to process
a potentially modified subtree
PhysicalProjectOp
A default processor for all NestOps.
Allows new visitors to just override this to handle all NestOps
the NestOp
the node to process
a potentially modified subtree
SingleStreamNestOp
MultiStreamNestOp
A default processor for all RelOps.
Allows new visitors to just override this to handle all RelOps
the RelOp
the node to process
a potentially modified subtree
Common handling for all ApplyOps
the ApplyOp
the node to process
a potentially modified subtree
CrossApply
OuterApply
A default processor for all JoinOps.
Allows new visitors to just override this to handle all JoinOps.
the JoinOp
the node to process
a potentially modified subtree
CrossJoin
FullOuterJoin
LeftOuterJoin
InnerJoin
A default processor for all SetOps.
Allows new visitors to just override this to handle all SetOps.
the SetOp
the node to process
a potentially modified subtree
Except
Intersect
UnionAll
Distinct
FilterOp
GroupByBaseOp
GroupByOp
GroupByIntoOp
ProjectOp
Default handler for all TableOps
ScanTableOp
ScanViewOp
Visitor pattern method for SingleRowOp
The SingleRowOp being visited
The Node that references the Op
Visitor pattern method for SingleRowTableOp
The SingleRowTableOp being visited
The Node that references the Op
A default processor for all SortOps.
Allows new visitors to just override this to handle ConstrainedSortOp/SortOp.
the SetOp
the node to process
a potentially modified subtree
SortOp
ConstrainedSortOp
UnnestOp
A default processor for all ScalarOps.
Allows new visitors to just override this to handle all ScalarOps
the ScalarOp
the node to process
a potentially new node
Default handler for all constant Ops
AggregateOp
ArithmeticOp
CaseOp
CastOp
SoftCastOp
NestOp
ComparisonOp
ConditionalOp
ConstantOp
ConstantPredicateOp
ElementOp
ExistsOp
FunctionOp
GetEntityRefOp
GetRefKeyOp
InternalConstantOp
IsOfOp
LikeOp
NewEntityOp
NewInstanceOp
DiscriminatedNewInstanceOp
NewMultisetOp
NewRecordOp
NullOp
NullSentinelOp
PropertyOp
RelPropertyOp
RefOp
TreatOp
VarRefOp
Simply iterates over all children, and manages any updates
The current node
Simply iterates over all children, and manages any updates, but in reverse order
The current node
A default processor for any node. Visits the children and returns itself unmodified.
the node to process
a potentially new node
A default processor for all AncillaryOps.
Allows new visitors to just override this to handle all AncillaryOps
the AncillaryOp
the node to process
a potentially modified subtree
A default processor for all PhysicalOps.
Allows new visitors to just override this to handle all PhysicalOps
the PhysicalOp
the node to process
a potentially modified subtree
A default processor for all RelOps.
Allows new visitors to just override this to handle all RelOps
the RelOp
the node to process
a potentially modified subtree
A default processor for all ScalarOps.
Allows new visitors to just override this to handle all ScalarOps
the ScalarOp
the node to process
a potentially new node
Make a copy of the current node. Also return an ordered list of the new
Vars corresponding to the vars in "varList"
current command
the node to clone
list of Vars
list of "new" Vars
the cloned node
Constructor. Allows for cloning of nodes within the same command
The command
Constructor. Allows for cloning of nodes across commands
The Command to which Nodes to be cloned must belong
The Command to which cloned Nodes will belong
Get the "cloned" var for a given Var.
If no cloned var exists, return the input Var itself
The Var for which the cloned Var should be retrieved
The cloned Var that corresponds to the specified Var if this OpCopier is cloning across two different Commands; otherwise it is safe to return the specified Var itself
Set the "cloned" var for a given Var
WARNING: If a mapping already exists, an exception is raised
The original Var
The cloned Var
Maps columns of an existing table to those of the cloned table
The original Table
The cloned Table
Produce the "mapped" Vars for each Var in the input sequence, while
preserving the original order
input var sequence
output mapped vars
Create a mapped varvec. A new varvec that "maps" all the Vars from
the original Varvec
the varvec to clone
a mapped varvec
Create a mapped copy of the input VarList - each var from the input varlist
is represented by its mapped var (and in exactly the same order) in the output
varlist
varList to map
mapped varlist
Copies a sortkey
The SortKey to clone
A new SortKey that is a clone of sortKey
Copies a list of Sortkeys
The list of SortKeys
A new list containing clones of the specified SortKeys
Simple wrapper for all copy operations
The Node to copy
A new Node that is a copy of the specified Node
Copies all the Child Nodes of the specified Node
The Node for which the child Nodes should be copied
A new list containing copies of the specified Node's children
Creates a new Node with the specified Op as its Op and the result of visiting the specified Node's children as its children
The Op that the new Node should reference
The Node for which the children should be visited and the resulting cloned Nodes used as the children of the new Node returned by this method
A new Node with the specified Op as its Op and the cloned child Nodes as its children
Default Visitor pattern method for unrecognized Ops
The unrecognized Op
The Node that references the Op
This method always throws NotSupportedException
By design to indicate that the Op was not recognized and is therefore unsupported
Copies a ConstantOp
The Op to Copy
The Node that references the Op
A copy of the original Node that references a copy of the original Op
Copies a NullOp
The Op to Copy
The Node that references the Op
A copy of the original Node that references a copy of the original Op
Copies a ConstantPredicateOp
The Op to Copy
The Node that references the Op
A copy of the original Node that references a copy of the original Op
Copies an InternalConstantOp
The Op to Copy
The Node that references the Op
A copy of the original Node that references a copy of the original Op
Copies a NullSentinelOp
The Op to Copy
The Node that references the Op
A copy of the original Node that references a copy of the original Op
Copies a FunctionOp
The Op to Copy
The Node that references the Op
A copy of the original Node that references a copy of the original Op
Copies a PropertyOp
The Op to Copy
The Node that references the Op
A copy of the original Node that references a copy of the original Op
Copies a RelPropertyOp
the RelPropertyOp to copy
node tree corresponding to 'op'
a copy of the node tree
Copies a CaseOp
The Op to Copy
The Node that references the Op
A copy of the original Node that references a copy of the original Op
Copies a ComparisonOp
The Op to Copy
The Node that references the Op
A copy of the original Node that references a copy of the original Op
Copies a like-op
The Op to Copy
The Node that references the Op
A copy of the original Node that references a copy of the original Op
Clone an aggregateop
The Op to Copy
The Node that references the Op
A copy of the original Node that references a copy of the original Op
Copies a type constructor
The Op to Copy
The Node that references the Op
A copy of the original Node that references a copy of the original Op
Copies a NewEntityOp
the NewEntityOp to copy
node tree corresponding to the NewEntityOp
a copy of the node tree
Copies a discriminated type constructor
The Op to Copy
The Node that references the Op
A copy of the original Node that references a copy of the original Op
Copies a multiset constructor
The Op to Copy
The Node that references the Op
A copy of the original Node that references a copy of the original Op
Copies a record constructor
The Op to Copy
The Node that references the Op
A copy of the original Node that references a copy of the original Op
Copies a RefOp
The Op to Copy
The Node that references the Op
A copy of the original Node that references a copy of the original Op
Copies a VarRefOp
The Op to Copy
The Node that references the Op
A copy of the original Node that references a copy of the original Op
Copies a ConditionalOp
The Op to Copy
The Node that references the Op
A copy of the original Node that references a copy of the original Op
Copies an ArithmeticOp
The Op to Copy
The Node that references the Op
A copy of the original Node that references a copy of the original Op
Copies a TreatOp
The Op to Copy
The Node that references the Op
A copy of the original Node that references a copy of the original Op
Copies a CastOp
The Op to Copy
The Node that references the Op
A copy of the original Node that references a copy of the original Op
Copies a SoftCastOp
The Op to Copy
The Node that references the Op
A copy of the original Node that references a copy of the original Op
Copies a DerefOp
the derefOp to copy
the subtree
a copy of the subtree
Copies a NavigateOp
the NavigateOp
the subtree
a copy of the subtree
Clone an IsOfOp
The Op to Copy
The Node that references the Op
A copy of the original Node that references a copy of the original Op
Clone an ExistsOp
The Op to Copy
The Node that references the Op
A copy of the original Node that references a copy of the original Op
Clone an ElementOp
The Op to Copy
The Node that references the Op
A copy of the original Node that references a copy of the original Op
Copies a GetRefKeyOp
The Op to Copy
The Node that references the Op
A copy of the original Node that references a copy of the original Op
Copies a GetEntityRefOp
The Op to Copy
The Node that references the Op
A copy of the original Node that references a copy of the original Op
Copies a CollectOp
The Op to Copy
The Node that references the Op
A copy of the original Node that references a copy of the original Op
Copies a ScanTableOp
The Op to Copy
The Node that references the Op
A copy of the original Node that references a copy of the original Op
Copies a ScanViewOp
The Op to Copy
The Node that references the Op
A copy of the original Node that references a copy of the original Op
Clone an UnnestOp
The Op to Copy
The Node that references the Op
A copy of the original Node that references a copy of the original Op
Copies a ProjectOp
The Op to Copy
The Node that references the Op
A copy of the original Node that references a copy of the original Op
Copies a filterOp
The Op to Copy
The Node that references the Op
A copy of the original Node that references a copy of the original Op
Copies a sort node
The Op to Copy
The Node that references the Op
A copy of the original Node that references a copy of the original Op
Copies a constrained sort node
The Op to Copy
The Node that references the Op
A copy of the original Node that references a copy of the original Op
Copies a group-by node
The Op to Copy
The Node that references the Op
A copy of the original Node that references a copy of the original Op
Copies a group by into node
The Op to Copy
The Node that references the Op
A copy of the original Node that references a copy of the original Op
Copies a CrossJoinOp
The Op to Copy
The Node that references the Op
A copy of the original Node that references a copy of the original Op
Copies an InnerJoinOp
The Op to Copy
The Node that references the Op
A copy of the original Node that references a copy of the original Op
Copies a LeftOuterJoinOp
The Op to Copy
The Node that references the Op
A copy of the original Node that references a copy of the original Op
Copies a FullOuterJoinOp
The Op to Copy
The Node that references the Op
A copy of the original Node that references a copy of the original Op
Copies a crossApplyOp
The Op to Copy
The Node that references the Op
A copy of the original Node that references a copy of the original Op
Clone an OuterApplyOp
The Op to Copy
The Node that references the Op
A copy of the original Node that references a copy of the original Op
Common copy path for all SetOps
The SetOp to Copy (must be one of ExceptOp, IntersectOp, UnionAllOp)
The Node that references the Op
A copy of the original Node that references a copy of the original Op
Copies a UnionAllOp
The Op to Copy
The Node that references the Op
A copy of the original Node that references a copy of the original Op
Copies an IntersectOp
The Op to Copy
The Node that references the Op
A copy of the original Node that references a copy of the original Op
Copies an ExceptOp
The Op to Copy
The Node that references the Op
A copy of the original Node that references a copy of the original Op
Copies a DistinctOp
The Op to Copy
The Node that references the Op
A copy of the original Node that references a copy of the original Op
Copies a VarDefOp
The Op to Copy
The Node that references the Op
A copy of the original Node that references a copy of the original Op
Copies a VarDefListOp
The Op to Copy
The Node that references the Op
A copy of the original Node that references a copy of the original Op
Copies a PhysicalProjectOp
Copies a singleStreamNestOp
Copies a multiStreamNestOp
Represents a mapping from a model function import to a store non-composable function.
Gets function import return type mapping knowledge bases.
If no return mappings were specified in the MSL return an empty return type mapping knowledge base.
Otherwise return the resultSetIndexth return type mapping knowledge base, or throw if resultSetIndex is out of range
Gets the disctriminator columns resultSetIndexth result set, or an empty array if the index is not in range
Given discriminator values (ordinally aligned with DiscriminatorColumns), determines
the entity type to return. Throws a CommandExecutionException if the type is ambiguous.
Determines the expected shape of store results. We expect a column for every property
of the mapped type (or types) and a column for every discriminator column. We make no
assumptions about the order of columns: the provider is expected to determine appropriate
types by looking at the names of the result columns, not the order of columns, which is
different from the typical handling of row types in the EF.
Requires that the given function import mapping refers to a Collection(Entity) or Collection(ComplexType) CSDL
function.
Row type.
Gets discriminator values aligned with DiscriminatorColumns of the parent FunctionImportMapping.
A null ValueCondition indicates 'anything goes'.
Gets bit array with 'true' indicating the corresponding MappedEntityType of the parent
FunctionImportMapping is implied by this fragment.
Gets the complement of the ImpliedEntityTypes BitArray.
extract the column rename info from polymorphic entity type mappings
CMember -> SMember*
Set the column mappings for each defaultMemberName.
Gets all types in scope for this mapping.
Gets a list of all discriminator columns used in this mapping.
Gets normalized representation of all EntityTypeMapping fragments for this
function import mapping.
Get the columns rename mapping for return type, the first string is the member name
the second one is column names for different types that mentioned in the mapping.
Determines which explicitly mapped types in the function import mapping cannot be generated.
For IsTypeOf declarations, reports if no type in hierarchy can be produced.
Works by:
- Converting type mapping conditions into vertices
- Checking that some assignment satisfies
Determines which types are produced by this mapping.
Determines which types are produced by this mapping.
Represents the base item class for all the mapping metadata
Represents the base item class for all the metadata
Implementing this internal constructor so that this class can't be derived
outside this assembly
Returns the DataSpace in which this type belongs to
Returns the Item that is being mapped either for ES or OE spaces.
The EDM type will be an EntityContainer type in ES mapping case.
In the OE mapping case it could be any type.
Represents the various kind of member mapping
if already seen, then out the object instance index, return false;
if haven't seen, then add it to the m_itemAlreadySeen, out the current index, return true
if the object has seen, then add the seen object style to the hash source, return false;
if not, then add it to the seen list, and append the object start dump to the hash source, return true
Add V2 schema properties and attributes to the hash builder
Describes modification function mappings for an association set.
Association set these functions handles.
Delete function for this association set.
Insert function for this association set.
Describes modification function mappings for an entity type within an entity set.
Gets (specific) entity type these functions handle.
Gets delete function for the current entity type.
Gets insert function for the current entity type.
Gets update function for the current entity type.
Describes the location of a member within an entity or association type structure.
Gets the members in the path from the leaf (the member being bound)
to the Root of the structure.
Gets the association set to which we are navigating via this member. If the value
is null, this is not a navigation member path.
Binds a modification function parameter to a member of the entity or association being modified.
Gets the parameter taking the value.
Gets the path to the entity or association member defining the value.
Gets a value indicating whether the current or original
member value is being bound.
Defines a binding from a named result set column to a member taking the value.
Gets the name of the column to bind from the function result set. We use a string
value rather than EdmMember, since there is no metadata for function result sets.
Gets the property to be set on the entity.
Mapping metadata for all OC member maps.
Mapping metadata for all OC member maps.
Constrcut a new member mapping metadata object
The PropertyMetadata object that represents the Cdm member for which mapping is being specified
The PropertyMetadata object that represents the Clr member for which mapping is being specified
Returns the member mapping kind
Constrcut a new AssociationEnd member mapping metadata object
return the member mapping kind
Mapping metadata for complex member maps.
Mapping metadata for all OC member maps.
Constrcut a new member mapping metadata object
The PropertyMetadata object that represents the Clr member for which mapping is being specified
return the member mapping kind
Constrcut a new member mapping metadata object
return the member mapping kind
Defines all the string constrcuts defined in OC MSL specification
Mapping metadata for all OC member maps.
Constrcut a new member mapping metadata object
return the member mapping kind
Represents the metadata for OCObjectMapping.
Construct a new ObjectTypeMapping object
get a MemberMap for the member name specified
the name of the CDM member for which map needs to be retrieved
Add a member mapping as a child of this object mapping
child property mapping to be added
Returns the member map for the given clr member
returns the member mapping for the given member
Overriding System.Object.ToString to provide better String representation
for this type.
Gets the type kind for this item
The reference to the Clr type in Metadata
that participates in this mapping instance
The reference to the Cdm type in Metadata
that participates in this mapping instance
The reference to the Cdm type in Metadata
that participates in this mapping instance
Returns the Identity of ObjectTypeMapping.
The identity for an Object Type Map is the concatenation of
CLR Type Idntity + ':' + CDM Type Identity
Represents the Mapping metadata for an AssociationSet in CS space.
For Example if conceptually you could represent the CS MSL file as following
--Mapping
--EntityContainerMapping ( CNorthwind-->SNorthwind )
--EntitySetMapping
--EntityTypeMapping
--MappingFragment
--EntityTypeMapping
--MappingFragment
--AssociationSetMapping
--AssociationTypeMapping
--MappingFragment
This class represents the metadata for the AssociationSetMapping elements in the
above example. And it is possible to access the AssociationTypeMap underneath it.
There will be only one TypeMap under AssociationSetMap.
Represents the Mapping metadata for an Extent in CS space.
For Example if conceptually you could represent the CS MSL file as following
--Mapping
--EntityContainerMapping ( CNorthwind-->SNorthwind )
--EntitySetMapping
--EntityTypeMapping
--MappingFragment
--EntityTypeMapping
--MappingFragment
--AssociationSetMapping
--AssociationTypeMapping
--MappingFragment
This class represents the metadata for all the extent map elements in the
above example namely EntitySetMapping, AssociationSetMapping and CompositionSetMapping.
The SetMapping elements that are children of the EntityContainerMapping element
can be accessed through the properties on this type.
Construct the new StorageSetMapping object.
Extent metadata object
The EntityContainer mapping that contains this extent mapping
The EntityContainer mapping that contains this extent mapping.
The extent for which this mapping represents.
Set of type mappings that make up the Set Mapping.
Unless this is a EntitySetMapping with inheritance,
you would have a single type mapping per set.
Stores type-Specific user-defined QueryViews.
Add type mapping as a child under this SetMapping
Stores a type-specific user-defiend QueryView so that it can be loaded
into StorageMappingItemCollection's view cache.
The set for which this mapping is for
Whether the SetMapping has empty content
Returns true if there no table Mapping fragments
Line Number in MSL file where the Set Mapping Element's Start Tag is present.
Line Position in MSL file where the Set Mapping Element's Start Tag is present.
Construct a new AssociationSetMapping object
Represents the Association Set Metadata object. Will change this to Extent instead of MemberMetadata.
The entityContainerMapping mapping that contains this Set mapping
Gets or sets function mapping information for this association set. May be null.
Represents the Mapping metadata for an association type map in CS space.
For Example if conceptually you could represent the CS MSL file as following
--Mapping
--EntityContainerMapping ( CNorthwind-->SNorthwind )
--EntitySetMapping
--EntityTypeMapping
--MappingFragment
--EntityKey
--ScalarPropertyMap
--ScalarPropertyMap
--EntityTypeMapping
--MappingFragment
--EntityKey
--ScalarPropertyMap
--ComplexPropertyMap
--ComplexTypeMap
--ScalarPropertyMap
--ScalarProperyMap
--ScalarPropertyMap
--AssociationSetMapping
--AssociationTypeMapping
--MappingFragment
--EndPropertyMap
--ScalarPropertyMap
--ScalarProperyMap
--EndPropertyMap
--ScalarPropertyMap
This class represents the metadata for all association Type map elements in the
above example. Users can access the table mapping fragments under the
association type mapping through this class.
Represents the Mapping metadata for a type map in CS space.
For Example if conceptually you could represent the CS MSL file as following
--Mapping
--EntityContainerMapping ( CNorthwind-->SNorthwind )
--EntitySetMapping
--EntityTypeMapping
--MappingFragment
--EntityKey
--ScalarPropertyMap
--ScalarPropertyMap
--EntityTypeMapping
--MappingFragment
--EntityKey
--ScalarPropertyMap
--ComplexPropertyMap
--ScalarPropertyMap
--ScalarProperyMap
--ScalarPropertyMap
--AssociationSetMapping
--AssociationTypeMapping
--MappingFragment
--EndPropertyMap
--ScalarPropertyMap
--ScalarProperyMap
--EndPropertyMap
--ScalarPropertyMap
This class represents the metadata for all the Type map elements in the
above example namely EntityTypeMapping, AssociationTypeMapping and CompositionTypeMapping.
The TypeMapping elements contain TableMappingFragments which in turn contain the property maps.
Construct the new StorageTypeMapping object.
SetMapping that contains this type mapping
ExtentMap that contains this type mapping.
Set of fragments that make up the type Mapping.
Add a fragment mapping as child of this type mapping
Mapping fragments that make up this set type
a list of TypeMetadata that this mapping holds true for.
a list of TypeMetadatas for which the mapping holds true for
not only the type specified but the sub-types of that type as well.
Construct the new AssociationTypeMapping object.
Represents the Association Type metadata object
Set Mapping that contains this Type mapping
Type for which the mapping is represented.
The AssociationTypeType Metadata object for which the mapping is represented.
a list of TypeMetadata that this mapping holds true for.
Since Association types dont participate in Inheritance, This can only
be one type.
a list of TypeMetadatas for which the mapping holds true for
not only the type specified but the sub-types of that type as well.
Since Association types dont participate in Inheritance, an Empty list
is returned here.
Mapping metadata for Complex properties.
For Example if conceptually you could represent the CS MSL file as following
--Mapping
--EntityContainerMapping ( CNorthwind-->SNorthwind )
--EntitySetMapping
--EntityTypeMapping
--MappingFragment
--EntityKey
--ScalarPropertyMap ( CMemberMetadata-->SMemberMetadata )
--ScalarPropertyMap ( CMemberMetadata-->SMemberMetadata )
--EntityTypeMapping
--MappingFragment
--EntityKey
--ScalarPropertyMap ( CMemberMetadata-->SMemberMetadata )
--ComplexPropertyMap
--ComplexTypeMapping
--ScalarPropertyMap ( CMemberMetadata-->SMemberMetadata )
--ScalarProperyMap ( CMemberMetadata-->SMemberMetadata )
--DiscriminatorProperyMap ( constant value-->SMemberMetadata )
--ComplexTypeMapping
--ScalarPropertyMap ( CMemberMetadata-->SMemberMetadata )
--ScalarProperyMap ( CMemberMetadata-->SMemberMetadata )
--DiscriminatorProperyMap ( constant value-->SMemberMetadata )
--ScalarPropertyMap ( CMemberMetadata-->SMemberMetadata )
--AssociationSetMapping
--AssociationTypeMapping
--MappingFragment
--EndPropertyMap
--ScalarPropertyMap ( CMemberMetadata-->SMemberMetadata )
--ScalarProperyMap ( CMemberMetadata-->SMemberMetadata )
--EndPropertyMap
--ScalarPropertyMap ( CMemberMetadata-->SMemberMetadata )
This class represents the metadata for all the complex property map elements in the
above example. ComplexPropertyMaps contain ComplexTypeMaps which define mapping based
on the type of the ComplexProperty in case of inheritance.
Mapping metadata for all types of property mappings.
For Example if conceptually you could represent the CS MSL file as following
--Mapping
--EntityContainerMapping ( CNorthwind-->SNorthwind )
--EntitySetMapping
--EntityTypeMapping
--MappingFragment
--EntityKey
--ScalarPropertyMap
--ScalarPropertyMap
--EntityTypeMapping
--MappingFragment
--EntityKey
--ScalarPropertyMap
--ComplexPropertyMap
--ScalarPropertyMap
--ScalarProperyMap
--ScalarPropertyMap
--AssociationSetMapping
--AssociationTypeMapping
--MappingFragment
--EndPropertyMap
--ScalarPropertyMap
--ScalarProperyMap
--EndPropertyMap
--ScalarPropertyMap
This class represents the metadata for all property map elements in the
above example. This includes the scalar property maps, complex property maps
and end property maps.
Construct a new EdmProperty mapping object
The PropertyMetadata object that represents the member for which mapping is being specified
EdmProperty metadata representing the Cdm member for which the mapping is specified.
The PropertyMetadata object that represents the member for which mapping is being specified
Construct a new Complex Property mapping object
The MemberMetadata object that represents this Complex member
Set of type mappings that make up the EdmProperty mapping.
Add type mapping as a child under this Property Mapping
TypeMappings that make up this property.
Mapping metadata for Complex Types.
Construct a new Complex Property mapping object
Whether the property mapping representation is totally represented in this table mapping fragment or not.
Add a Type to the list of types that this mapping is valid for
Add a Type to the list of Is-Of types that this mapping is valid for
Add a property mapping as a child of this complex property mapping
The mapping that needs to be added
Add a condition property mapping as a child of this complex property mapping
Condition Property Mapping specifies a Condition either on the C side property or S side property.
The Condition Property mapping that needs to be added
The method finds the type in which the member with the given name exists
form the list of IsOfTypes and Type.
a list of TypeMetadata that this mapping holds true for.
a list of TypeMetadatas for which the mapping holds true for
not only the type specified but the sub-types of that type as well.
List of child properties that make up this complex property
Returns all the property mappings defined in the complex type mapping
including Properties and Condition Properties
Mapping metadata for Conditional property mapping on a type.
Condition Property Mapping specifies a Condition either on the C side property or S side property.
For Example if conceptually you could represent the CS MSL file as following
--Mapping
--EntityContainerMapping ( CNorthwind-->SNorthwind )
--EntitySetMapping
--EntityTypeMapping
--MappingFragment
--EntityKey
--ScalarPropertyMap ( CMemberMetadata-->SMemberMetadata )
--ScalarPropertyMap ( CMemberMetadata-->SMemberMetadata )
--ConditionProperyMap ( constant value-->SMemberMetadata )
--EntityTypeMapping
--MappingFragment
--EntityKey
--ScalarPropertyMap ( CMemberMetadata-->SMemberMetadata )
--ComplexPropertyMap
--ComplexTypeMap
--ScalarPropertyMap ( CMemberMetadata-->SMemberMetadata )
--ScalarProperyMap ( CMemberMetadata-->SMemberMetadata )
--ConditionProperyMap ( constant value-->SMemberMetadata )
--AssociationSetMapping
--AssociationTypeMapping
--MappingFragment
--EndPropertyMap
--ScalarPropertyMap ( CMemberMetadata-->SMemberMetadata )
--ScalarProperyMap ( CMemberMetadata-->SMemberMetadata )
--EndPropertyMap
--ScalarPropertyMap ( CMemberMetadata-->SMemberMetadata )
This class represents the metadata for all the condition property map elements in the
above example.
Construct a new condition Property mapping object
Column EdmMember for which the condition is specified.
Value for the condition thats being mapped.
Value for the condition
Whether the property is being mapped to Null or NotNull
ColumnMember for which the Condition Map is being specified
Mapping metadata for End property of an association.
For Example if conceptually you could represent the CS MSL file as following
--Mapping
--EntityContainerMapping ( CNorthwind-->SNorthwind )
--EntitySetMapping
--EntityTypeMapping
--MappingFragment
--EntityKey
--ScalarPropertyMap ( CMemberMetadata-->SMemberMetadata )
--ScalarPropertyMap ( CMemberMetadata-->SMemberMetadata )
--EntityTypeMapping
--MappingFragment
--EntityKey
--ScalarPropertyMap ( CMemberMetadata-->SMemberMetadata )
--ComplexPropertyMap
--ComplexTypeMapping
--ScalarPropertyMap ( CMemberMetadata-->SMemberMetadata )
--ScalarProperyMap ( CMemberMetadata-->SMemberMetadata )
--DiscriminatorProperyMap ( constant value-->SMemberMetadata )
--ComplexTypeMapping
--ScalarPropertyMap ( CMemberMetadata-->SMemberMetadata )
--ScalarProperyMap ( CMemberMetadata-->SMemberMetadata )
--DiscriminatorProperyMap ( constant value-->SMemberMetadata )
--ScalarPropertyMap ( CMemberMetadata-->SMemberMetadata )
--AssociationSetMapping
--AssociationTypeMapping
--MappingFragment
--EndPropertyMap
--ScalarPropertyMap ( CMemberMetadata-->SMemberMetadata )
--ScalarProperyMap ( CMemberMetadata-->SMemberMetadata )
--EndPropertyMap
--ScalarPropertyMap ( CMemberMetadata-->SMemberMetadata )
This class represents the metadata for all the end property map elements in the
above example. EndPropertyMaps provide mapping for each end of the association.
Construct a new End Property mapping object
List of property mappings that make up the End.
Add a property mapping as a child of End property mapping
return ReadOnlyCollection of property mappings that are children of this End mapping
The relation end property Metadata object for which the mapping is represented.
Returns all store properties that are mapped under this mapping fragment
Represents the Mapping metadata for the EntityContainer map in CS space.
Only one EntityContainerMapping element is allowed in the MSL file for CS mapping.
For Example if conceptually you could represent the CS MSL file as following
---Mapping
--EntityContainerMapping ( CNorthwind-->SNorthwind )
--EntitySetMapping
--AssociationSetMapping
The type represents the metadata for EntityContainerMapping element in the above example.
The SetMapping elements that are children of the EntityContainerMapping element
can be accessed through the properties on this type.
We currently assume that an Entity Container on the C side
is mapped to a single Entity Container in the S - space.
Construct a new EntityContainer mapping object
passing in the C-space EntityContainer and
the s-space Entity container metadata objects.
Entity Continer type that is being mapped on the C-side
Entity Continer type that is being mapped on the S-side
get an EntitySet mapping based upon the name of the entity set.
///
the name of the entity set
Get a RelationShip set mapping based upon the name of the relationship set
the name of the relationship set
the mapping for the entity set if it exists, null if it does not exist
Get a RelationShipSet mapping that has the passed in EntitySet as one of the ends and is mapped to the
table.
Get a set mapping based upon the name of the set
Adds an entity set mapping to the list of EntitySetMaps
under this entity container mapping. The method will be called
by the Mapping loader.
Adds a association set mapping to the list of AssociationSetMaps
under this entity container mapping. The method will be called
by the Mapping loader.
check whether the EntityContainerMapping contains
the map for the given AssociationSet
Returns whether the Set Map for the given set has a query view or not
Gets the type kind for this item
The Entity Container Metadata object on the C-side
for which the mapping is being represented.
Indicates whether there are no Set mappings
in the container mapping.
Determine whether the container includes any views.
Returns true if there is at least one query or update view specified by the mapping.
The Entity Container Metadata object on the C-side
for which the mapping is being represented.
The Entity Container Metadata object on the C-side
for which the mapping is being represented.
a list of all the entity set maps under this
container. In CS mapping, the mapping is done
at the extent level as opposed to the type level.
a list of all the entity set maps under this
container. In CS mapping, the mapping is done
at the extent level as opposed to the type level.
RelationshipSetMaps will be CompositionSetMaps and
AssociationSetMaps put together.
The reason we have RelationshipSetMaps is to be consistent with CDM metadata
which treats both associations and compositions as Relationships.
a list of all the set maps under this
container.
Line Number in MSL file where the EntityContainer Mapping Element's Start Tag is present.
Line Position in MSL file where the EntityContainer Mapping Element's Start Tag is present.
Indicates whether to validate the mapping or not.
Indicates whether to generate the update views or not.
Represents the Mapping metadata for an EnitytSet in CS space.
For Example if conceptually you could represent the CS MSL file as following
--Mapping
--EntityContainerMapping ( CNorthwind-->SNorthwind )
--EntitySetMapping
--EntityTypeMapping
--MappingFragment
--EntityTypeMapping
--MappingFragment
--AssociationSetMapping
--AssociationTypeMapping
--MappingFragment
This class represents the metadata for the EntitySetMapping elements in the
above example. And it is possible to access the EntityTypeMaps underneath it.
Construct a EntitySet mapping object
EntitySet metadata object
The entity Container Mapping that contains this Set mapping
Requires:
- Function mapping refers to a sub-type of this entity set's element type
- Function mappings for types are not redundantly specified
Adds a new function mapping for this class.
Function mapping to add. May not be null.
Gets all function mappings for this entity set.
Gets all association sets that are implicitly "covered" through function mappings.
Whether the EntitySetMapping has empty content
Returns true if there are no Function Maps and no table Mapping fragments
Mapping metadata for Entity type.
If an EntitySet represents entities of more than one type, than we will have
more than one EntityTypeMapping for an EntitySet( For ex : if
PersonSet Entity extent represents entities of types Person and Customer,
than we will have two EntityType Mappings under mapping for PersonSet).
For Example if conceptually you could represent the CS MSL file as following
--Mapping
--EntityContainerMapping ( CNorthwind-->SNorthwind )
--EntitySetMapping
--EntityTypeMapping
--MappingFragment
--EntityKey
--ScalarPropertyMap
--ScalarPropertyMap
--EntityTypeMapping
--MappingFragment
--EntityKey
--ScalarPropertyMap
--ComplexPropertyMap
--ScalarPropertyMap
--ScalarProperyMap
--ScalarPropertyMap
--AssociationSetMapping
--AssociationTypeMapping
--MappingFragment
--EndPropertyMap
--ScalarPropertyMap
--ScalarProperyMap
--EndPropertyMap
--ScalarPropertyMap
This class represents the metadata for all entity Type map elements in the
above example. Users can access the table mapping fragments under the
entity type mapping through this class.
Construct the new EntityTypeMapping object.
Set Mapping that contains this Type mapping
Types for which the mapping holds true for.
Types for which the mapping holds true for not only the type specified but the sub-types of that type as well.
Add a Type to the list of types that this mapping is valid for
Add a Type to the list of Is-Of types that this mapping is valid for
a list of TypeMetadata that this mapping holds true for.
a list of TypeMetadatas for which the mapping holds true for
not only the type specified but the sub-types of that type as well.
StorageMappingErrorBase
Invalid Content
Unresolvable Entity Container Name
Unresolvable Entity Set Name
Unresolvable Entity Type Name
Unresolvable Association Set Name
Unresolvable Association Type Name
Unresolvable Table Name
Unresolvable Complex Type Name
Unresolvable Edm Member Name
Unresolvable Storage Member Name
TableMappingFragment element expected
SetMappingFragment element expected
Duplicate Set Map
Duplicate Type Map
Condition Error
Root Mapping Element missing
Incompatible member map
Invalid Enum Value
Xml Schema Validation error
Xml Schema Validation error
Ambiguous Modification Function Mapping For AssociationSet
Missing Set Closure In Modification Function Mapping
Missing Modification Function Mapping For Entity Type
Invalid Table Name Attribute With Modification Function Mapping
Invalid Modification Function Mapping For Multiple Types
Ambiguous Result Binding In Modification Function Mapping
Invalid Association Set Role In Modification Function Mapping
Invalid Association Set Cardinality In Modification Function Mapping
Redundant Entity Type Mapping In Modification Function Mapping
Missing Version In Modification Function Mapping
Invalid Version In Modification Function Mapping
Invalid Parameter In Modification Function Mapping
Parameter Bound Twice In Modification Function Mapping
Same CSpace member mapped to multiple SSpace members with different types
No store type found for the given CSpace type (these error message is for primitive type with no facets)
No Store type found for the given CSpace type with the given set of facets
While mapping functions, if the property type is not compatible with the function parameter
While mapping functions, if more than one end of association is mapped
While mapping functions, if we find an unknown function
While mapping functions, if we find an ambiguous function
While mapping functions, if we find an invalid function
While mapping functions, if we find an invalid function parameter
Association set function mappings are not consistently defined for different operations
Entity type function mapping includes association end but the type is not part of the association
Function import mapping references non-existent store function
Function import mapping references store function with overloads (overload resolution is not possible)
Function import mapping reference non-existent import
Function import mapping is mapped in several locations
Attempting to map non-composable function import to a composable function.
No parameter on import side corresponding to target parameter
No parameter on target side corresponding to import parameter
Parameter directions are different
Parameter types are different
Rows affected parameter does not exist on mapped function
Rows affected parameter does not Int32
Rows affected does not have 'out' mode
Empty Container Mapping
Empty Set Mapping
Both TableName Attribute on Set Mapping and QueryView specified
Empty Query View
Both Query View and Property Maps specified for EntitySet
Some sets in the graph missing Query Views
Invalid Query View
Invalid result type for query view
Item with same name exists both in CSpace and SSpace
Unsupported expression kind in query view
Non S-space target in query view
Non structural property referenced in query view
Initialization non-target type in query view
EntityType mapping for non-entity set function
FunctionImport ambiguous type mappings
Abstract type being mapped explicitly - not supported.
Storage EntityContainer Name mismatch while specifying partial mapping
TypeName attribute specified for First QueryView
No TypeName attribute is specified for type-specific QueryViews
Multiple (optype/oftypeonly) QueryViews have been defined for the same EntitySet/EntityType
TypeName Contains Multiple Types For QueryView
IsTypeOf QueryView is specified for base type
ScalarProperty Element contains invalid type
Already Mapped Storage Container
No query view is allowed at compile time in EntityContainerMapping
EntityContainerMapping only contains query view
No views can be generated since all of the EntityContainerMapping contain query view
The store provider returns null EdmType for the given targetParameter's type
Multiple mappings of the same Member or Property inside the same mapping fragment.
Entity type mapping for a function import that does not return a collection of entity type.
Complex type mapping for a function import that does not return a collection of complex type.
Distinct flag can only be placed in a container that is not read-write
The EntitySet used in creating the Ref and the EntitySet declared in AssociationSetEnd do not match
FKs not permitted for function association ends.
Cannot load different version of schemas in the same ItemCollection
All function imports must be mapped.
Invalid function import result mapping: return type property not mapped.
Unresolvable Type Name
TVF expected on the store side.
Collection(Scalar) function import return type is not compatible with the TVF column type.
Collection(Scalar) function import must be mapped to a TVF returning a single column.
Attempting to map composable function import to a non-composable function.
Non-s-space function call in query view.
Invalid function result mapping: result mapping count doesn't match result type count.
The key properties of all entity types returned by the function import must be mapped to the same non-nullable columns returned by the storage function.
Represents the metadata for mapping fragment.
A set of mapping fragments makes up the Set mappings( EntitySet, AssociationSet or CompositionSet )
Each MappingFragment provides mapping for those properties of a type that map to a single table.
For Example if conceptually you could represent the CS MSL file as following
--Mapping
--EntityContainerMapping ( CNorthwind-->SNorthwind )
--EntitySetMapping
--EntityTypeMapping
--MappingFragment
--EntityKey
--ScalarPropertyMap ( CMemberMetadata-->SMemberMetadata )
--ScalarPropertyMap ( CMemberMetadata-->SMemberMetadata )
--EntityTypeMapping
--MappingFragment
--EntityKey
--ScalarPropertyMap ( CMemberMetadata-->SMemberMetadata )
--ComplexPropertyMap
--ComplexTypeMapping
--ScalarPropertyMap ( CMemberMetadata-->SMemberMetadata )
--ScalarProperyMap ( CMemberMetadata-->SMemberMetadata )
--DiscriminatorProperyMap ( constant value-->SMemberMetadata )
--ComplexTypeMapping
--ScalarPropertyMap ( CMemberMetadata-->SMemberMetadata )
--ScalarProperyMap ( CMemberMetadata-->SMemberMetadata )
--DiscriminatorProperyMap ( constant value-->SMemberMetadata )
--ScalarPropertyMap ( CMemberMetadata-->SMemberMetadata )
--AssociationSetMapping
--AssociationTypeMapping
--MappingFragment
--EndPropertyMap
--ScalarPropertyMap ( CMemberMetadata-->SMemberMetadata )
--ScalarProperyMap ( CMemberMetadata-->SMemberMetadata )
--EndPropertyMap
--ScalarPropertyMap ( CMemberMetadata-->SMemberMetadata )
This class represents the metadata for all the mapping fragment elements in the
above example. Users can access all the top level constructs of
MappingFragment element like EntityKey map, Property Maps, Discriminator
property through this mapping fragment class.
Construct a new Mapping Fragment object
Table extent from which the properties are mapped under this fragment.
Type mapping under which this mapping fragment exists.
Condition property mappings for this mapping fragment.
All the other properties .
Add a property mapping as a child of this mapping fragment
child property mapping to be added
Add a condition property mapping as a child of this complex property mapping
Condition Property Mapping specifies a Condition either on the C side property or S side property.
The mapping that needs to be added
The table from which the properties are mapped in this fragment
Returns all the property mappings defined in the complex type mapping
including Properties and Condition Properties
Returns all the property mappings defined in the complex type mapping
including Properties and Condition Properties
Line Number in MSL file where the Mapping Fragment Element's Start Tag is present.
Line Position in MSL file where the Mapping Fragment Element's Start Tag is present.
File URI of the MSL file
Represents a collection of items in Storage Mapping (CS Mapping) space.
For testing.
Initializes a new instance of the class using the specified , and a collection of string indicating the metadata file paths.
The that this mapping is to use.
The that this mapping is to use.
The file paths that this mapping is to use.
Initializes a new instance of the class using the specified , and XML readers.
The that this mapping is to use.
The that this mapping is to use.
The XML readers that this mapping is to use.
constructor that takes in a list of XmlReaders and creates metadata for mapping
in all the files.
The edm metadata collection that this mapping is to use
The store metadata collection that this mapping is to use
The XmlReaders to load mapping from
Mapping URIs
a list of errors for each file loaded
constructor that takes in a list of XmlReaders and creates metadata for mapping
in all the files.
The edm metadata collection that this mapping is to use
The store metadata collection that this mapping is to use
The XmlReaders to load mapping from
Mapping URIs
Initializer that takes in a list of XmlReaders and creates metadata for mapping
in all the files.
The edm metadata collection that this mapping is to use
The store metadata collection that this mapping is to use
The XmlReaders to load mapping from
Mapping URIs
Search for a Mapping metadata with the specified type key.
identity of the type
The dataspace that the type for which map needs to be returned belongs to
true for case-insensitive lookup
Thrown if mapping space is not valid
Search for a Mapping metadata with the specified type key.
identity of the type
The dataspace that the type for which map needs to be returned belongs to
true for case-insensitive lookup
Returns false if no match found.
Search for a Mapping metadata with the specified type key.
identity of the type
The dataspace that the type for which map needs to be returned belongs to
Thrown if mapping space is not valid
Search for a Mapping metadata with the specified type key.
identity of the type
The dataspace that the type for which map needs to be returned belongs to
Returns false if no match found.
Search for a Mapping metadata with the specified type key.
Search for a Mapping metadata with the specified type key.
Returns false if no match found.
Return members for MetdataWorkspace.GetRequiredOriginalValueMembers() and MetdataWorkspace.GetRelevantMembersForUpdate() methods.
An EntitySet belonging to the C-Space. Must not be null.
An EntityType that participates in the given EntitySet. Must not be null.
Scenario the members should be returned for.
ReadOnlyCollection of interesting members for the requested scenario (
).
Finds interesting members for MetdataWorkspace.GetRequiredOriginalValueMembers() and MetdataWorkspace.GetRelevantMembersForUpdate() methods
for the given and .
An EntitySet belonging to the C-Space. Must not be null.
An EntityType that participates in the given EntitySet. Must not be null.
Scenario the members should be returned for.
ReadOnlyCollection of interesting members for the requested scenario (
).
Finds members participating in the assocciation and adds them to the .
Association type mapping. Must not be null.
The list the interesting members (if any) will be added to. Must not be null.
Finds interesting entity properties - primary keys (if requested), properties (including complex properties and nested properties)
with concurrency mode set to fixed and C-Side condition members and adds them to the
.
Entity type mapping. Must not be null.
Scenario the members should be returned for.
The list the interesting members (if any) will be added to. Must not be null.
Recurses down the complex property to find whether any of the nseted properties has concurrency mode set to "Fixed"
Complex property mapping. Must not be null.
true if any of the descendant properties has concurrency mode set to "Fixed". Otherwise false .
Finds foreign key properties and adds them to the .
Entity set relates to. Must not be null.
Entity type for which to find foreign key properties. Must not be null.
The list the interesting members (if any) will be added to. Must not be null.
Finds interesting members for modification functions mapped to stored procedures and adds them to the
.
Modification function mapping. Must not be null.
Update scenario the members will be used in (in general - partial update vs. full update).
Calls the view dictionary to load the view, see detailed comments in the view dictionary class.
This helper method loads items based on contents of in-memory XmlReader instances.
Assumption: This method is called only from the constructor because m_extentMappingViews is not thread safe.
A list of XmlReader instances
A list of URIs
A list of schema errors
This method compiles all the user defined query views in the .
Return the update view loader
this method will be called in metadatworkspace, the signature is the same as the one in ViewDictionary
Computes a hash value for the container mapping specified by the names of the mapped containers.
The name of a container in the conceptual model.
The name of a container in the store model.
A string that specifies the computed hash value.
Computes a hash value for the single container mapping in the collection.
A string that specifies the computed hash value.
Creates a dictionary of (extent, generated view) for a container mapping specified by
the names of the mapped containers.
The name of a container in the conceptual model.
The name of a container in the store model.
A list that accumulates potential errors.
A dictionary of (, ) that specifies the generated views.
Creates a dictionary of (extent, generated view) for the single container mapping
in the collection.
A list that accumulates potential errors.
A dictionary of (, ) that specifies the generated views.
Factory method that creates a .
The edm metadata collection to map. Must not be null.
The store metadata collection to map. Must not be null.
MSL artifacts to load. Must not be null.
Paths to MSL artifacts. Used in error messages. Can be null in which case
the base Uri of the XmlReader will be used as a path.
The collection of errors encountered while loading.
instance if no errors encountered. Otherwise null.
Gets or sets a for creating instances
that are used to retrieve pre-generated mapping views.
Return the EdmItemCollection associated with the Mapping Collection
Gets the version of this represents.
The version of this represents.
Return the StoreItemCollection associated with the Mapping Collection
Caches computation of view generation per . Cached value contains both query and update views.
Caches computation of getting Type-specific Query Views - either by view gen or user-defined input.
Call the View Generator's Generate view method
and collect the Views and store it in a local dictionary.
Generates a single query view for a given Extent and type. It is used to generate OfType and OfTypeOnly views.
Whether the view should include extents that are subtypes of the given entity
Tries to generate the Oftype or OfTypeOnly query view for a given entity set and type.
Returns false if the view could not be generated.
Possible reasons for failing are
1) Passing in OfTypeOnly on an abstract type
2) In user-specified query views mode a query for the given type is absent
Note: Null return value implies QV was not generated.
Returns the update or query view for an Extent as a
string.
There are a series of steps that we go through for discovering a view for an extent.
To start with we assume that we are working with Generated Views. To find out the
generated view we go to the ObjectItemCollection and see if it is not-null. If the ObjectItemCollection
is non-null, we get the view generation assemblies that it might have cached during the
Object metadata discovery.If there are no view generation assemblies we switch to the
runtime view generation strategy. If there are view generation assemblies, we get the list and
go through them and see if there are any assemblies that are there from which we have not already loaded
the views. We collect the views from assemblies that we have not already collected from earlier.
If the ObjectItemCollection is null and we are in the view generation mode, that means that
the query or update is issued from the Value layer and this is the first time view has been asked for.
The compile time view gen for value layer queries will work for very simple scenarios.
If the users wants to get the performance benefit, they should call MetadataWorkspace.LoadFromAssembly.
At this point we go through the referenced assemblies of the entry assembly( this wont work for Asp.net
or if the viewgen assembly was not referenced by the executing application).
and try to see if there were any view gen assemblies. If there are, we collect the views for all extents.
Once we have all the generated views gathered, we try to get the view for the extent passed in.
If we find one we will return it. If we can't find one an exception will be thrown.
If there were no view gen assemblies either in the ObjectItemCollection or in the list of referenced
assemblies of calling assembly, we change the mode to runtime view generation and will continue to
be in that mode for the rest of the lifetime of the mapping item collection.
The class loads an MSL file into memory and exposes CSMappingMetadata interfaces.
The primary consumers of the interfaces are view genration and tools.
For Example if conceptually you could represent the CS MSL file as following
--Mapping
--EntityContainerMapping ( CNorthwind-->SNorthwind )
--EntitySetMapping
--EntityTypeMapping
--TableMappingFragment
--EntityKey
--ScalarPropertyMap ( CMemberMetadata-->SMemberMetadata )
--ScalarPropertyMap ( CMemberMetadata-->SMemberMetadata )
--DiscriminatorProperyMap ( constant value-->SMemberMetadata )
--EntityTypeMapping
--TableMappingFragment
--EntityKey
--ScalarPropertyMap ( CMemberMetadata-->SMemberMetadata )
--ComplexPropertyMap
--ComplexTypeMap
--ScalarPropertyMap ( CMemberMetadata-->SMemberMetadata )
--ScalarProperyMap ( CMemberMetadata-->SMemberMetadata )
--DiscriminatorProperyMap ( constant value-->SMemberMetadata )
--AssociationSetMapping
--AssociationTypeMapping
--TableMappingFragment
--EndPropertyMap
--ScalarPropertyMap ( CMemberMetadata-->SMemberMetadata )
--ScalarProperyMap ( CMemberMetadata-->SMemberMetadata )
--EndPropertyMap
--ScalarPropertyMap ( CMemberMetadata-->SMemberMetadata )
--EntityContainerMapping ( CMyDatabase-->SMyDatabase )
--CompositionSetMapping
--CompositionTypeMapping
--TableMappingFragment
--ParentEntityKey
--ScalarPropertyMap ( CMemberMetadata-->SMemberMetadata )
--ScalarPropertyMap ( CMemberMetadata-->SMemberMetadata )
--EntityKey
--ScalarPropertyMap ( CMemberMetadata-->SMemberMetadata )
--ScalarPropertyMap ( CMemberMetadata-->Constant value )
--ComplexPropertyMap
--ComplexTypeMap
--ScalarPropertyMap ( CMemberMetadata-->SMemberMetadata )
--DiscriminatorProperyMap ( constant value-->SMemberMetadata )
--ScalarPropertyMap ( CMemberMetadata-->Constant value )
The CCMappingSchemaLoader loads an Xml file that has a conceptual structure
equivalent to the above example into in-memory data structure in a
top-dwon approach.
The loader uses XPathNavigator to parse the XML. The advantage of using XPathNavigator
over DOM is that it exposes the line number of the current xml content.
This is really helpful when throwing exceptions. Another advantage is
Public constructor.
For Beta2 we wont support delay loading Mapping information and we would also support
only one mapping file for workspace.
Dictionary to keep the list of all scalar member mappings
The LoadMappingSchema method loads the mapping file and initializes the
MappingSchema that represents this mapping file.
For Beta2 atleast, we will support only one EntityContainerMapping per mapping file.
The method loads the child nodes for the root Mapping node
into the internal datastructures.
The method loads and returns the EntityContainer Mapping node.
The method loads the child nodes for the EntityContainer Mapping node
into the internal datastructures.
Validates that collocated association sets are consistently mapped for each entity set (all operations or none). In the case
of relationships between sub-types of an entity set, ensures the relationship mapping is legal.
Validates that association sets are only mapped once.
Container to validate
Validates that all or no related extents have function mappings. If an EntitySet or an AssociationSet has a function mapping,
then all the sets that touched the same store tableSet must also have function mappings.
Container to validate.
Validates that all or no related extents have query views defined. If an extent has a query view defined, then
all related extents must also have query views.
Container to validate.
The method loads the child nodes for the EntitySet Mapping node
into the internal datastructures.
The method loads the child nodes for the EntityType Mapping node
into the internal datastructures.
Loads modification function mappings for entity type.
The method loads the query view for the Set Mapping node
into the internal datastructures.
The method loads the child nodes for the AssociationSet Mapping node
into the internal datastructures.
The method loads a function import mapping element
Attempts to infer key columns of the target function based on the function import mapping.
The method loads the child nodes for the AssociationType Mapping node
into the internal datastructures.
Loads function mappings for the entity type.
The method loads the child nodes for the TableMappingFragment under the EntityType node
into the internal datastructures.
The method loads the child nodes for the TableMappingFragment under the AssociationType node
into the internal datastructures.
The method loads the ScalarProperty mapping
into the internal datastructures.
The method loads the ComplexProperty mapping into the internal datastructures.
The method loads the EndProperty mapping
into the internal datastructures.
The method loads the ConditionProperty mapping
into the internal datastructures.
Throws a new MappingException giving out the line number and
File Name where the error in Mapping specification is present.
Error Collection where the parsing errors are collected
Resolve the attribute value based on the aliases provided as part of MSL file.
The method simply calls the helper method on Helper class with the
namespaceURI that is default for CSMapping.
The method simply calls the helper method on Helper class with the
namespaceURI that is default for CSMapping.
Error Collection where the parsing errors are collected
Returns the enum EdmMember corresponding to attribute name in enumType.
Error Collection where the parsing errors are collected
Resolve the string value based on the aliases provided as part of MSL file.
Creates Xml Reader with settings required for
XSD validation.
The method is called by the XSD validation event handler when
ever there are warnings or errors.
We ignore the warnings but the errors will result in exception.
Validate the scalar property mapping - makes sure that the cspace type is promotable to the store side and updates
the store type usage
Checks whether the represents a type usage for an enumeration type and if
this is the case creates a new type usage built using the underlying type of the enumeration type.
TypeUsage to resolve.
If represents a TypeUsage for enumeration type the method returns a new TypeUsage instance created using the underlying type of the enumeration type. Otherwise the method returns
.
Encapsulates state and functionality for loading a modification function mapping.
Loads function metadata and ensures the function is supportable for function mapping.
Describes modification function binding for change processing of entities or associations.
Gets bindings for function parameters.
Gets all association set ends collocated in this mapping.
Gets bindings for the results of function evaluation.
Gets output parameter producing number of rows affected. May be null.
Gets Metadata of function to which we should bind.
Defines all the string constrcuts defined in CS MSL specification
Mapping metadata for scalar properties.
For Example if conceptually you could represent the CS MSL file as following
--Mapping
--EntityContainerMapping ( CNorthwind-->SNorthwind )
--EntitySetMapping
--EntityTypeMapping
--MappingFragment
--EntityKey
--ScalarPropertyMap ( CMemberMetadata-->SMemberMetadata )
--ScalarPropertyMap ( CMemberMetadata-->SMemberMetadata )
--EntityTypeMapping
--MappingFragment
--EntityKey
--ScalarPropertyMap ( CMemberMetadata-->SMemberMetadata )
--ComplexPropertyMap
--ScalarPropertyMap ( CMemberMetadata-->SMemberMetadata )
--ScalarProperyMap ( CMemberMetadata-->SMemberMetadata )
--ScalarPropertyMap ( CMemberMetadata-->SMemberMetadata )
--AssociationSetMapping
--AssociationTypeMapping
--MappingFragment
--EndPropertyMap
--ScalarPropertyMap ( CMemberMetadata-->SMemberMetadata )
--ScalarProperyMap ( CMemberMetadata-->SMemberMetadata )
--EndPropertyMap
--ScalarPropertyMap ( CMemberMetadata-->SMemberMetadata )
This class represents the metadata for all the scalar property map elements in the
above example.
Construct a new Scalar EdmProperty mapping object
S-side member for which the scalar property is being mapped.
This will be interpreted by the view generation algorithm based on the context.
column name from which the sclar property is being mapped
Encapsulates information about ends of an association set needed to correctly
interpret updates.
Gets association ends that must be modified if the association
is changed (e.g. the mapping of the association is conditioned
on some property of the end)
Gets association ends that may be implicitly modified as a result
of changes to the association (e.g. collocated entity with server
generated value)
Gets association ends whose values may influence the association
(e.g. where there is a ReferentialIntegrity or "foreign key" constraint)
Initialize Metadata for an AssociationSet
Initialize given required ends.
true iff. there are interesting ends for this association set.
This class encapsulates changes propagated to a node in an update mapping view.
It contains lists of deleted and inserted rows. Key intersections betweens rows
in the two sets are treated as updates in the store.
Additional tags indicating the roles of particular values (e.g., concurrency, undefined, etc.) are stored within each row: where appropriate, constants appearing within a row are associated with a
through the .
The 'leaves' of an update mapping view (UMV) are extent expressions. A change node associated with an extent expression is simply the list of changes to the C-Space requested by a caller. As changes propagate 'up' the UMV expression tree, we recursively apply transformations such that the change node associated with the root of the UMV represents changes to apply in the S-Space.
Constructs a change node containing changes belonging to the specified collection
schema definition.
Sets property.
Gets the type of the rows contained in this node. This type corresponds (not coincidentally)
to the type of an expression in an update mapping view.
Gets a list of rows to be inserted.
Gets a list of rows to be deleted.
Gets or sets a version of a record at this node with default record. The record has the type
of the node we are visiting.
Represents a key composed of multiple parts.
Gets components of this composite key.
Initialize a new composite key using the given constant values. Order is important.
Key values.
Creates a key comparer operating in the context of the given translator.
Creates a merged key instance where each key component contains both elements.
Must be a non-null compatible key (same number of components).
Merged key.
Equality and comparison implementation for composite keys.
Class storing the result of compiling an instance DML command.
Yields all state entries contributing to this command. Used for error reporting.
Translator context.
Related state entries.
Determines model level dependencies for the current command. Dependencies are based
on the model operations performed by the command (adding or deleting entities or relationships).
Executes the current update command.
All server-generated values are added to the generatedValues list. If those values are identifiers, they are
also added to the identifierValues dictionary, which associates proxy identifiers for keys in the session
with their actual values, permitting fix-up of identifiers across relationships.
Aggregator for identifier values (read for InputIdentifiers; write for OutputIdentifiers
Aggregator for server generated values.
Number of rows affected by the command.
An asynchronous version of Execute, which executes the current update command.
All server-generated values are added to the generatedValues list. If those values are identifiers, they are
also added to the identifierValues dictionary, which associates proxy identifiers for keys in the session
with their actual values, permitting fix-up of identifiers across relationships.
Aggregator for identifier values (read for InputIdentifiers; write for OutputIdentifiers
Aggregator for server generated values.
The token to monitor for cancellation requests.
Number of rows affected by the command.
Implementation of CompareTo for concrete subclass of UpdateCommand.
Provides a suggested ordering between two commands. Ensuring a consistent ordering is important to avoid deadlocks
between two clients because it means locks are acquired in the same order where possible. The ordering criteria are as
follows (and are partly implemented in the CompareToType method). In some cases there are specific secondary
reasons for the order (e.g. operator kind), but for the most case we just care that a consistent ordering
is applied:
- The kind of command (dynamic or function). This is an arbitrary criteria.
- The kind of operator (insert, update, delete). See for details of the ordering.
- The target of the modification (table for dynamic, set for function).
- Primary key for the modification (table key for dynamic, entity keys for function).
If it is not possible to differentiate between two commands (e.g., where the user is inserting entities with server-generated
primary keys and has not given explicit values), arbitrary ordering identifiers are assigned to the commands to
ensure CompareTo is well-behaved (doesn't return 0 for different commands and suggests consistent ordering).
Gets all identifiers (key values basically) generated by this command. For instance,
@@IDENTITY values.
Gets all identifiers required by this command.
Gets table (if any) associated with the current command. FunctionUpdateCommand has no table.
Gets type of command.
Gets original values of row/entity handled by this command.
Gets current values of row/entity handled by this command.
Gets the used to create this command.
See comments in .
See comments in .
Gets DB command definition encapsulating store logic for this command.
Creates a new list of modification clauses with the specified remapped clauses replaced.
Represents the data contained in a StateEntry using internal data structures
of the UpdatePipeline.
Encapsulates metadata information relevant to update for records extracted from
the entity state manager, such as concurrency flags and key information.
Requires: record must have correct type for this metadata instance.
Populates a new object representing a member of a record matching the
type of this extractor. Given a record and a member, this method wraps the value of the member
in a PropagatorResult. This operation can be performed efficiently by this class, which knows
important stuff about the type being extracted.
state manager entry containing value (used for error reporting)
Record containing value (used to find the actual value)
Indicates whether we are reading current or original values.
Entity key for the state entry. Must be set for entity records.
Ordinal of Member for which to retrieve a value.
Indicates how to determine whether a property is modified.
Propagator result describing this member value.
Converts a record to a propagator result
state manager entry containing the record
Indicates whether the root element is modified (i.e., whether the type has changed)
Record to convert
Indicates whether we are retrieving current or original values.
Translator for session context; registers new metadata for the record type if none exists
Indicates how to determine whether a property is modified.
Result corresponding to the given record
Gets ordinal of the member.
Gets key ordinal for primary key member (null if not a primary key).
Gets propagator flags for the member, excluding the 'Preserve' flag
which can only be set in context.
Indicates whether this value is server generated.
Indicates whether non-null values are supported for this member.
Gets the member described by this wrapper.
Indicates whether this is a key member.
Indicates whether this is a foreign key member.
Modification function mapping translators are defined per extent (entity set
or association set) and manage the creation of function commands.
Requires: this translator must be registered to handle the entity set
for the given state entry.
Translates the given state entry to a command.
Parent update translator (global state for the workload)
State entry to translate. Must belong to the entity/association set handled by this translator
Command corresponding to the given state entry
Initialize a translator for the given entity set mapping.
Entity set mapping.
Translator.
Initialize a translator for the given association set mapping.
Association set mapping.
Translator.
Aggregates information about a modification command delegated to a store function.
Initialize a new function command. Initializes the command object.
Function mapping metadata
Translator
State entries handled by this operation.
'Root' state entry being handled by this function.
Gets the store command wrapped by this command.
Gets map from identifiers (key component proxies) to parameters holding the actual
key values. Supports propagation of identifier values (fixup for server-gen keys)
Gets map from identifiers (key component proxies) to column names producing the actual
key values. Supports propagation of identifier values (fixup for server-gen keys)
Gets a reference to the rows affected output parameter for the stored procedure. May be null.
Gets state entries contributing to this function. Supports error reporting.
Sets all identifier input values (to support propagation of identifier values across relationship
boundaries).
Input values to set.
See comments in .
See comments in .
Gets modification operator corresponding to the given entity state.
Pairs for column names and propagator results (so that we can associate reader results with
the source records for server generated values).
A directed graph class.
Notes on language (in case you're familiar with one or the other convention):
node == vertex
arc == edge
predecessor == incoming
successor == outgoing
Type of nodes in the graph
Initialize a new graph
Comparer used to determine if two node references are equivalent
Gets successors of the node (outgoing edges).
Gets number of predecessors of the node.
Gets the vertices that exist in the graph.
Adds a new node to the graph. Does nothing if the vertex already exists.
New node
Adds a new edge to the graph. NOTE: only adds edges for existing vertices.
Source node
Target node
DESTRUCTIVE OPERATION: performing a sort modifies the graph
Performs topological sort on graph. Nodes with no remaining incoming edges are removed
in sort order (assumes elements implement IComparable(Of TVertex))
true if the sort succeeds; false if it fails and there is a remainder
For debugging purposes.
Returns the vertices of the graph.
Returns the edges of the graph in the form: [from, to]
Manages interactions between keys in the update pipeline (e.g. via referential constraints)
Given an identifier, returns the canonical identifier for the clique including all identifiers
with the same value (via referential integrity constraints).
Indicate that the principal identifier controls the value for the dependent identifier.
Given an 'identifier' result, register it as the owner (for purposes of error reporting,
since foreign key results can sometimes get projected out after a join)
Checks if the given identifier has a registered 'owner'
Gets identifier for an entity key member at the given offset (ordinal of the property
in the key properties for the relevant entity set)
Creates identifier for a (non-key) entity member (or return existing identifier).
Gets all relationship entries constrained by the given identifier. If there is a referential constraint
where the identifier is the principal, returns results corresponding to the constrained
dependent relationships.
Given a value, returns the value for its principal owner.
Gives all principals affecting the given identifier.
Gives all direct references of the given identifier
Gets all dependents affected by the given identifier.
Checks whether the given identifier has any contributing principals.
Checks whether there is a cycle in the identifier graph.
Registers an added entity so that it can be matched by a foreign key lookup.
There are three states:
- No temp keys with the given value exists (return false, out null)
- A single temp key exists with the given value (return true, out non null)
- Multiple temp keys exist with the given value (return true, out null)
Ensures firstId and secondId belong to the same partition
Simple linked list class.
Collects information relevant to a particular identifier.
Enumeration of possible operators.
The values are used to determine the order of operations (in the absence of any strong dependencies).
The chosen order is based on the observation that hidden dependencies (e.g. due to temporary keys in
the state manager or unknown FKs) favor deletes before inserts and updates before deletes. For instance,
a deleted entity may have the same real key value as an inserted entity. Similarly, a self-reference
may require a new dependent row to be updated before the prinpical row is inserted. Obviously, the actual
constraints are required to make reliable decisions so this ordering is merely a heuristic.
Indicates that all properties are modified. Used for added and deleted entities and for
modified complex type sub-records.
Indicates that no properties are modified. Used for unmodified complex type sub-records.
Indicates that some properties are modified. Used for modified entities.
Comments assume there is a map between the CDM and store. Other maps are possible, but for simplicity, we discuss the 'from' portion of the map as the C-Space and the 'to' portion of the map as the S-Space.
This class translates C-Space change requests into S-Space change requests given a C-Space change request, an update view loader, and a target table. It has precisely one entry point, the static
method. It performs the translation by evaluating an update mapping view w.r.t. change requests (propagating a change request through the view).
This class implements propagation rules for the following relational operators in the update mapping view:
- Projection
- Selection (filter)
- Union all
- Inner equijoin
- Left outer equijoin
Abstract implementation of node visitor that allows the specification of visit methods
for different node types (VisitPre virtual methods) and evaluation of nodes with respect
to the typed (TReturn) return values of their children.
This is not a general purpose class. It is tailored to the needs of the update pipeline.
All virtual methods throw NotSupportedException (must be explicitly overridden by each visitor).
Return type for the visitor
Utility method to generate an exception when unsupported node types are encountered.
Unsupported node
Not supported exception
Gets the name of this visitor for debugging and tracing purposes.
Construct a new propagator.
UpdateTranslator supporting retrieval of changes for C-Space extents referenced in the update mapping view.
Table for which updates are being produced.
Propagate changes from C-Space (contained in to the S-Space.
See Walker class for an explanation of this coding pattern.
Grouper supporting retrieval of changes for C-Space extents referenced in the update mapping view.
Table for which updates are being produced.
Update mapping view to propagate.
Changes in S-Space.
Utility method constructs a new empty change node.
Update mapping view node associated with the change.
Empty change node with the appropriate type for the view node.
Propagates changes across a join expression node by implementing progation rules w.r.t. inputs
from the left- and right- hand sides of the join. The work is actually performed
by the .
A join expression node.
Results propagated to the given join expression node.
Given the results returned for the left and right inputs to a union, propagates changes
through the union.
Propagation rule (U = union node, L = left input, R = right input, D(x) = deleted rows
in x, I(x) = inserted rows in x)
U = L union R
D(U) = D(L) union D(R)
I(U) = I(L) union I(R)
Union expression node in the update mapping view.
Result of propagating changes to this union all node.
Propagate projection.
Propagation rule (P = projection node, S = projection input, D(x) = deleted rows in x,
I(x) = inserted rows in x)
P = Proj_f S
D(P) = Proj_f D(S)
I(P) = Proj_f I(S)
Projection expression node.
Result of propagating changes to the projection expression node.
Performs projection for a single row. Evaluates each projection argument against the specified
row, returning a result with the specified type.
Projection expression.
Row to project.
Type of the projected row.
Projected row.
Propagation rule (F = filter node, S = input to filter, I(x) = rows inserted
into x, D(x) = rows deleted from x, Sigma_p = filter predicate)
F = Sigma_p S
D(F) = Sigma_p D(S)
I(F) = Sigma_p I(S)
Handles extent expressions (these are the terminal nodes in update mapping views). This handler
retrieves the changes from the grouper.
Extent expression node
Gets context for updates performed by this propagator.
Helper class supporting the evaluation of highly constrained expressions of the following
form:
P := P AND P | P OR P | NOT P | V is of type | V eq V | V
V := P
V := Property(V) | Constant | CASE WHEN P THEN V ... ELSE V | Row | new Instance | Null
The evaluator supports SQL style ternary logic for unknown results (bool? is used, where
null --> unknown, true --> TRUE and false --> FALSE
Assumptions:
- The node and the row passed in must be type compatible.
Any var refs in the node must have the same type as the input row. This is a natural
requirement given the usage of this method in the propagator, since each propagator handler
produces rows of the correct type for its parent. Keep in mind that every var ref in a CQT is
bound specifically to the direct child.
- Equality comparisons are CLR culture invariant. Practically, this introduces the following
differences from SQL comparisons:
- String comparisons are not collation sensitive
- The constants we compare come from a fixed repertoire of scalar types implementing IComparable
For the purposes of update mapping view evaluation, these assumptions are safe because we
only support mapping of non-null constants to fields (these constants are non-null discriminators)
and key comparisons (where the key values are replicated across a reference).
Constructs an evaluator for evaluating expressions for the given row.
Row to match
Utility method filtering out a set of rows given a predicate.
Match criteria.
Input rows.
Input rows matching criteria.
Utility method determining whether a row matches a predicate.
See Walker class for an explanation of this coding pattern.
Match criteria.
Input row.
true if the row matches the criteria; false otherwise
Evaluates scalar node.
Sub-query returning a scalar value.
Row to evaluate.
Scalar result.
Given an expression, converts to a (nullable) bool. Only boolean constant and null are
supported.
Result to convert
true if true constant; false if false constant; null is null constant
Converts a (nullable) bool to an expression.
Result
Inputs contributing to the result
DbExpression
Determines whether the argument being evaluated has a given type (declared in the IsOfOnly predicate).
IsOfOnly predicate.
True if the row being evaluated is of the requested type; false otherwise.
Determines whether the row being evaluated has the given type (declared in the IsOf predicate).
Equals predicate.
True if the values being compared are equivalent; false otherwise.
Evaluates an 'and' expression given results of evalating its children.
And predicate
True if both child predicates are satisfied; false otherwise.
Evaluates an 'or' expression given results of evaluating its children.
'Or' predicate
True if either child predicate is satisfied; false otherwise.
Evalutes a 'not' expression given results
'Not' predicate
True of the argument to the 'not' predicate evaluator to false; false otherwise
Returns the result of evaluating a case expression.
Case expression node.
Result of evaluating case expression over the input row for this visitor.
Evaluates a var ref. In practice, this corresponds to the input row for the visitor (the row is
a member of the referenced input for a projection or filter).
We assert that types are consistent here.
Var ref expression node
Input row for the visitor.
Evaluates a property expression given the result of evaluating the property's instance.
Property expression node.
DbExpression resulting from the evaluation of property.
Evaluates a constant expression (trivial: the result is the constant expression)
Constant expression node.
Constant expression
Evaluates a ref key expression based on the result of evaluating the argument to the ref.
Ref key expression node.
The structural key of the ref as a new instance (record).
Evaluates a null expression (trivial: the result is the null expression)
Null expression node.
Null expression
Evaluates treat expression given a result for the argument to the treat.
Treat expression
Null if the argument is of the given type, the argument otherwise
Casts argument to expression.
Cast expression node
Result of casting argument
Casts an object instance to the specified model type.
Value to cast
clr type to which the value is casted to
Cast value
Evaluate a null expression.
Is null expression
A boolean expression describing the result of evaluating the Is Null predicate
Supports propagation of preserve and unknown values when evaluating expressions. If any input
to an expression is marked as unknown, the same is true of the result of evaluating
that expression. If all inputs to an expression are marked 'preserve', then the result is also
marked preserve.
Result to markup
Expressions contributing to the result
Marked up result.
Class generating default records for extents. Has a single external entry point, the
static method.
Initializes a map from primitive scalar types in the C-Space to default values
used within the placeholder.
Initializes a map from primitive spatial types in the C-Space to default values
used within the placeholder.
Attempts to retrieve the the default value for the specified primitive type.
A primitive type.
The default value for the primitive type.
true if a default value was found, false otherwise.
Creates a record for an extent containing default values. Assumes the extent is either
a relationship set or an entity set.
Each scalar value appearing in the record is a . A placeholder is created by recursively
building a record, so an entity record type will return a new record ()
consisting of some recursively built record for each column in the type.
Extent
A default record for the
Specialization of for an entity set extent.
Specialization of for a relationship set extent.
Returns a placeholder for a specific metadata member.
EdmMember for which to produce a placeholder.
Placeholder element for the given member.
Given default values for children members, produces a new default expression for the requested (parent) member.
Parent member
Default value for parent member
Performs join propagation. The basic strategy is to identify changes (inserts, deletes)
on either side of the join that are related according to the join criteria. Support is restricted
to conjunctions of equality predicates of the form left property == right property.
When a group of related changes is identified, rules are applied based on the existence of
different components (e.g., a left insert + right insert).
The joins handled by this class are degenerate in the sense that a row in the 'left' input always
joins with at most one row in the 'right' input. The restrictions that allow for this assumption
are described in the update design spec (see 'Level 5 Optimization').
Propagation rules for joins are stored in static fields of the class (initialized in the static
constructor for the class).
Constructs a join propagator.
Result of propagating changes in the left input to the join
Result of propagating changes in the right input to the join
Join operator in update mapping view over which to propagate changes
Handler of propagation for the entire update mapping view
These static dictionaries are initialized by the static constructor for this class.
They describe for each combination of input elements (the key) propagation rules, which
are expressions over the input expressions.
Initialize rules.
Initializes propagation rules for a specific input combination.
Describes the elements available in the input
Describes the rule for inserts when the operator is an inner join
Describes the rule for deletes when the operator is an inner join
Describes the rule for inserts when the operator is a left outer join
Describes the rule for deletes when the operator is a left outer join
Performs join propagation.
Changes propagated to the current join node in the update mapping view.
Propagate all changes associated with a particular join key.
Key.
Resulting changes are added to this result.
Produce a tuple containing joined rows.
Left row.
Right row.
Result change node; used for type information.
Result of joining the input rows.
Constructs a new placeholder record for the left hand side of the join. Values taken
from the join key are injected into the record.
Key producing the left hand side.
Mode used to populate the placeholder
Record corresponding to the type of the left input to the join. Each value in the record is flagged as
except when it is a component of the key.
See
Produces a hash table of all instances and processes join keys, adding them to the list
of keys handled by this node.
List of instances (whether delete or insert) for this node.
Selectors for key components.
A map from join keys to instances.
Flags indicating which change elements are available (0-4) and propagation
rules (0, 5-512)
Extracts equi-join properties from a join condition.
Assumptions:
- Only conjunctions of equality predicates are supported
-
Each equality predicate is of the form (left property == right property). The order
is important.
Initializes a join predicate visitor. The visitor will populate the given property
lists with expressions describing the left and right hand side of equi-join
sub-clauses.
Determine properties from the left and right inputs to an equi-join participating
in predicate.
The property definitions returned are 'aligned'. If the join predicate reads:
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.
Visit and node after its children have visited. There is nothing to do here
because only leaf equality nodes contain properties extracted by this visitor.
And expression node
Results ignored by this visitor implementation.
Perform work for an equality expression node.
Equality expresion node
Results ignored by this visitor implementation.
Describes the mode of behavior for the .
Produce a null extension record (for outer joins) marked as modified
Produce a null extension record (for outer joins) marked as preserve
Produce a placeholder for a record that is known to exist but whose specific
values are unknown.
Fills in a placeholder with join key data (also performs a clone so that the
placeholder can be reused).
Clones of placeholder nodes are created when either the structure of the node
needs to change or the record markup for the node needs to change.
Construct a new placeholder with the shape of the given placeholder. Key values are
injected into the resulting place holder and default values are substituted with
either propagator constants or progagator nulls depending on the mode established
by the flag.
The key is essentially an array of values. The key map indicates that for a particular
placeholder an expression (keyMap.Keys) corresponds to some ordinal in the key array.
Placeholder to clone
Key to substitute
Key elements in the placeholder (ordinally aligned with 'key')
Mode of operation.
Cloned placeholder with key values
Tracks roles played by a record as it propagates
w.r.t. an update mapping view.
No role.
Value is unchanged. Used only for attributes that appear in updates (in other words,
in both delete and insert set).
Value is a concurrency token. Placeholder for post Beta 2 work.
Value is unknown. Used only for attributes that appear in updates (in other words,
in both delete and insert set).
Value is a key, and therefore a concurrency value, but it is shared so it
only needs to be checked in a single table (in the case of entity splitting)
Value is a foreign key.
requires: for structural types, member values are ordinally aligned with the members of the
structural type.
Stores a 'row' (or element within a row) being propagated through the update pipeline, including
markup information and metadata. Internally, we maintain several different classes so that we only
store the necessary state.
- StructuralValue (complex types, entities, and association end keys): type and member values,
one version for modified structural values and one version for unmodified structural values
(a structural type is modified if its _type_ is changed, not its values
- SimpleValue (scalar value): flags to describe the state of the value (is it a concurrency value,
is it modified) and the value itself
- ServerGenSimpleValue: adds back-prop information to the above (record and position in record
so that we can set the value on back-prop)
- KeyValue: the originating IEntityStateEntry also travels with keys. These entries are used purely for
error reporting. We send them with keys so that every row containing an entity (which must also
contain the key) has enough context to recover the state entry.
Not all memebers of a PropagatorResult are available for all specializations. For instance, GetSimpleValue
is available only on simple types
Returns simple value stored in this result. Only valid when is
true.
Concrete value.
Returns nested value. Only valid when is false.
Ordinal of value to return (ordinal based on type definition)
Nested result.
Returns nested value. Only valid when is false.
Member for which to return a value
Nested result.
Returns all structural values. Only valid when is false.
Values of all structural members.
Produces a replica of this propagator result with different flags.
New flags for the result.
This result with the given flags.
Copies this result replacing its value. Used for cast. Requires a simple result.
New value for result
Copy of this result with new value.
Replaces parts of the structured result.
A replace-with map applied to simple (i.e. not structural) values.
Result with requested elements replaced.
A result is merged with another when it is merged as part of an equi-join.
In theory, this should only ever be called on two keys (since we only join on
keys). We throw in the base implementation, and override in KeyResult. By convention
the principal key is always the first result in the chain (in case of an RIC). In
addition, entity entries always appear before relationship entries.
Result to merge with.
Merged result.
Aligns a value returned from the store with the expected type for the member.
Value to convert.
Metadata for the member being set.
Converted return value
Gets a value indicating whether this result is null.
Gets a value indicating whether this is a simple (scalar) or complex
structural) result.
Gets flags describing the behaviors for this element.
Gets all state entries from which this result originated. Only set for key
values (to ensure every row knows all of its source entries)
Gets record from which this result originated. Only set for server generated
results (where the record needs to be synchronized).
Gets structural type for non simple results. Only available for entity and complex type
results.
Gets the ordinal within the originating record for this result. Only set
for server generated results (otherwise, returns -1)
Gets the identifier for this entry if it is a server-gen key value (otherwise
returns -1)
Where a single result corresponds to multiple key inputs, they are chained using this linked list.
By convention, the first entry in the chain is the 'dominant' entry (the principal key).
Converts records to new instance expressions. Assumes that all inputs come from a single data reader (because
it caches record layout). If multiple readers are used, multiple converters must be constructed in case
the different readers return different layouts for types.
Conventions for modifiedProperties enumeration: null means all properties are modified, empty means none,
non-empty means some.
Initializes a new converter given a command tree context. Initializes a new record layout cache.
Sets
Context used to produce expressions.
Converts original values in a state entry to a DbNewInstanceExpression. The record must be either an entity or
a relationship set instance.
This method is not thread safe.
Gets state entry this record is associated with.
Indicates how to determine whether a property is modified.
New instance expression.
Converts current values in a state entry to a DbNewInstanceExpression. The record must be either an entity or
a relationship set instance.
This method is not thread safe.
Gets state entry this record is associated with.
Indicates how to determine whether a property is modified.
New instance expression.
This class determines the state entries contributing to an expression
propagated through an update mapping view (values in propagated expressions
remember where they come from)
Finds all markup associated with the given source.
Source expression. Must not be null.
Translator containing session information.
Table from which the exception was thrown (must not be null).
Markup.
Processes changes applying to a table by merging inserts and deletes into updates
where appropriate.
This class is essentially responsible for identifying inserts, deletes
and updates in a particular table based on the
produced by value propagation w.r.t. the update mapping view for that table.
Assumes the change node includes at most a single insert and at most a single delete
for a given key (where we have both, the change is treated as an update).
Constructs processor based on the contents of a change node.
Table for which changes are being processed.
For testing purposes only
Gets metadata for the table being modified.
Gets a map from column ordinal to property descriptions for columns that are components of the table's
primary key.
Returns the edges of the graph
Gets comparer used to resolve identifiers to actual 'owning' key values (e.g. across referential constraints)
Maps from tables to all "source" referential constraints (where the table declares
foreign keys)
Maps from tables to all "target" referential constraints (where the table is
referenced by a foreign key)
Tracks whether any function commands exist in the current payload.
Gets translator producing this graph.
For function commands, we infer constraints based on relationships and entities. For instance,
we always insert an entity before inserting a relationship referencing that entity. When dynamic
and function UpdateCommands are mixed, we also fall back on this same interpretation.
Describes an update command's foreign key (source or target)
Constructor
Sets Metadata
Record containing key value
Indicates whether the source or target end of the constraint is being pulled
Indicates whether this is an insert dependency or a delete dependency
Initialize foreign key object for the target of a foreign key.
Sets Metadata
Record containing key value
Indicates whether the key value is being inserted or deleted
Outputs key object
true if the record contains key values for this constraint; false otherwise
Initialize foreign key object for the source of a foreign key.
Sets Metadata
Record containing key value
Indicates whether the key value is being inserted or deleted
Outputs key object
true if the record contains key values for this constraint; false otherwise
Foreign key metadata.
Foreign key value.
Indicates whether this is an inserted or deleted key value.
Equality comparer for ForeignKey class.
This class implements compilation of DML operation requests to some
format (e.g. canonical query tree or T-SQL)
Initialize an update compiler.
Update context.
Builds a delete command.
Value of the row being deleted.
Context for the table containing row.
Delete command.
Builds an update command.
Old value of the row being updated.
New value for the row being updated.
Context for the table containing row.
Update command.
Builds insert command.
Row to insert.
Context for the table we're inserting into.
Insert command.
Determines column/value used to set values for a row.
The following columns are not included in the result:
- Keys in non-insert operations (keys are only set for inserts).
- Values flagged 'preserve' (these are values the propagator claims are untouched).
- Server generated values.
Expression binding representing the table.
Row containing values to set.
Context for table.
Determines whether key columns and 'preserve' columns are omitted from the list.
Dictionary listing server generated identifiers.
DbExpression describing result projection for server generated values.
Indicates whether the row must be touched because it produces a value (e.g. computed)
Column value pairs.
Determines predicate used to identify a row in a table.
Columns are included in the list when:
- They are keys for the table
- They are concurrency values
Expression binding representing the table containing the row
Values for the row being located.
Values being updated (may be null).
Context for the table containing the row.
Output parameter indicating whether a row must be touched (whether it's being modified or not) because it contains a concurrency value
Column/value pairs.
This class performs to following tasks to persist C-Space changes to the store:
- Extract changes from the entity state manager
- Group changes by C-Space extent
- For each affected S-Space table, perform propagation (get changes in S-Space terms)
- Merge S-Space inserts and deletes into updates where appropriate
- Produce S-Space commands implementing the modifications (insert, delete and update SQL statements)
For testing purposes only
Registers any referential constraints contained in the state entry (so that
constrained members have the same identifier values). Only processes relationships
with referential constraints defined.
State entry
Yields all relationship state entries with the given key as an end.
Persists state manager changes to the store.
Total number of state entries affected.
An asynchronous version of Update, which
persists state manager changes to the store.
The token to monitor for cancellation requests.
A Task containing the total number of state entries affected.
Accept changes to entities and relationships processed by this translator instance.
Number of state entries affected.
Gets extents for which this translator has identified changes to be handled
by the standard update pipeline.
Enumeration of modified C-Space extents.
Gets extents for which this translator has identified changes to be handled
by function mappings.
Enumreation of modified C-Space extents.
Produce dynamic store commands for this translator's changes.
Database commands in a safe order
Gets a metadata wrapper for the given type. The wrapper makes
certain tasks in the update pipeline more efficient.
Structural type
Metadata wrapper
Returns error when it is not possible to order update commands. Argument is the 'remainder', or commands
that could not be ordered due to a cycle.
Creates a command in the current context.
DbCommand tree
DbCommand produced by the current provider.
Helper method to allow the setting of parameter values to update stored procedures.
Allows the DbProvider an opportunity to rewrite the parameter to suit provider specific needs.
Parameter to set.
The type of the parameter.
The value to which to set the parameter.
Retrieve all modified entries from the state manager.
Retrieve all required/optional/value entries into the state manager. These are entries that --
although unmodified -- affect or are affected by updates.
Validates and tracks a state entry being processed by this translator.
effects: given an entity key and a set, adds key to the set iff. the corresponding entity
is:
not a stub (or 'key') entry, and;
not a core element in the update pipeline (it's not being directly modified)
Retrieve a change node for an extent. If none exists, creates and registers a new one.
Extent for which to return a change node.
Change node for requested extent.
Retrieve a list of state entries being processed by custom user functions.
Extent for which to return entries.
List storing the entries.
Gets workspace used in this session.
Gets key manager that handles interpretation of keys (including resolution of
referential-integrity/foreign key constraints)
Gets the view loader metadata wrapper for the current workspace.
Gets record converter which translates state entry records into propagator results.
Get the connection used for update commands.
Gets command timeout for update commands. If null, use default.
Class validating relationship cardinality constraints. Only reasons about constraints that can be inferred
by examining change requests from the store.
(no attempt is made to ensure consistency of the store subsequently, since this would require pulling in all
values from the store).
Relationships registered in the validator.
Relationships the validator determines are required based on registered entities.
Cache used to store relationship sets with ends bound to entity sets.
Add an entity to be tracked by the validator. Requires that the input describes an entity.
State entry for the entity being tracked.
Add a relationship to be tracked by the validator.
Relationship set to which the given record belongs.
Relationship record. Must conform to the type of the relationship set.
State entry for the relationship being tracked
Validates cardinality constraints for all added entities/relationships.
Determines the net change in relationship count.
For instance, if the directional relationship is added 2 times and deleted 3, the return value is -1.
Determine which relationship sets reference the given entity set.
Entity set for which to identify relationships
Relationship sets referencing the given entity set
An instance of an actual or expected relationship. This class describes one direction
of the relationship.
Entity key for the entity being referenced by the relationship.
Name of the end referencing the entity key.
Name of the end the entity key references.
State entry containing this relationship.
Reference to the relationship set.
Reference to next 'equivalent' relationship in circular linked list.
Requires: 'other' must refer to the same relationship metadata and the same target entity and
must not already be a part of an equivalent set.
Adds the given relationship to linked list containing all equivalent relationship instances
for this relationship (e.g. all orders associated with a specific customer)
Returns all relationships in equivalence set.
Determines the number of add and delete operations contained in this equivalence set.
Retrieves update mapping views and dependency information for update mapping views. Acts as a wrapper around
the metadata workspace (and allows direct definition of update mapping views for test purposes).
Constructor specifying a metadata workspace to use for mapping views.
For a given extent, returns the function mapping translator.
Association set or entity set for which to retrieve a translator
Function translator or null if none exists for this extent
Returns store tables affected by modifications to a particular C-layer extent. Although this
information can be inferred from the update view, we want to avoid compiling or loading
views when not required. This information can be directly determined from mapping metadata.
C-layer extent.
Affected store tables.
Gets information relevant to the processing of an AssociationSet in the update pipeline.
Caches information on first retrieval.
Determines whether the given member maps to a server-generated column in the store.
Requires: InitializeExtentInformation has been called for the extent being persisted.
Entity set containing member.
Member to lookup
Whether the member is server generated in some context
Determines whether the given member maps to a column participating in an isnull
condition. Useful to determine if a nullability constraint violation is going to
cause roundtripping problems (e.g. if type is based on nullability of a 'non-nullable'
property of a derived entity type)
Utility method reading value from dictionary within read lock.
Utility method checking for membership of element in set within read lock.
Initializes all information relevant to the entity set.
Association set or entity set to load.
Function to evaluate to produce a result.
Yields all members appearing in function mapping result bindings.
Set mapping to examine
All result bindings
Gets all model properties mapped to server generated columns.
Gets all store columns participating in is null conditions.
Gets all model properties mapped to given columns.
Enumerates all mapping fragments in given set mapping.
Returns all bottom-level mappings (e.g. conditions and scalar property mappings but not complex property mappings
whose components are returned)
Represents a simple value condition of the form (value IS NULL), (value IS NOT NULL)
or (value EQ X). Supports IEquatable(Of ValueCondition) so that equivalent conditions
can be identified.
Traverse the tree and perform the following rewrites:
1. Flatten unions contained as left children of LOJs: LOJ(A, Union(B, C)) -> LOJ(A, B, C).
2. Rewrite flat LOJs into nested LOJs. The nesting is determined by FKs between right cell table PKs.
Example: if we have an LOJ(A, B, C, D) and we know there are FKs from C.PK and D.PK to B.PK,
we want to rewrite into this - LOJ(A, LOJ(B, C, D)).
3. As a special case we also look into LOJ driving node (left most child in LOJ) and if it is an IJ,
then we consider attaching LOJ children to nodes inside IJ based on the same principle as above.
Example: LOJ(IJ(A, B, C), D, E, F) -> LOJ(IJ(LOJ(A, D), B, LOJ(C, E)), F) iff D has FK to A and E has FK to C.
This normalization enables FK-based join elimination in plan compiler, so for a query such as
"select e.ID from ABCDSet" we want plan compiler to produce "select a.ID from A" instead of
"select a.ID from A LOJ B LOJ C LOJ D".
A class that handles creation of cells from the meta data information.
Boolean members have a closed domain and are enumerated when domains are established i.e. (T, F) instead of (notNull).
Query Rewriting is exercised over every domain of the condition member. If the member contains not_null condition
for example, it cannot generate a view for partitions (member=T), (Member=F). For this reason we need to expand the cells
in a predefined situation (below) to include sub-fragments mapping individual elements of the closed domain.
Enums (a planned feature) need to be handled in a similar fashion.
Find booleans that are projected with a not_null condition
Expand ALL cells where they are projected. Why? See Unit Test case NullabilityConditionOnBoolean5.es
Validation will fail because it will not be able to validate rewritings for partitions on the 'other' cells.
Given a cell, a member and a boolean condition on that member, creates additional cell
which with the specified restriction on the member in addition to original condition.
e.i conjunction of original condition AND member in newCondition
Creation fails when the original condition contradicts new boolean condition
ViewTarget tells whether MemberPath is in Cquery or SQuery
Takes in a JoinTreeNode and a Contition Property Map and creates an BoolExpression
for the Condition Map.
This class holds some configuration information for the view generation code.
To measure a single thing at a time.
Perf op being measured.
Sets time for for the individual timer.
Sets time for since the last call to .
If true then view generation will produce eSQL, otherwise CQTs only.
Callers can set elements in this list.
Encapsulates a slot in a particular cql block.
This class represents the constants or members that that can be referenced in a C or S Cell query.
In addition to fields, may represent constants such as types of fields, booleans, etc.
Returns true if this is semantically equivalent to .
Creates new that is qualified with .CqlAlias.
If current slot is composite (such as , then this method recursively qualifies all parts
and returns a new deeply qualified slot (as opposed to ).
Returns the alias corresponding to the slot based on the , e.g., "CPerson1_pid".
Derived classes may override this behavior and produce aliases that don't depend on .
Given the slot and the , generates eSQL corresponding to the slot.
If slot is a qualified slot, is ignored. Returns the modified
.
outputMember is non-null if this slot is not a constant slot
indicates the appropriate indentation level (method can ignore it)
Given the slot and the input , generates CQT corresponding to the slot.
Given fields in and , remap and merge them.
Given two lists and , merge them and returnthe resulting slots,
i.e., empty slots from one are overridden by the slots from the other.
A class that can compare slots based on their contents.
Returns true if and are semantically equivalent.
Creates a qualified slot "block_alias.slot_alias"
Creates new that is qualified with .CqlAlias.
If current slot is composite (such as , then this method recursively qualifies all parts
and returns a new deeply qualified slot (as opposed to ).
Delegates alias generation to the leaf slot in the qualified chain.
Walks the chain of s starting from the current one and returns the original slot.
This class represents slots for expressions over boolean variables, e.g., _from0, _from1, etc
Creates a boolean slot for expression that comes from originalCellNum, i.e.,
the value of the slot is and the name is "_from{}", e.g., _from2
The actual value of the slot - could be !
A boolean corresponding to the original cell number (_from0)
Returns "_from0", "_from1" etc. is ignored.
A class to capture cql blocks responsible for case statements generating multiconstants, i.e., complex types, entities, discriminators, etc.
A class that holds an expression of the form "(SELECT .. FROM .. WHERE) AS alias".
Essentially, it allows generating Cql query in a localized manner, i.e., all global decisions about nulls, constants,
case statements, etc have already been made.
Initializes a with the SELECT (), FROM (
),
WHERE (), AS ().
Essentially, SELECT. May be replaced with another collection after block construction.
FROM inputs.
WHERER.
Alias of the whole block for cql generation.
See for more info.
Returns a string corresponding to the eSQL representation of this block (and its children below).
Returns a string corresponding to the CQT representation of this block (and its children below).
For the given creates a qualified with
of the current block:
".slot_alias"
Returns true iff is being projected by this block.
Generates "A, B, C, ..." for all the slots in the block.
Generates "NewRow(A, B, C, ...)" for all the slots in the block.
If =true then generates "A" for the only slot that is marked as
.
Initializes context positioning in the join tree that owns the .
For more info see .
Searches the input for the property that represents the current .
In all cases except JOIN, the is returned as is.
In case of JOIN, .JoinVarX.JoinVarY...blockVar is returned.
See for more info.
Returns all the slots for this block (SELECT).
Returns all the child (input) blocks of this block (FROM).
Returns the where clause of this block (WHERE).
Returns an alias for this block that can be used for "AS".
The class represents a position of a in a join tree.
It is expected that the join tree is left-recursive (not balanced) and looks like this:
___J___
/ \
L3/ \R3
/ \
__J__ \
/ \ \
L2/ \R2 \
/ \ \
_J_ \ \
/ \ \ \
L1/ \R1 \ \
/ \ \ \
CqlBlock1 CqlBlock2 CqlBlock3 CqlBlock4
Example of s for the s:
block# m_parentQualifiers m_indexInParentQualifiers m_leafQualifier FindInput(row) = ...
1 (L2, L3) 0 L1 row.(L3.L2).L1
2 (L2, L3) 0 R1 row.(L3.L2).R1
3 (L2, L3) 1 R2 row.(L3).R2
4 (L2, L3) 2 R3 row.().R3
Creates a containing the case statememt for the and projecting other slots as is from its child (input). CqlBlock with SELECT (slots),
indicates which slot in corresponds to the case statement being generated by this block
A class that represents leaf s in the tree.
Creates an cql block representing the (the FROM part).
SELECT is given by , WHERE by and AS by
.
Represents to the various Join nodes in the view: IJ, LOJ, FOJ.
Creates a join block (type given by ) with SELECT (), FROM (
),
ON ( - one for each child except 0th), WHERE (true), AS (
).
Represents a complete ON clause "slot1 == slot2 AND "slot3 == slot4" ... for two s.
Adds an element for a join of the form =
.
Generates eSQL string of the form "LeftSlot1 = RightSlot1 AND LeftSlot2 = RightSlot2 AND ...
Generates CQT of the form "LeftSlot1 = RightSlot1 AND LeftSlot2 = RightSlot2 AND ...
Represents an expression between slots of the form: LeftSlot = RightSlot
Generates eSQL string of the form "leftSlot = rightSlot".
Generates CQT of the form "leftSlot = rightSlot".
A class that keeps track of slot information in a .
Creates a for a X with information about whether this slot is needed by X's parent
(), whether X projects it () along with the slot value (
) and
the output member path ( (for regular/non-boolean slots) for the slot.
Creates a for a X with information about whether this slot is needed by X's parent
(), whether X projects it () along with the slot value (
) and
the output member path ( (for regular/non-boolean slots) for the slot.
We need to ensure that _from variables are never null since view generation uses 2-valued boolean logic. If
=true, the generated Cql adds a condition (AND NOT NULL). This flag is used only for boolean slots.
If slot is required by the parent. Can be reset to false in method.
If the node is capable of projecting this slot.
The slot represented by this .
The output member path of this slot.
Whether to add AND NOT NULL to Cql.
Sets the to false.
Note we don't have a setter because we don't want people to set this field to true after the object has been created.
Generates eSQL representation of the slot. For different slots, the result is different, e.g., "_from0", "CPerson1.pid", "TREAT(....)".
Generates CQT representation of the slot.
Returns true iff this slot is required by the 's parent.
Can be reset to false by calling method.
Returns true iff this slot is projected by this .
Returns the output memberpath of this slot
Returns the slot value corresponfing to this object.
Returns the Cql alias for this slot, e.g., "CPerson1_Pid", "_from0", etc
Returns true if Cql generated for the slot needs to have an extra AND IS NOT NULL condition.
Represents Union nodes in the tree.
Creates a union block with SELECT (), FROM (), WHERE (true), AS (
).
This class is responsible for generation of CQL after the cell merging process has been done.
Given the generated , the for the multiconstant fields,
the that maps different paths of the entityset (for which the view is being generated) to slot indexes in the view,
creates an object that is capable of generating the Cql for .
The generated view from the cells.
Case statements for the multiconstant fields.
Mapping from member paths to slot indexes.
Number of booleans in the view, one per cell (from0, from1, etc...)
A counter used to generate aliases for blocks.
Identifiers used in the Cql queries.
Returns eSQL query that represents a query/update mapping view for the view information that was supplied in the constructor.
Returns Cqtl query that represents a query/update mapping view for the view information that was supplied in the constructor.
Generates a tree that is capable of generating the actual Cql strings.
Given the tree, generates the case statement blocks on top of it (using
) and returns the resulting tree.
One block per case statement is generated. Generated blocks are nested, with the is the innermost input.
Given the tree generated by the cell merging process and the
,
generates the block tree for the case statement at or past the startSlotNum, i.e., only for case statements that are beyond startSlotNum.
Given the slot () and its corresponding case statement (
),
generates the slotinfos for the cql block producing the case statement.
Returns the next slot starting at that is present in the
.
Returns an array of size which indicates the slots that are needed to constuct value at
,
e.g., CPerson may need pid and name (say slots 2 and 5 - then bools[2] and bools[5] will be true.
must be part of
Given the , returns the output member path that this slot contributes/corresponds to in the extent view.
If the slot corresponds to one of the boolean variables, returns null.
Returns the slot index for the following member path: ., e.g., CPerson1.pid
Describes top-level query mapping view projection of the form:
SELECT VALUE CASE
WHEN Discriminator = DiscriminatorValue1 THEN EntityType1(...)
WHEN Discriminator = DiscriminatorValue2 THEN EntityType2(...)
...
Supports optimizing queries to leverage user supplied discriminator values
in TPH mappings rather than introducing our own. This avoids the need
to introduce a CASE statement in the store.
Expression retrieving discriminator value from projection input.
Map from discriminator values to implied entity type.
Map from entity property to expression generating value for that property. Note that
the expression must be the same for all types in discriminator map.
Map from entity relproperty to expression generating value for that property. Note that
the expression must be the same for all types in discriminator map.
EntitySet to which the map applies.
Determines whether the given query view matches the discriminator map pattern.
Utility method determining whether two expressions appearing within the same scope
are equivalent. May return false negatives, but no false positives. In other words,
x != y --> !ExpressionsCompatible(x, y)
but does not guarantee
x == y --> ExpressionsCompatible(x, y)
Holds the view generated for a given OFTYPE(Extent, Type) combination.
Creates generated view object for the combination of the and the .
This constructor is used for regular cell-based view generation.
Creates generated view object for the combination of the and the .
This constructor is used for FK association sets only.
Creates generated view object for the combination of the .Set and the
.
This constructor is used for user-defined query views only.
Given an extent and its corresponding view, invokes the parser to check if the view definition is syntactically correct.
Iff parsing succeeds: and are set to the parse result and method returns true,
otherwise if parser has thrown a catchable exception, it is returned via parameter,
otherwise exception is re-thrown.
Uses query rewriting to determine the case statements, top-level WHERE clause, and the "used views"
for a given type to be generated.
Step 1: Method "EnsureIsFullyMapped" goes through the (C) schema metadata and checks whether the query for each
entity shape can be rewritten from the C fragment queries.
This step tracks the "used views" which will later be passed to "basic view generation" (i.e., creation of the FOJ/LOJ/IJ/Union relational expressions)
Step 2: GetCaseStatements constructs the required case statements and the top-level WHERE clause.
This may add some extra views to "used views".
Now we know what views are used overall.
Step 3: We remap _from variables to new _from variables that are renumbered for used views.
This is done to comply with the numbering scheme in the old algorithm - and to produce more readable views.
Step 4: From the constructed relational expression (OpCellTree), we can tell whether a top-level WHERE clause is needed or not.
(Usually, it's needed only in certain cases for OfType() views.)
Validates each mapping fragment/cell (Qc = Qs)
by unfolding update views in Qs and checking query equivalence
Given a LeftCellWrapper for the S-side fragment and a non-nullable colum m, return a CQuery with nullability condition
appended to Cquery of c-side member that column m is mapped to
Checks whether non nullable S-side members are mapped to nullable C-query.
It is possible that C-side attribute is nullable but the fragment's C-query is not
Denotes the fact that the key of the current tuple comes from a specific extent, or association role.
A class that ties up all the literals in boolean expressions.
Conditions represented by s need to be synchronized with s,
which may be modified upon calling . This is what the method
is used for.
Creates a term expression of the form: " in with all possible values being
".
Creates a term expression of the form: " in with all possible values being
".
Fixes the range of the literal using the new values provided in and returns a boolean expression corresponding to the new value.
See .
See .
See .
See .
Checks if the identifier in this is the same as the one in .
Get the hash code based on the identifier.
This class compares boolean expressions.
This class compares just the identifier in boolean expressions.
Not supported in this class.
Not supported in this class.
Given the for the block in which the expression resides, converts the expression into eSQL.
Given the for the input, converts the expression into CQT.
Whether the boolean expression contains only OneOFTypeConst variables.
A class to denote a case statement:
CASE
WHEN condition1 THEN value1
WHEN condition2 THEN value2
...
END
Creates a case statement for the with no clauses.
The field.
All the WHEN THENs.
Value for the else clause.
Recursively qualifies all s and returns a new deeply qualified
.
Adds an expression of the form "WHEN THEN ".
This operation is not allowed after the call.
Simplifies the so that unnecessary WHEN/THENs for nulls/undefined values are eliminated.
Also, adds an ELSE clause if possible.
Generates eSQL for the current .
Generates CQT for the current .
Returns true if the depends on (projects) its slot in THEN value or ELSE value.
A class that stores WHEN condition THEN value.
Creates WHEN condition THEN value.
Returns WHEN condition.
Returns THEN value.
This class is just a wrapper over case statements so that we don't pollute the class itself.
Creates a slot for .
The actual case statement.
Creates new that is qualified with .CqlAlias.
If current slot is composite (such as , then this method recursively qualifies all parts
and returns a new deeply qualified slot (as opposed to ).
This class contains a pair of cell queries which is essentially a
constraint that they are equal. A cell is initialized with a C or an
S Query which it exposes as properties but it also has the notion of
"Left" and "Right" queries -- left refers to the side for which a
view is being generated
For example, to
specify a mapping for CPerson to an SPerson table, we have
[(p type Person) in P : SPerson]
(p.pid, pid)
(p.name, name)
This really denotes the equality of two queries:
(C) SELECT (p type Person) AS D1, p.pid, p.name FROM p in P WHERE D1
(S) SELECT True AS D1, pid, name FROM SPerson WHERE D1
For more details, see the design doc
Copy Constructor
Wraps from0, from1, etc. boolean fields that identify the source of tuples (# of respective cell query) in the view statements.
Creates a boolean expression for the variable name specified by , e.g., 0 results in from0, 1 into from1.
e.g., from0, from1.
Returns the slotName corresponding to this, ie., _from0 etc.
Copy Constructor
This class stores the C or S query. For example,
(C) SELECT (p type Person) AS D1, p.pid, p.name FROM p in P WHERE D1
(S) SELECT True AS D1, pid, name FROM SPerson WHERE D1
The cell query is stored in a "factored" manner for ease of
cell-merging and cell manipulation. It contains:
* Projection: A sequence of slots and a sequence of boolean slots (one
for each cell in the extent)
* A From part represented as a Join tree
* A where clause
Copy Constructor
[WARNING}
After cell merging boolean expression can (most likely) have disjunctions (OR node)
to represent the condition that a tuple came from either of the merged cells.
In this case original where clause IS MERGED CLAUSE with OR.
So don't call this after merging. It'll throw or debug assert from within GetConjunctsFromWC()
Whether query has a 'SELECT DISTINCT' on top.
This class denotes a constant that can be stored in multiconstants or projected in fields.
Represents scalar constants within a finite set that are not specified explicitly in the domain.
Currently only used as a Sentinel node to prevent expression optimization
Returns true if this constant contains not null.
Implemented in class, all other implementations return false.
Generates eSQL for the constant expression.
The member to which this constant is directed
Generates CQT for the constant expression.
The input row.
The member to which this constant is directed
Not supported in this class.
Not supported in this class.
Not supported in this class.
Not supported in this class.
Not supported in this class.
Not supported in this class.
A constant that can be projected in a cell query.
Creates a slot with constant value being .
The actual value.
Returns the value stored in this constant.
Returns true if the domain contains the given Cell Constant
Yields the set of all values in the domain.
Adds AllOtherConstants element to the domain set given by MemberPath
Removes AllOtherConstant element from the domain set given by MemberPath
A class that corresponds to a path in some extent, e.g., Person, Person.addr, Person.addr.state
Empty path represents path to the extent.
The base entity set.
List of members in the path.
Creates a member path that corresponds to in the (or the extent itself).
Creates a member path that corresponds to the .
Creates a path corresponding to .
Creates a member path corresponding to the path .
Returns false iff the path is
* A descendant of some nullable property
* A descendant of an optional composition/collection
* A descendant of a property that does not belong to the basetype/rootype of its parent.
Determines all the identifiers used in the path and adds them to .
Returns true iff all members are nullable properties, i.e., if even one of them is non-nullable, returns false.
Returns a string that has the list of properties in (i.e., just the last name) if
is false.
Else the is added.
Given a member path and an alias, returns an eSQL string correspondng to the fully-qualified name
.path, e.g., T1.Address.Phone.Zip.
If a subcomponent belongs to subclass, generates a treat for it, e.g. "TREAT(T1 as Customer).Address".
Or even "TREAT(TREAT(T1 AS Customer).Address as USAddress).Zip".
Returns true if the member denoted by the path corresponds to a scalar (primitive or enum).
Returns true if this path and are equivalent on the C-side via a referential constraint.
Returns true if and are equivalent via a referential constraint in
.
Requires: and correspond to paths in
.
Returns the member path corresponding to that field in the . E.g., given Address.pid, returns PersonAddress.Address.pid.
For self-associations, such as ManagerEmployee with referential constraints (and we have
[ManagerEmployee.Employee.mid, ManagerEmployee.Employee.eid, ManagerEmployee.Manager.mid]), given Employee.mid, returns
ManagerEmployee.Employee.mid or ManagerEmployee.Manager.mid
Note: the path need not correspond to a key field of an entity set .
If member path identifies a relationship end, return its scope. Otherwise, returns null.
Returns a string of the form "a.b.c" that corresponds to the items in the path. This string can be used for tests or localization.
If =true, we return a string that is relevant for Cql aliases, else we return the exact path.
Returns a human-readable string corresponding to the path.
Returns the first path item in a non-empty path, otherwise null.
Returns the last path item in a non-empty path, otherwise null.
For non-empty paths returns name of the last path item, otherwise returns name of .
Tells path represents a computed slot.
Returns the default value the slot represented by the path. If no default value is present, returns null.
Returns true if slot represented by the path is part of a key.
Returns true if slot represented by the path is nullable.
If path corresponds to an entity set (empty path) or an association end ( is as association set, and path length is 1),
returns associated with the value of the slot represented by this path, otherwise returns null.
Extent of the path.
Returns the type of attribute denoted by the path.
For example, member type of Person.addr.zip would be integer. For extent, it is the element type.
Returns Cql field alias generated from the path items.
A wrapper around MemberPath that allows members to be marked as ProjectedSlots.
Creates a projected slot that references the relevant celltree node.
True iff and types do not match,
We assume that the mapping loader has already checked that the casts are ok and emitted warnings.
Given a slot and the new mapping, returns the corresponding new slot.
Given the , determines the slots in that correspond to the entity key for the entity set or the
association set end. Returns the list of slots. Returns null if even one of the key slots is not present in slots.
corresponds to an entity set or an association end
Searches for members in and returns the corresponding slots in the same order as present in
. Returns null if even one member is not present in slots.
Searches for in and returns the corresponding slot. If none is found, returns null.
Returns the full metadata path from the root extent to this node, e.g., Person.Adrs.zip
Manages s of the members of the types stored in an extent.
This is a bi-directional dictionary of s to integer indexes and back.
Recursively generates s for the members of the types stored in the .
Creates an empty index.
Returns a non-negative index of the if found, otherwise -1.
If an index already exists for member, this is a no-op. Else creates the next index available for member and returns it.
Given the , returns the output member path that this slot contributes/corresponds to in the extent view.
If the slot corresponds to one of the boolean variables, returns null.
Given the index of a boolean variable (e.g., of from1), returns the slot number for that boolean in this.
Given the corresponding to a boolean slot, returns the cell number that the cell corresponds to.
Returns true if corresponds to a key slot in the output extent view.
Returns true if corresponds to a bool slot and not a regular field.
Starting at the , recursively generates s for the fields embedded in it.
corresponds to a value of an Entity or Complex or Association type
indicates whether we need to only collect members that are keys
Given the and one of its s, determine the attributes that are relevant
for this and return a signature corresponding to the
and the attributes.
If =true, collect the key fields only.
the 's type or one of its subtypes
Returns the indexes of the key slots corresponding to fields in this for which IsPartOfKey is true.
Returns an enumeration of all members
An abstract class that denotes the boolean expression: "var in values".
An object of this type can be complete or incomplete.
An incomplete object is one whose domain was not created with all possible values.
Incomplete objects have a limited set of methods that can be called.
Creates an incomplete member restriction with the meaning " = ".
"Partial" means that the in this restriction is partial - hence the operations on the restriction are limited.
Creates an incomplete member restriction with the meaning " in ".
Creates a complete member restriction with the meaning " in ".
Creates a complete member restriction with the meaning " in ".
all the values that the can take
Returns a boolean expression that is domain-aware and ready for optimizations etc.
Maps members to the values that each member can take; it can be null in which case the possible and actual values are the same.
Creates a complete member restriction based on the existing restriction with possible values for the domain being given by
.
See .
See . Member restriction can be incomplete for this operation.
Member restriction can be incomplete for this operation.
See . Member restriction can be incomplete for this operation.
See . Member restriction can be incomplete for this operation.
Returns the variable in the member restriction.
Returns the values that is being checked for.
A class that represents NOT(elements), e.g., NOT(1, 2, NULL), i.e., all values other than null, 1 and 2
Creates a negated constant with the in it.
must have no items
e.g., NOT(1, 2, Undefined)
Returns true if the negated constant contains .
Returns true if the negated constant contains .
Not supported in this class.
Not supported in this class.
Given a set of positive generates a simplified negated constant Cql expression.
Examples:
- 7, NOT(7, NULL) means NOT(NULL)
- 7, 8, NOT(7, 8, 9, 10) means NOT(9, 10)
Given the , returns eSQL string corresponding to the op.
A class that denotes "block_alias.booleanVar", e.g., "T1._from2".
It is a subclass of with an added block alias.
Creates a boolean of the form ".".
A class that denotes a constant value that can be stored in a multiconstant or in a projected slot of a
.
Creates a scalar constant corresponding to the .
The actual value of the scalar.
A class that denotes the boolean expression: "scalarVar in values".
See the comments in for complete and incomplete restriction objects.
Creates a scalar member restriction with the meaning " = ".
This constructor is used for creating discriminator type conditions.
Creates a scalar member restriction with the meaning " in ".
Creates a scalar member restriction with the meaning " in ".
Fixes the range of the restriction in accordance with .
Member restriction must be complete for this operation.
Common code for and methods.
A constant for storing type values, e.g., a type constant is used to denote (say) a Person type, Address type, etc.
It essentially encapsulates an EDM nominal type.
Creates a type constant corresponding to the .
The EDM type denoted by this type constant.
Given the in the output extent view, generates a constructor expression for
's type, i.e, an expression of the form "Type(....)"
If is an association end then instead of constructing an Entity or Complex type, constructs a reference.
Returns the EDM type corresponding to the type constant.
A class that denotes the boolean expression: "varType in values".
See the comments in for complete and incomplete restriction objects.
Creates an incomplete type restriction of the form " in ".
Creates an incomplete type restriction of the form " = ".
Creates a complete type restriction of the form " in ".
Requires: is true.
Given a list of (which can contain nulls), returns a corresponding list of
s for those types.
A class to denote a part of the WITH RELATIONSHIP clause.
Not supported in this class.
This class encapsulates "external" calls from view/MDF generation to other System.Data.Entity features.
Compiles eSQL and returns .
Guarantees type match of lambda variables and .
Passes thru all excepions coming from .
Finds Types (possibly without any members) that have no mapping specified
Finds errors related to splitting Conditions
1. Condition value is repeated across multiple types
2. A Column/attribute is mapped but also used as a condition
When we are dealing with an update view, this method
finds out if the given Table is mapped to different EntitySets
Finds out whether fragments (partitions) violate constraints that would produce an invalid mapping.
We compare equality/disjointness/containment for all 2-combinations of fragments.
Error is reported if given relationship on S side is not maintained on the C side.
If we know nothing about S-side then any relationship on C side is valid.
Gets the types on the Edm side mapped in this fragment wrapper.
It also returns an out parameter indicating whether there were any C side conditions.
Return true if there were any Store conditions on this cell wrapper.
A class representing a set of constraints. It uses generic parameters
so that we can get strong typing and avoid downcasts
Represents a relation signature that lists all projected
slots of two cell queries in a cell after projection. So if
SPerson1.Disc is present in the cellquery (and part of the where
clause) but not in the projected slots, it is missing from a ViewCellRelation
Represents a slot that is projected by C and S queries in a cell.
Creates a view cell slot that corresponds to in some cell. The and
represent the
slots in the left and right queries of the view cell.
Given a list of , converts the left/right slots (if left is true/false) to a human-readable string.
Not supported in this class.
Not supported in this class.
Not supported in this class.
Returns the slot corresponding to the left cellquery.
Returns the slot corresponding to the right cellquery.
Checks that if a DISTINCT operator exists between some C-Extent and S-Extent, there are no additional
mapping fragments between that C-Extent and S-Extent.
We need to enforce this because DISTINCT is not understood by viewgen machinery, and two fragments may be merged
despite one of them having DISTINCT.
Find the Foreign Key Associations that relate EntitySets used in these left cell wrappers and
add any equivalence facts between sets implied by 1:1 associations.
We can collect other implication facts but we don't have a scenario that needs them( yet ).
Checks:
1) Concurrency token is not defined in this Extent's ElementTypes' derived types
2) Members with concurrency token should not have conditions specified
Entry point for View Generation
Generated Views for EntitySets
Entry point for Type specific generation of Query Views
Verifies that only legal expressions exist in a user-defined query mapping view.
Determines whether the given view is valid.
Query view to validate.
Mapping in which view is declared.
Errors in view definition.
Retrieves all complex types that can be constructed as part of the view.
Recursively identify complex types.
Gets all entity types in scope for this view.
The visitor validates that the QueryView for an AssociationSet uses the same EntitySets when
creating the ends that were used in CSDL. Since the Query View is already validated, we can expect to
see only a very restricted set of expressions in the tree.
metadata exception class
Initializes a new instance of the class with a default message.
Initializes a new instance of the class with the specified message.
The exception message.
Initializes a new instance of the class with the specified message and inner exception.
The exception message.
The exception that is the cause of this .
constructor for deserialization
Determine whether we are inside an ASP.NET application.
true if we are running inside an ASP.NET application
This method accepts a string parameter that represents a path in a Web (specifically,
an ASP.NET) application -- one that starts with a '~' -- and resolves it to a
canonical file path.
The implementation assumes that you cannot have file names that begin with the '~'
character. (This is a pretty reasonable assumption.) Additionally, the method does not
test for the existence of a directory or file resource after resolving the path.
CONSIDER: Caching the reflection results to satisfy subsequent path resolution requests.
ISSUE: Need to maintain context for a set of path resolution requests, so that we
don't run into a situation where an incorrect context is applied to a path resolution
request.
A path in an ASP.NET application
A fully-qualified path
Add the given primitive type to the primitive type cache
The primitive type to add
Try and get the mapped type for the given primitiveTypeKind in the given dataspace
The primitive type kind of the primitive type to retrieve
The facets to use in picking the primitive type
The resulting type
Whether a type was retrieved or not
Get the list of the primitive types for the given dataspace
Internal helper class for query
Internal helper class for query
Creates a new instance of perspective class so that query can work
ignorant of all spaces
runtime metadata container
target dataspace for the perspective
Given the type in the target space and the member name in the source space,
get the corresponding member in the target space
For e.g. consider a Conceptual Type 'Foo' with a member 'Bar' and a CLR type
'XFoo' with a member 'YBar'. If one has a reference to Foo one can
invoke GetMember(Foo,"YBar") to retrieve the member metadata for bar
The type in the target perspective
the name of the member in the source perspective
Whether to do case-sensitive member look up or not
returns the member in target space, if a match is found
Returns the extent in the target space, for the given entity container.
name of the entity container in target space
name of the extent
Whether to do case-sensitive member look up or not
extent in target space, if a match is found
returns true, if a match is found otherwise returns false
Returns the function import in the target space, for the given entity container.
Get the default entity container
returns null for any perspective other
than the CLR perspective
The default container
Get an entity container based upon the strong name of the container
If no entity container is found, returns null, else returns the first one///
name of the entity container
true for case-insensitive lookup
returns the entity container if a match is found
returns true if a match is found, otherwise false
Gets a type with the given name in the target space.
full name of the type
true for case-insensitive lookup
TypeUsage for the type
returns true if a match was found, otherwise false
Returns overloads of a function with the given name in the target space.
namespace of the function
name of the function
true for case-insensitive lookup
function overloads
returns true if a match was found, otherwise false
returns the primitive type for a given primitive type kind.
Return the metadata workspace
Returns the target dataspace for this perspective
Creates a new instance of perspective class so that query can work
ignorant of all spaces
Given a clrType attempt to return the corresponding target type from
the worksapce
The clr type to resolve
an out param for the typeUsage to be resolved to
true if a TypeUsage can be found for the target type
Given the type in the target space and the member name in the source space,
get the corresponding member in the target space
For e.g. consider a Conceptual Type Foo with a member bar and a CLR type
XFoo with a member YBar. If one has a reference to Foo one can
invoke GetMember(Foo,"YBar") to retrieve the member metadata for bar
The type in the target perspective
the name of the member in the source perspective
true for case-insensitive lookup
returns the edmMember if a match is found
true if a match is found, otherwise false
Look up a type in the target data space based upon the fullName
fullName
true for case-insensitive lookup
The type usage object to return
True if the retrieval succeeded
get the default container
The default container
Given a map, dereference the EdmItem, ensure that it is
an EdmType and return a TypeUsage for the type, otherwise
return null.
The OC map to use to get the EdmType
A TypeUsage for the mapped EdmType or null if no EdmType was mapped
Helper Class for converting SOM objects to metadata objects
This class should go away once we have completely integrated SOM and metadata
Static constructor for creating FacetDescription objects that we use
Converts a schema from SOM into Metadata
The SOM schema to convert
The provider manifest to be used for conversion
The item collection for currently existing metadata objects
Loads a schema element
The SOM element to process
The provider manifest to be used for conversion
The item collection for currently existing metadata objects
The new GlobalItem objects that are created as a result of this conversion
The item resulting from the load
Converts an entity container from SOM to metadata
The SOM element to process
The provider manifest to be used for conversion
The item collection for currently existing metadata objects
The new GlobalItem objects that are created as a result of this conversion
The entity container object resulting from the convert
Converts an entity type from SOM to metadata
This method should only build the internally contained and vertical part of the EntityType (keys, properties, and base types) but not
sideways parts (NavigationProperties) that go between types or we risk trying to access and EntityTypes keys, from the referential constraint,
before the base type, which has the keys, is setup yet.
The SOM element to process
The provider manifest to be used for conversion
The item collection for currently existing metadata objects
The new GlobalItem objects that are created as a result of this conversion
The entity type object resulting from the convert
Converts an complex type from SOM to metadata
The SOM element to process
The provider manifest to be used for conversion
The item collection for currently existing metadata objects
The new GlobalItem objects that are created as a result of this conversion
The complex type object resulting from the convert
Converts an association type from SOM to metadata
The SOM element to process
The provider manifest to be used for conversion
The item collection for currently existing metadata objects
The new GlobalItem objects that are created as a result of this conversion
The association type object resulting from the convert
Initialize the end member if its not initialized already
Converts an entity set from SOM to metadata
The SOM element to process
The provider manifest to be used for conversion
The item collection for currently existing metadata objects
The new GlobalItem objects that are created as a result of this conversion
The entity set object resulting from the convert
Converts an entity set from SOM to metadata
The SOM element to process
The entity set object resulting from the convert
Converts an association set from SOM to metadata
The SOM element to process
The provider manifest to be used for conversion
The item collection for currently existing metadata objects
The new GlobalItem objects that are created as a result of this conversion
The association set object resulting from the convert
Converts a property from SOM to metadata
The SOM element to process
The provider manifest to be used for conversion
The item collection for currently existing metadata objects
The new GlobalItem objects that are created as a result of this conversion
The property object resulting from the convert
Converts a navigation property from SOM to metadata
entity type on which this navigation property was declared
The SOM element to process
The provider manifest to be used for conversion
The item collection for currently existing metadata objects
The new GlobalItem objects that are created as a result of this conversion
The property object resulting from the convert
Converts a function from SOM to metadata
The SOM element to process
The provider manifest to be used for conversion
The item collection for currently existing metadata objects
For function imports, the entity container including the function declaration
The new GlobalItem objects that are created as a result of this conversion
The function object resulting from the convert
Converts SchemaEnumType instance to Metadata EnumType.
SchemaEnumType to be covnerted.
Global item objects where newly created Metadata EnumType will be added.
Converts an SOM Documentation node to a metadata Documentation construct
The SOM element to process
The Documentation object resulting from the convert operation
Converts the ParameterDirection into a ParameterMode
The ParameterDirection to convert
ParameterMode
Apply the facet values
The source TypeUsage
The primitive or enum type of the target
Populate the facets on the TypeUsage object for a property
The property containing the information
The type usage object where to populate facet
Get a primitive type when converting a CSDL schema
The schema type representing the primitive type
The provider manifest for retrieving the store types
Cache containing item collection and type usages to support looking up and generating
metadata types.
Gets type usage for the given type with null facet values. Caches usage to avoid creating
redundant type usages.
Gets collection type usage for the given type with null facet values. Caches usage to avoid creating
redundant type usages.
DataSpace
OSpace indicates the item in the clr space
CSpace indicates the item in the CSpace - edm primitive types +
types defined in csdl
SSpace indicates the item in the SSpace
Mapping between OSpace and CSpace
Mapping between CSpace and SSpace
Return all assemblies loaded in the current AppDomain that are not signed
with the Microsoft Key.
A list of assemblies
This method returns a list of assemblies whose contents depend on whether we
are running in an ASP.NET environment. If we are indeed in a Web/ASP.NET
scenario, we pick up the assemblies that all page compilations need to
reference. If not, then we simply get the list of assemblies referenced by
the entry assembly.
A list of assemblies
if two assemblies have the same full name, we will consider them as the same.
for example,
both of x and y have the full name as "{RES, Version=3.5.0.0, Culture=neutral, PublicKeyToken=null}",
although they are different instances since the ReflectionOnly field in them are different, we sitll
consider them as the same.
This class encapsulates the error information for a generic EDM error.
Constructs a EdmSchemaError object.
The explanation of the error.
Gets the error message.
The error message.
Class for representing a collection of items in Edm space.
constructor that loads the metadata files from the specified xmlReaders
xmlReaders where the CDM schemas are loaded
Paths (URIs)to the CSDL files or resources
Initializes a new instance of the class by using the collection of the XMLReader objects where the conceptual schema definition language (CSDL) files exist.
The collection of the XMLReader objects where the conceptual schema definition language (CSDL) files exist.
Initializes a new instance of the class.
The entity data model.
Initializes a new instance of the class by using the paths where the conceptual schema definition language (CSDL) files exist.
The paths where the conceptual schema definition language (CSDL) files exist.
constructor that loads the metadata files from the specified xmlReaders, and returns the list of errors
encountered during load as the out parameter errors.
xmlReaders where the CDM schemas are loaded
Paths (URIs)to the CSDL files or resources
An out parameter to return the collection of errors encountered while loading
Public constructor that loads the metadata files from the specified XmlReaders, and
returns the list of errors encountered during load as the out parameter 'errors'.
XmlReader objects where the EDM schemas are loaded
Paths (URIs) to the CSDL files or resources
A flag to indicate whether to throw if LoadItems returns errors
Gets canonical versions of InitializerMetadata instances. This avoids repeatedly
compiling delegates for materialization.
Manages user defined function definitions.
Given an InitializerMetadata instance, returns the canonical version of that instance.
This allows us to avoid compiling materialization delegates repeatedly for the same
pattern.
Load stuff from xml readers - this now includes XmlReader instances created over embedded
resources. See the remarks section below for some useful information.
A list of XmlReader instances
whether this is a entity data model or provider data model
provider manifest from which the primitive type definition comes from
item collection to add the item after loading
Load metadata from a SOM schema directly
The SOM schemas to load from
The provider manifest used for loading the type
item collection in which primitive types are present
The newly created items
Returns a collection of the objects.
A ReadOnlyCollection object that represents a collection of the
objects.
Returns a collection of the objects with the specified conceptual model version.
A ReadOnlyCollection object that represents a collection of the
objects.
The conceptual model version.
Given the canonical primitive type, get the mapping primitive type in the given dataspace
canonical primitive type
The mapped scalar type
Generates function definition or returns a cached one.
Guarantees type match of declaration and generated parameters.
Guarantees return type match.
Throws internal error for functions without definition.
Passes thru exceptions occured during definition generation.
Generates function definition or returns a cached one.
Guarantees type match of declaration and generated parameters.
Guarantees return type match.
Throws internal error for functions without definition.
Passes thru exceptions occured during definition generation.
Factory method that creates an .
CSDL artifacts to load. Must not be null.
Paths to CSDL artifacts. Used in error messages. Can be null in which case
the base Uri of the XmlReader will be used as a path.
The collection of errors encountered while loading.
instance if no errors encountered. Otherwise null.
Gets the conceptual model version for this collection.
The conceptual model version for this collection.
conventional oc mapping cache, the locking mechanism is provided by AsssemblyCache
cache for loaded assembly
Please do NOT call this method outside of AssemblyCache. Since AssemblyCache maintain the lock,
this method doesn't provide any locking mechanism.
Please do NOT call this method outside of AssemblyCache. Since AssemblyCache maintain the lock,
this method doesn't provide any locking mechanism.
Class representing Edm error for an inmemory EdmItem
Construct the EdmItemError with an error message
The error message for this validation error
This class encapsulates the error information for a schema error that was encountered.
Constructs a EdmSchemaError object.
The explanation of the error.
The code associated with this error.
The severity of the error.
Constructs a EdmSchemaError object.
The explanation of the error.
The code associated with this error.
The severity of the error.
The exception that caused the error to be filed.
Constructs a EdmSchemaError object.
The explanation of the error.
The code associated with this error.
The severity of the error.
Constructs a EdmSchemaError object.
The explanation of the error.
The code associated with this error.
The severity of the error.
The exception that caused the error to be filed.
Returns the error message.
The error message.
Gets the error code.
The error code.
Gets the severity level of the error.
One of the values. The default is
.
Gets the line number where the error occurred.
The line number where the error occurred.
Gets the column where the error occurred.
The column where the error occurred.
Gets the location of the schema that contains the error. This string also includes the name of the schema at the end.
The location of the schema that contains the error.
Gets the name of the schema that contains the error.
The name of the schema that contains the error.
Gets a string representation of the stack trace at the time the error occurred.
A string representation of the stack trace at the time the error occurred.
Defines the different severities of errors that can occur when validating an Entity Framework model.
A warning that does not prevent the model from being used.
An error that prevents the model from being used.
Class for representing the validator
Validate a collection of items in a batch
A collection of items to validate
List of validation errors that were previously collected by the caller. if it encounters more errors, it adds them to this list of errors
Event hook to perform preprocessing on the validation error before it gets added to a list of errors
The event args for this event
Invoke the event hook Add an error to the list
The list of errors to add to
The new error to add
Allows derived classes to perform additional validation
The item to perform additional validation
A collection of errors
Validate an item object
The item to validate
An error collection for adding validation errors
A dictionary keeping track of items that have been validated
Validate an CollectionType object
The CollectionType object to validate
An error collection for adding validation errors
A dictionary keeping track of items that have been validated
Validate an ComplexType object
The ComplexType object to validate
An error collection for adding validation errors
A dictionary keeping track of items that have been validated
Validate an EdmType object
The EdmType object to validate
An error collection for adding validation errors
A dictionary keeping track of items that have been validated
Validate an EntityType object
The EntityType object to validate
An error collection for adding validation errors
A dictionary keeping track of items that have been validated
Validate an Facet object
The Facet object to validate
An error collection for adding validation errors
A dictionary keeping track of items that have been validated
Validate an MetadataItem object
The MetadataItem object to validate
An error collection for adding validation errors
A dictionary keeping track of items that have been validated
Validate an EdmMember object
The item object to validate
An error collection for adding validation errors
A dictionary keeping track of items that have been validated
Validate an MetadataProperty object
The MetadataProperty object to validate
An error collection for adding validation errors
A dictionary keeping track of items that have been validated
Validate an NavigationProperty object
The NavigationProperty object to validate
An error collection for adding validation errors
A dictionary keeping track of items that have been validated
Validate an GetPrimitiveType object
The GetPrimitiveType object to validate
An error collection for adding validation errors
A dictionary keeping track of items that have been validated
Validate an EdmProperty object
The EdmProperty object to validate
An error collection for adding validation errors
A dictionary keeping track of items that have been validated
Validate an RefType object
The RefType object to validate
An error collection for adding validation errors
A dictionary keeping track of items that have been validated
Validate an SimpleType object
The SimpleType object to validate
An error collection for adding validation errors
A dictionary keeping track of items that have been validated
Validate an StructuralType object
The StructuralType object to validate
An error collection for adding validation errors
A dictionary keeping track of items that have been validated
Validate an TypeUsage object
The TypeUsage object to validate
An error collection for adding validation errors
A dictionary keeping track of items that have been validated
Gets or Sets whether the validator should skip readonly items
Represents a end of a Association Type
Initializes a new instance of the RelationshipEndMember class
Represents the edm member class
Initializes a new instance of EdmMember class
name of the member
type information containing info about member's type and its facet
Returns the name of this member.
The name of this member.
Sets the member to read only mode. Once this is done, there are no changes
that can be done to this class
Change the declaring type without doing fixup in the member collection
Returns the identity of the member
Gets or sets the name of the property. Setting this from a store-space model-convention will change the name of the database
column for this property. In the conceptual model, this should align with the corresponding property from the entity class
and should not be changed.
The name of this member.
Gets the type on which this member is declared.
A object that represents the type on which this member is declared.
Gets the instance of the class that contains both the type of the member and facets for the type.
A object that contains both the type of the member and facets for the type.
Tells whether this member is marked as a Computed member in the EDM definition
Tells whether this member's Store generated pattern is marked as Identity in the EDM definition
Initializes a new instance of RelationshipEndMember
name of the relationship end member
Ref type that this end refers to
The multiplicity of this relationship end
Thrown if name or endRefType arguments is null
Thrown if name argument is empty string
Access the EntityType of the EndMember in an association.
The EntityType of the EndMember in an association.
Gets the operational behavior of this relationship end member.
One of the values. The default is
.
Gets the multiplicity of this relationship end member.
One of the values.
Initializes a new instance of AssociationEndMember
name of the association end member
Ref type that this end refers to
multiplicity of the end
Creates a read-only AssociationEndMember instance.
The name of the association end member.
The reference type for the end.
The multiplicity of the end.
Flag that indicates the delete behavior of the end.
Metadata properties to be associated with the instance.
The newly created AssociationEndMember instance.
The specified name is null or empty.
The specified reference type is null.
Gets the built-in type kind for this .
A object that represents the built-in type kind for this
.
cached dynamic method to set a CLR property value on a CLR instance
Class for representing an Association set
Class for representing a relationship set
Class for representing a entity set
The constructor for constructing the EntitySet with a given name and an entity type
The name of the EntitySet
The db schema
The db table
The provider specific query that should be used to retrieve the EntitySet
The entity type of the entities that this entity set type contains
Thrown if the name or entityType argument is null
Returns the name of the current entity or relationship set.
The name of the current entity or relationship set.
Sets this item to be readonly, once this is set, the item will never be writable again.
Change the entity container without doing fixup in the entity set collection
Gets the built-in type kind for this .
A object that represents the built-in type kind for this
.
Gets the identity for this item as a string
Gets escaped provider specific SQL describing this entity set.
Gets or sets the name of the current entity or relationship set.
If this property is changed from store-space, the mapping layer must also be updated to reflect the new name.
To change the table name of a store space use the Table property.
The name of the current entity or relationship set.
Thrown if the setter is called when EntitySetBase instance is in ReadOnly state
Gets the entity container of the current entity or relationship set.
An object that represents the entity container of the current entity or relationship set.
Thrown if the setter is called when the EntitySetBase instance or the EntityContainer passed into the setter is in ReadOnly state
Gets the entity type of this .
An object that represents the entity type of this
.
Thrown if the setter is called when EntitySetBase instance is in ReadOnly state
Gets or sets the database table name for this entity set.
if value passed into setter is null
Thrown if the setter is called when EntitySetBase instance is in ReadOnly state
Gets or sets the database schema for this entity set.
if value passed into setter is null
Thrown if the setter is called when EntitySetBase instance is in ReadOnly state
The constructor for constructing the RelationshipSet with a given name and an relationship type
The name of the RelationshipSet
The db schema
The db table
The provider specific query that should be used to retrieve the EntitySet
The entity type of the entities that this entity set type contains
Thrown if the argument name or entityType is null
Gets the relationship type of this .
An object that represents the relationship type of this
.
Gets the built-in type kind for this .
A object that represents the built-in type kind for this
.
Initializes a new instance of AssocationSet with the given name and the association type
The name of the Assocation set
The association type of the entities that this associationship set type contains
Sets this item to be readonly, once this is set, the item will never be writable again.
Adds the given end to the collection of ends
Creates a read-only AssociationSet instance from the specified parameters.
The name of the association set.
The association type of the elements in the association set.
The entity set for the source association set end.
The entity set for the target association set end.
Metadata properties to be associated with the instance.
The newly created AssociationSet instance.
The specified name is null or empty.
The specified association type is null.
The entity type of one of the ends of the specified
association type does not match the entity type of the corresponding entity set end.
Gets the association related to this .
An object that represents the association related to this
.
Gets the ends of this .
A collection of type that contains the ends of this
.
Gets the built-in type kind for this .
A object that represents built-in type kind for this
.
Class representing a AssociationSet End
Initializes a new instance of AssocationSetEnd
Entity set that this end refers to
The association set which this belongs to
The end member of the association set which this is an instance of
Thrown if either the role,entitySet, parentSet or endMember arguments are null
Returns the name of the End role for this .
The name of the End role for this .
Sets this item to be readonly, once this is set, the item will never be writable again.
Gets the built-in type kind for this .
A object that represents the built-in type kind for this
.
Gets the parent association set of this .
An object that represents the parent association set of this
.
Thrown if Setter is called when the AssociationSetEnd instance is in ReadOnly state
Gets the End member that this object corresponds to.
An object that represents the End member that this
object corresponds to.
Thrown if Setter is called when the AssociationSetEnd instance is in ReadOnly state
Gets the name of the End for this .
The name of the End for this .
Gets the name of the End role for this .
The name of the End role for this .
Thrown if Setter is called when the AssociationSetEnd instance is in ReadOnly state
Gets the entity set referenced by this End role.
An object that represents the entity set referred by this End role.
Gets the identity of this item
Describes an association/relationship between two entities in the conceptual model or a foreign key relationship
between two tables in the store model. In the conceptual model the dependant class may or may not define a foreign key property.
If a foreign key is defined the property will be true and the property will contain details of the foreign keys
Represents the Relationship type
Represents the Entity Type
Represents the Structural Type
Base EdmType class for all the model types
Initializes a new instance of EdmType
Constructs a new instance of EdmType with the given name, namespace and version
name of the type
namespace of the type
dataSpace in which this type belongs to
Thrown if either the name, namespace or version arguments are null
Initialize the type. This method must be called since for bootstraping we only call the constructor.
This method will help us initialize the type
The edm type to initialize with item attributes
The name of this type
The namespace of this type
dataSpace in which this type belongs to
If the type is abstract
The base type for this type
Returns the full name of this type.
The full name of this type.
Returns an instance of the whose element type is this type.
The object whose element type is this type.
check to see if otherType is among the base types,
if otherType is among the base types, return true, otherwise returns false. when othertype is same as the current type, return false.
check to see if otherType is among the sub-types,
if otherType is among the sub-types, returns true, otherwise returns false. when othertype is same as the current type, return false.
Check if this type is assignable from otherType
Sets this item to be readonly, once this is set, the item will never be writable again.
Returns all facet descriptions associated with this type.
Descriptions for all built-in facets for this type.
Direct accessor for the field Identity. The reason we need to do this is that for derived class,
they want to cache things only when they are readonly. Plus they want to check for null before
updating the value
Returns the identity of the edm type
Gets the name of this type.
The name of this type.
Gets the namespace of this type.
The namespace of this type.
Gets a value indicating whether this type is abstract or not.
true if this type is abstract; otherwise, false.
Thrown if the setter is called on instance that is in ReadOnly state
Gets the base type of this type.
The base type of this type.
Thrown if the setter is called on instance that is in ReadOnly state
Thrown if the value passed in for setter will create a loop in the inheritance chain
Gets the full name of this type.
The full name of this type.
If OSpace, return the CLR Type else null
Thrown if the setter is called on instance that is in ReadOnly state
Internal parameterless constructor for bootstrapping edmtypes
Initializes a new instance of Structural Type with the given members
name of the structural type
namespace of the structural type
dataSpace in which this edmtype belongs to
Thrown if either name, namespace or version arguments are null
Get the declared only members of a particular type
Validates the types and sets the readOnly property to true. Once the type is set to readOnly,
it can never be changed.
Validates a EdmMember object to determine if it can be added to this type's
Members collection. If this method returns without throwing, it is assumed
the member is valid.
The member to validate
Adds a member to this type
The member to add
Adds a member to this type.
The member to add.
Indicates whether the addition is forced, regardless of
whether read-only is set.
Adding a NavigationProperty to an EntityType introduces a circular dependency between
EntityType and AssociationEndMember, which is worked around by calling this method.
This is the case of OneToOneMappingBuilder, in the designer. Must not be used in other context.
Removes a member from this type.
The member to remove.
Gets the list of members on this type.
A collection of type that contains a set of members on this type.
Initializes a new instance of Entity Type
name of the entity type
namespace of the entity type
dataSpace in which this edmtype belongs to
Thrown if either name, namespace or version arguments are null
Adds the specified property to the list of keys for the current entity.
if member argument is null
Thrown if the EntityType has a base type of another EntityTypeBase. In this case KeyMembers should be added to the base type
If the EntityType instance is in ReadOnly state
Makes this property readonly
Checks for each property to be non-null and then adds it to the member collection
members for this type
the membersCollection to which the members should be added
Checks for each key member to be non-null
also check for it to be present in the members collection
and then adds it to the KeyMembers collection.
Throw if the key member is not already in the members
collection. Cannot do much other than that as the
Key members is just an Ienumerable of the names
of the members.
the list of keys (member names) to be added for the given type
Removes the specified key member from the collection.
The key member to remove.
Gets the list of all the key members for the current entity or relationship type.
A object that represents the list of key members for the current entity or relationship type.
Gets the list of all the key properties for this entity type.
The list of all the key properties for this entity type.
Returns the list of the property names that form the key for this entity type
Perf Bug #529294: To cache the list of member names that form the key for the entity type
Initializes a new instance of relationship type
name of the relationship type
namespace of the relationship type
dataSpace in which this edmtype belongs to
Thrown if either name, namespace or version arguments are null
Gets the list of ends for this relationship type.
A collection of type that contains the list of Ends for this relationship type.
Initializes a new instance of Association Type with the given name, namespace, version and ends
name of the association type
namespace of the association type
is this a foreign key (FK) relationship?
dataSpace in which this AssociationType belongs to
Thrown if either the name, namespace or version attributes are null
Validates a EdmMember object to determine if it can be added to this type's
Members collection. If this method returns without throwing, it is assumed
the member is valid.
The member to validate
Thrown if the member is not an AssociationEndMember
Sets this item to be read-only, once this is set, the item will never be writable again.
Add the given referential constraint to the collection of referential constraints
Creates a read-only AssociationType instance from the specified parameters.
The name of the association type.
The namespace of the association type.
Flag that indicates a foreign key (FK) relationship.
The data space for the association type.
The source association end member.
The target association end member.
A referential constraint.
Metadata properties to be associated with the instance.
The newly created AssociationType instance.
The specified name is null or empty.
The specified namespace is null or empty.
Gets the built-in type kind for this .
A object that represents the built-in type kind for this
.
Gets the list of ends for this .
A collection of type that contains the list of ends for this
.
Gets or sets the referential constraint.
The referential constraint.
Gets the list of constraints for this .
A collection of type that contains the list of constraints for this
.
Gets the Boolean property value that specifies whether the column is a foreign key.
A Boolean value that specifies whether the column is a foreign key. If true, the column is a foreign key. If false (default), the column is not a foreign key.
Represents the structure of an . In the conceptual-model this represents the shape and structure
of an entity. In the store model this represents the structure of a table. To change the Schema and Table name use EntitySet.
Initializes a new instance of Entity Type
name of the entity type
namespace of the entity type
dataspace in which the EntityType belongs to
Thrown if either name, namespace or version arguments are null
name of the entity type
namespace of the entity type
dataspace in which the EntityType belongs to
key members for the type
members of the entity type [property and navigational property]
Thrown if either name, namespace or version arguments are null
cached dynamic method to construct a CLR instance
Validates a EdmMember object to determine if it can be added to this type's
Members collection. If this method returns without throwing, it is assumed
the member is valid.
The member to validate
Thrown if the member is not a EdmProperty
Returns a object that references this
.
A object that references this
.
Attempts to get the property name for the assoication between the two given end
names. Note that this property may not exist if a navigation property is defined
in one direction but not in the other.
the relationship for which a nav property is required
the 'from' end of the association
the 'to' end of the association
the property name, or null if none was found
true if a property was found, false otherwise
The factory method for constructing the EntityType object.
The name of the entity type.
The namespace of the entity type.
The dataspace in which the EntityType belongs to.
Name of key members for the type.
Members of the entity type (primitive and navigation properties).
Metadata properties to be associated with the instance.
Thrown if either name, namespace arguments are null.
The newly created EntityType will be read only.
Adds the specified navigation property to the members of this type.
The navigation property is added regardless of the read-only flag.
The navigation property to be added.
Gets the built-in type kind for this .
A object that represents the built-in type kind for this
.
Gets the declared navigation properties associated with the entity type.
The declared navigation properties associated with the entity type.
Gets the navigation properties of this .
A collection of type that contains the list of navigation properties on this
.
Gets the list of declared properties for the entity type.
The declared properties for the entity type.
Gets the collection of declared members for the entity type.
The collection of declared members for the entity type.
Gets the list of properties for this .
A collection of type that contains the list of properties for this
.
cached dynamic method to construct a CLR instance
Initializes a new instance of Complex Type with properties from the type.
The CLR type to construct from
Creates an SHA256 hash of a description of all the metadata relevant to the creation of a proxy type
for this entity type.
Creates a description of all the metadata relevant to the creation of a proxy type
for this entity type.
cached dynamic method to construct a CLR instance
Gets a collision resistent (SHA256) hash of the information used to build
a proxy for this type. This hash is very, very unlikely to be the same for two
proxies generated from the same CLR type but with different metadata, and is
guarenteed to be the same for proxies generated from the same metadata. This
means that when EntityType comparison fails because of metadata eviction,
the hash can be used to determine whether or not a proxy is of the correct type.
Represents an enumeration type that has a reference to the backing CLR type.
Represents an enumeration type.
Class representing a simple type
The default constructor for SimpleType
The constructor for SimpleType. It takes the required information to identify this type.
The name of this type
The namespace name of this type
dataspace in which the simple type belongs to
Thrown if either name, namespace or version arguments are null
A collection of enumeration members for this enumeration type
Underlying type of this enumeration type.
Initializes a new instance of the EnumType class. This default constructor is used for bootstraping
Initializes a new instance of the EnumType class by using the specified ,
and .
The name of this enum type.
The namespace this enum type belongs to.
Underlying type of this enumeration type.
Indicates whether the enum type is defined as flags (i.e. can be treated as a bit field).
DataSpace this enum type lives in. Can be either CSpace or OSpace
Thrown if name or namespace arguments are null
Note that enums live only in CSpace.
Initializes a new instance of the EnumType class from CLR enumeration type.
CLR enumeration type to create EnumType from.
Note that this method expects that the is a valid CLR enum type
whose underlying type is a valid EDM primitive type.
Ideally this constructor should be protected and internal (Family and Assembly modifier) but
C# does not support this. In order to not expose this constructor to everyone internal is the
only option.
Sets this item to be readonly, once this is set, the item will never be writable again.
Adds the specified member to the member collection
Enumeration member to add to the member collection.
Returns the kind of the type
Gets a collection of enumeration members for this enumeration type.
Gets a value indicating whether the enum type is defined as flags (i.e. can be treated as a bit field)
Gets the underlying type for this enumeration type.
Initializes a new instance of ClrEnumType class with properties from the CLR type.
The CLR type to construct from.
CSpace namespace name.
CSpace type name.
Gets the clr type backing this enum type.
Get the full CSpaceTypeName for this enum type.
Specifies the kinds of item attributes in the conceptual model.
An enumeration member indicating that an item attribute is System
An enumeration member indicating that an item attribute is Extended.
List of all the built in types
Association Type Kind
AssociationSetEnd Kind
AssociationSet Kind
Association Type Kind
EntitySetBase Kind
Entity Type Base Kind
Collection Type Kind
Collection Kind
Complex Type Kind
Documentation Kind
DeleteAction Type Kind
Edm Type Kind
Entity Container Kind
Entity Set Kind
Entity Type Kind
Enumeration Type Kind
Enum Member Kind
Facet Kind
EdmFunction Kind
Function Parameter Kind
Global Item Type Kind
Metadata Property Kind
Navigation Property Kind
Metadata Item Type Kind
EdmMember Type Kind
Parameter Mode Kind
Primitive Type Kind
Primitive Type Kind Kind
EdmProperty Type Kind
ProviderManifest Type Kind
Referential Constraint Type Kind
Ref Type Kind
RelationshipEnd Type Kind
Relationship Multiplicity Type Kind
Relationship Set Type Kind
Relationship Type
Row Type Kind
Simple Type Kind
Structural Type Kind
Type Information Kind
Represents the Edm Collection Type
The constructor for constructing a CollectionType object with the element type it contains
The element type that this collection type contains
Thrown if the argument elementType is null
The constructor for constructing a CollectionType object with the element type (as a TypeUsage) it contains
The element type that this collection type contains
Thrown if the argument elementType is null
Constructs the name of the collection type
The typeusage for the element type that this collection type refers to
The identity of the resulting collection type
Override EdmEquals to support value comparison of TypeUsage property
Gets the built-in type kind for this .
A object that represents the built-in type kind for this
.
Gets the instance of the class that contains the type of the element that this current
object includes and facets for that type.
The instance of the class that contains the type of the element that this current
object includes and facets for that type.
Represents the Edm Complex Type. This can be used to configure complex types
from a conceptual-space model-based convention. Complex types are not supported in the store model.
Initializes a new instance of Complex Type with the given properties
The name of the complex type
The namespace name of the type
dataSpace in which this ComplexType belongs to
If either name, namespace or version arguments are null
Initializes a new instance of Complex Type - required for bootstraping code
Validates a EdmMember object to determine if it can be added to this type's
Members collection. If this method returns without throwing, it is assumed
the member is valid.
The member to validate
Thrown if the member is not a EdmProperty
Creates a new instance of the type.
The name of the complex type.
The namespace of the complex type.
The dataspace to which the complex type belongs to.
Members of the complex type.
Metadata properties to be associated with the instance.
Thrown if either name, namespace or members argument is null.
A new instance a the type.
The newly created will be read only.
Gets the built-in type kind for this .
A object that represents the built-in type kind for this
.
Gets the list of properties for this .
A collection of type that contains the list of properties for this
.
cached dynamic method to construct a CLR instance
Initializes a new instance of Complex Type with properties from the type.
The CLR type to construct from
cached dynamic method to construct a CLR instance
Class representing the Documentation associated with an item
Default constructor - primarily created for supporting usage of this Documentation class by SOM.
Returns the summary for this .
The summary for this .
Gets the built-in type kind for this .
A object that represents the built-in type kind for this
.
Gets the summary for this .
The summary for this .
Gets the long description for this .
The long description for this .
This property is required to be implemented for inheriting from MetadataItem. As there can be atmost one
instance of a nested-Documentation, return the constant "Documentation" as it's identity.
Gets a value indicating whether this object contains only a null or an empty
and a
.
true if this object contains only a null or an empty
and a
; otherwise, false.
Used to denote application home directory in a Web/ASP.NET context
Class for representing a function
Adds a parameter to this function.
The parameter to be added.
Sets this item to be readonly, once this is set, the item will never be writable again.
Builds function identity string in the form of "functionName (param1, param2, ... paramN)".
Builds identity based on the functionName and parameter types. All parameters are assumed to be
.
Returns string in the form of "functionName (param1, param2, ... paramN)".
Builds identity based on the functionName and parameters metadata.
Returns string in the form of "functionName (param1, param2, ... paramN)".
The factory method for constructing the object.
The name of the function.
The namespace of the function.
The namespace the function belongs to.
Additional function attributes and properties.
Metadata properties that will be added to the function. Can be null.
A new, read-only instance of the type.
Gets the built-in type kind for this .
One of the enumeration values of the enumeration.
Returns the full name (namespace plus name) of this type.
The full name of the type.
Gets the parameters of this .
A collection of type that contains the parameters of this
.
Returns true if this is a C-space function and it has an eSQL body defined as DefiningExpression.
For function imports, optionally indicates the entity set to which the result is bound.
If the function import has multiple result sets, returns the entity set to which the first result is bound
For function imports, indicates the entity sets to which the return parameters are bound.
The number of elements in the collection matches the number of return parameters.
A null element in the collection indicates that the corresponding are not bound to an entity set.
Gets the return parameter of this .
A object that represents the return parameter of this
.
Gets the return parameters of this .
A collection of type that represents the return parameters of this
.
Gets the store function name attribute of this function.
Gets the parameter type semantics attribute of this function.
Gets the aggregate attribute of this function.
Gets a value indicating whether built in attribute is present on this function.
true if the attribute is present; otherwise, false.
Gets a value indicating whether this instance is from the provider manifest.
true if this instance is from the provider manifest; otherwise, false.
Gets a value indicating whether the is a niladic function (a function that accepts no arguments).
true if the function is niladic; otherwise, false.
Gets whether this instance is mapped to a function or to a stored procedure.
true if this instance is mapped to a function; false if this instance is mapped to a stored procedure.
Gets a query in the language that is used by the database management system or storage model.
A string value in the syntax used by the database management system or storage model that contains the query or update statement of the
.
Gets or sets the schema associated with the function.
The schema associated with the function.
In conceptual-space, EdmProperty represents a property on an Entity.
In store-space, EdmProperty represents a column in a table.
Creates a new primitive property.
The newly created property.
The name of the property.
The type of the property.
Creates a new enum property.
The newly created property.
The name of the property.
The type of the property.
Creates a new complex property.
The newly created property.
The name of the property.
The type of the property.
Creates a new instance of EdmProperty type.
Name of the property.
Property
A new instance of EdmProperty type
Initializes a new instance of the property class
name of the property
TypeUsage object containing the property type and its facets
Thrown if name or typeUsage arguments are null
Thrown if name argument is empty string
Initializes a new OSpace instance of the property class
name of the property
TypeUsage object containing the property type and its facets
for the property
The declaring type of the entity containing the property
cached dynamic method to get the property value from a CLR instance
cached dynamic method to set a CLR property value on a CLR instance
Sets the metadata properties.
The metadata properties to be set.
Gets the built-in type kind for this .
A object that represents the built-in type kind for this
.
Gets a value indicating whether this can have a null value.
Nullability in the conceptual model and store model is a simple indication of whether or not
the property is considered nullable. Nullability in the object model is more complex.
When using convention based mapping (as usually happens with POCO entities), a property in the
object model is considered nullable if and only if the underlying CLR type is nullable and
the property is not part of the primary key.
When using attribute based mapping (usually used with entities that derive from the EntityObject
base class), a property is considered nullable if the IsNullable flag is set to true in the
attribute. This flag can
be set to true even if the underlying type is not nullable, and can be set to false even if the
underlying type is nullable. The latter case happens as part of default code generation when
a non-nullable property in the conceptual model is mapped to a nullable CLR type such as a string.
In such a case, the Entity Framework treats the property as non-nullable even though the CLR would
allow null to be set.
There is no good reason to set a non-nullable CLR type as nullable in the object model and this
should not be done even though the attribute allows it.
true if this can have a null value; otherwise, false.
Thrown if the setter is called when the EdmProperty instance is in ReadOnly state
Gets the type name of the property.
The type name of the property.
Gets the default value for this .
The default value for this .
Thrown if the setter is called when the EdmProperty instance is in ReadOnly state
cached dynamic method to get the property value from a CLR instance
cached dynamic method to set a CLR property value on a CLR instance
Gets whether the property is a collection type property.
true if the property is a collection type property; otherwise, false.
Gets whether this property is a complex type property.
true if this property is a complex type property; otherwise, false.
Gets whether this property is a primitive type.
true if this property is a primitive type; otherwise, false.
Gets whether this property is an enumeration type property.
true if this property is an enumeration type property; otherwise, false.
Gets whether this property is an underlying primitive type.
true if this property is an underlying primitive type; otherwise, false.
Gets the complex type information for this property.
The complex type information for this property.
Gets the primitive type information for this property.
The primitive type information for this property.
Gets the enumeration type information for this property.
The enumeration type information for this property.
Gets the underlying primitive type information for this property.
The underlying primitive type information for this property.
Gets or sets the concurrency mode for the property.
The concurrency mode for the property.
Gets or sets the database generation method for the database column associated with this property
The store generated pattern for the property.
Gets or sets the kind of collection for this model.
The kind of collection for this model.
Gets whether the maximum length facet is constant for the database provider.
true if the facet is constant; otherwise, false.
Gets or sets the maximum length of the property.
The maximum length of the property.
Gets or sets whether this property uses the maximum length supported by the provider.
true if this property uses the maximum length supported by the provider; otherwise, false.
Gets whether the fixed length facet is constant for the database provider.
true if the facet is constant; otherwise, false.
Gets or sets whether the length of this property is fixed.
true if the length of this property is fixed; otherwise, false.
Gets whether the Unicode facet is constant for the database provider.
true if the facet is constant; otherwise, false.
Gets or sets whether this property is a Unicode property.
true if this property is a Unicode property; otherwise, false.
Gets whether the precision facet is constant for the database provider.
true if the facet is constant; otherwise, false.
Gets or sets the precision of this property.
The precision of this property.
Gets whether the scale facet is constant for the database provider.
true if the facet is constant; otherwise, false.
Gets or sets the scale of this property.
The scale of this property.
Class for representing an entity container
The constructor for constructing the EntityContainer object with the name, namespaceName, and version.
The name of this entity container
dataSpace in which this entity container belongs to
Thrown if the name argument is null
Thrown if the name argument is empty string
Sets this item to be readonly, once this is set, the item will never be writable again.
Returns an object by using the specified name for the entity set.
An object that represents the entity set that has the specified name.
The name of the entity set that is searched for.
true to perform the case-insensitive search; otherwise, false.
Returns an object by using the specified name for the entity set.
true if there is an entity set that matches the search criteria; otherwise, false.
The name of the entity set that is searched for.
true to perform the case-insensitive search; otherwise, false.
When this method returns, contains an object. If there is no entity set, this output parameter contains null.
Returns a object by using the specified name for the relationship set.
An object that represents the relationship set that has the specified name.
The name of the relationship set that is searched for.
true to perform the case-insensitive search; otherwise, false.
Returns a object by using the specified name for the relationship set.
true if there is a relationship set that matches the search criteria; otherwise, false.
The name of the relationship set that is searched for.
true to perform the case-insensitive search; otherwise, false.
When this method returns, contains a object.
Returns the name of this .
The name of this .
Removes a specific entity set from the container.
The entity set to remove.
The factory method for constructing the EntityContainer object.
The name of the entity container to be created.
DataSpace in which this entity container belongs to.
Entity sets that will be included in the new container. Can be null.
Functions that will be included in the new container. Can be null.
Metadata properties to be associated with the instance.
Thrown if the name argument is null or empty string.
The newly created EntityContainer will be read only.
Gets the built-in type kind for this .
A object that represents the built-in type kind for this
.
Gets the identity for this item as a string
Gets the name of this .
The name of this .
Gets a list of entity sets and association sets that this
includes.
A object that contains a list of entity sets and association sets that this
includes.
Gets the association sets for this entity container.
The association sets for this entity container .
Gets the entity sets for this entity container.
The entity sets for this entity container .
Specifies a collection of elements. Each function contains the details of a stored procedure that exists in the database or equivalent CommandText that is mapped to an entity and its properties.
A that contains
elements.
Represents a particular usage of a structure defined in EntityType. In the conceptual-model, this represents a set that can
query and persist entities. In the store-model it represents a table.
From a store-space model-convention it can be used to configure
table name with property and table schema with property.
The constructor for constructing the EntitySet with a given name and an entity type
The name of the EntitySet
The db schema
The db table
The provider specific query that should be used to retrieve the EntitySet
The entity type of the entities that this entity set type contains
Thrown if the argument name or entityType is null
The factory method for constructing the EntitySet object.
The name of the EntitySet.
The db schema. Can be null.
The db table. Can be null.
The provider specific query that should be used to retrieve data for this EntitySet. Can be null.
The entity type of the entities that this entity set type contains.
Metadata properties that will be added to the newly created EntitySet. Can be null.
Thrown if the name argument is null or empty string.
The newly created EntitySet will be read only.
Gets the built-in type kind for this .
A object that represents the built-in type kind for this
.
Gets the entity type of this .
An object that represents the entity type of this
.
Returns the associations and constraints where "this" EntitySet particpates as the Principal end.
From the results of this list, you can retrieve the Dependent IRelatedEnds
Returns the associations and constraints where "this" EntitySet particpates as the Dependent end.
From the results of this list, you can retrieve the Principal IRelatedEnds
True if this entity set participates in any foreign key relationships, otherwise false.
True if this entity set participates in any independent relationships, otherwise false.
Class representing a collection of entity set objects
Class representing an actual implementaton of a collection of metadata objects
The type of items in this collection
Default constructor for constructing an empty collection
The constructor for constructing the collection with the given items
The items to populate the collection
Used in the OneToOneMappingBuilder for the designer to workaround the circular
dependency between EntityType and AssociationEndMember created when adding
navigation properties. Must not be used in other context.
Returns the collection as a read-only metadata collection.
Gets an item from the collection with the given identity
The identity of the item to search for
Whether case is ignore in the search
An item from the collection
Thrown if identity argument passed in is null
Thrown if the Collection does not have an item with the given identity
Adds an item to the collection
The item to add to the list
Thrown if item argument is null
Thrown if the item passed in or the collection itself instance is in ReadOnly state
Thrown if the MetadataCollection already contains an item with the same identity
Thrown if the item passed into Setter has null or String.Empty identity
Adds an item to the identityDictionary
The collection data to add to
The identity to add
The identity's index in collection
Whether the item should be updated if a matching item is found.
Index of the added entity, possibly different from the index parameter if updateIfFound is true.
Adds an item to the collection
This method only exists to allow ctor to avoid virtual method call
The item to add to the list
Thrown if item argument is null
Thrown if the item passed in or the collection itself instance is in ReadOnly state
Thrown if the MetadataCollection already contains an item with the same identity
Thrown if the item passed into Setter has null or String.Empty identity
Adds an item to the collection represented by a list and a dictionary
The item to add to the list
The collection data where the item will be added
Whether the item should be updated if a matching item is found.
Thrown if item argument is null
Thrown if the item passed in or the collection itself instance is in ReadOnly state
Thrown if the MetadataCollection already contains an item with the same identity
Thrown if the item passed into Setter has null or String.Empty identity
If updateIfFound is true, then an update is done in-place instead of
having an exception thrown. The in-place aspect is required to avoid
disrupting the indices generated for indexed items, and to enable
foreach loops to be able to modify the enumerated facets as if it
were a property update rather than an instance replacement.
Adds a collection of items to the collection
The items to add to the list
Thrown if item argument is null
Thrown if the item passed in or the collection itself instance is in ReadOnly state
Thrown if the item that is being added already belongs to another ItemCollection
Thrown if the ItemCollection already contains an item with the same identity
Whether the add was successful
Does Item at index have the same identity
Not supported, the collection is treated as read-only.
The index where to insert the given item
The item to be inserted
Thrown if the item passed in or the collection itself instance is in ReadOnly state
Not supported, the collection is treated as read-only.
The item to be removed
True if the item is actually removed, false if the item is not in the list
Always thrown
Not supported, the collection is treated as read-only.
The index at which the item is removed
Always thrown
Not supported, the collection is treated as read-only.
Always thrown
Determines if this collection contains the given item
The item to check for
True if the collection contains the item
Thrown if item argument passed in is null
Thrown if the item passed in has null or String.Empty identity
Determines if this collection contains an item of the given identity
The identity of the item to check for
True if the collection contains the item with the given identity
Thrown if identity argument passed in is null
Thrown if identity argument passed in is empty string
Find the index of an item identitified by identity
The collection data to search in
The identity whose index is to be returned
Should OrdinalIgnoreCase be used?
The index of the found item, -1 if not found
Thrown if ignoreCase and an exact match does not exist, but has multiple inexact matches
Find the index of an item
The item whose index is to be looked for
The index of the found item, -1 if not found
Thrown if item argument passed in is null
Thrown if the item passed in has null or String.Empty identity
Copies the items in this collection to an array
The array to copy to
The index in the array at which to start the copy
Thrown if array argument is null
Thrown if the arrayIndex is less than zero
Thrown if the array argument passed in with respect to the arrayIndex passed in not big enough to hold the MetadataCollection being copied
Gets the enumerator over this collection
Gets the enumerator over this collection
Gets the enumerator over this collection
Set this collection as readonly so no more changes can be made on it
Gets an item from the collection with the given identity
The identity of the item to search for
Whether case is ignore in the search
An item from the collection, null if the item is not found
True an item is retrieved
Thrown if the identity argument is null
Gets an item from the collection with the given identity
The identity of the item to search for
Whether case is ignore in the search
item else null
Throws an appropriate exception if the given item is a readonly, used when an attempt is made to change
the collection
Gets whether the collection is a readonly collection
Returns the collection as a readonly collection
Gets the count on the number of items in the collection
Gets an item from the collection with the given index
The index to search for
An item from the collection
Thrown if the index is out of the range for the Collection
Gets an item from the collection with the given identity
The identity of the item to search for
An item from the collection
Thrown if identity argument passed in is null
Thrown if the Collection does not have an item with the given identity
Always thrown on setter
structure to contain the indexes of items whose identity match by OrdinalIgnoreCase
the index of the item whose identity was used to create the initial dictionary entry
the continuation of indexes whose item identities match by OrdinalIgnoreCase
The data structures for this collection, which contains a list and a dictionary
The IdentityDictionary is a case-insensitive dictionary
used after a certain # of elements have been added to the OrderedList.
It aids in fast lookup by T.Identity by mapping a string value to
an OrderedIndex structure with other case-insensitive matches for the
entry. See additional comments in AddInternal.
Default constructor for constructing an empty collection
The entity container that has this entity set collection
Thrown if the argument entityContainer is null
The constructor for constructing the collection with the given items
The entity container that has this entity set collection
The items to populate the collection
Thrown if the argument entityContainer is null
Adds an item to the collection
The item to add to the list
Thrown if item argument is null
Thrown if the item passed in or the collection itself instance is in ReadOnly state
Thrown if the EntitySetBase that is being added already belongs to another EntityContainer
Thrown if the EntitySetCollection already contains an EntitySet with the same identity
Checks if the given entity set already has a entity container, if so, throw an exception
The entity set to check for
The name of the argument from the caller
Gets an item from the collection with the given index
The index to search for
An item from the collection
Thrown if the index is out of the range for the Collection
Always thrown on setter
Gets an item from the collection with the given identity
The identity of the item to search for
An item from the collection
Thrown if identity argument passed in is null
Thrown if the Collection does not have an EntitySet with the given identity
Always thrown on setter
Represents an enumeration member.
The name of this enumeration member.
The value of this enumeration member.
Initializes a new instance of the type by using the specified name and value.
The name of this enumeration member. Must not be null or the empty string.
The value of this enumeration member.
Thrown if name argument is null
Thrown if name argument is empty string
Overriding System.Object.ToString to provide better String representation for this type.
Gets the kind of this type.
Gets the name of this enumeration member.
Gets the value of this enumeration member.
Gets the identity for this item as a string
Class for representing a Facet object
This object is Immutable (not just set to readonly) and
some parts of the system are depending on that behavior
The constructor for constructing a Facet object with the facet description and a value
The object describing this facet
The value of the facet
Thrown if facetDescription argument is null
Creates a Facet instance with the specified value for the given
facet description.
The object describing this facet
The value of the facet
Thrown if facetDescription argument is null
Creates a Facet instance with the specified value for the given
facet description.
The object describing this facet
The value of the facet
true to bypass caching and known values; false otherwise.
Thrown if facetDescription argument is null
The object describing this facet.
The value assigned to this facet.
Returns the name of this .
The name of this .
Gets the built-in type kind for this .
A object that represents the built-in type kind for this
.
Gets the description of this .
The object that represents the description of this
.
Gets the name of this .
The name of this .
Gets the type of this .
The object that represents the type of this
.
Gets the value of this .
The value of this .
Thrown if the Facet instance is in ReadOnly state
Gets the identity for this item as a string
Gets a value indicating whether the value of the facet is unbounded.
true if the value of the facet is unbounded; otherwise, false.
Class for representing a FacetDescription object
The constructor for constructing a facet description object
The name of this facet
The type of this facet
The min value for this facet
The max value for this facet
The default value for this facet
Thrown if either facetName, facetType or applicableType arguments are null
A facet with the default value for this description.
A facet with a null value for this description.
Type-dependant cache for additional values (possibly null).
Returns the name of this facet.
The name of this facet.
Gets a cached facet instance with the specified boolean value.
Value for the Facet result.
A cached facet instance with the specified boolean value.
Returns true if the facet type is of numeric type
Type of the facet
Gets the name of this facet.
The name of this facet.
Gets the type of this facet.
An object that represents the type of this facet.
Gets the minimum value for this facet.
The minimum value for this facet.
Gets the maximum value for this facet.
The maximum value for this facet.
Gets the default value of a facet with this facet description.
The default value of a facet with this facet description.
Gets a value indicating whether the value of this facet is a constant.
true if this facet is a constant; otherwise, false.
Gets a value indicating whether this facet is a required facet.
true if this facet is a required facet; otherwise, false.
Gets a facet with the default value for this description.
Gets a facet with a null value for this description.
This Class is never expected to be used except for by the FacetValues class.
The purpose of this class is to allow strong type checking by the compiler while setting facet values which
are typically stored as Object because they can either on of these things
1. null
2. scalar type (bool, int, byte)
3. Unbounded object
without this class it would be very easy to accidentally set precision to an int when it really is supposed to be
a byte value. Also you would be able to set the facet value to any Object derived class (ANYTHING!!!) when really only
null and Unbounded are allowed besides an actual scalar value. The magic of the class happens in the implicit constructors with
allow patterns like
new FacetValues( MaxLength = EdmConstants.UnboundedValue, Nullable = true};
and these are type checked at compile time
Class to filter stuff out from a metadata collection
The constructor for constructing a read-only metadata collection to wrap another MetadataCollection.
The metadata collection to wrap
Thrown if collection argument is null
Predicate method which determines membership
Gets an item from the collection with the given identity
The identity of the item to search for
Whether case is ignore in the search
An item from the collection
Thrown if identity argument passed in is null
Thrown if the Collection does not have an item with the given identity
Determines if this collection contains an item of the given identity
The identity of the item to check for
True if the collection contains the item with the given identity
Thrown if identity argument passed in is null
Thrown if identity argument passed in is empty string
Gets an item from the collection with the given identity
The identity of the item to search for
Whether case is ignore in the search
An item from the collection, null if the item is not found
True an item is retrieved
if identity argument is null
Get index of the element passed as the argument
Get index of the element passed as the argument
Gets an item from the collection with the given identity
The identity of the item to search for
An item from the collection
Thrown if identity argument passed in is null
Thrown if setter is called
Class representing a function parameter
The constructor for FunctionParameter taking in a name and a TypeUsage object
The name of this FunctionParameter
The TypeUsage describing the type of this FunctionParameter
Mode of the parameter
Thrown if name or typeUsage arguments are null
Thrown if name argument is empty string
Returns the name of this .
The name of this .
Sets the member to read only mode. Once this is done, there are no changes
that can be done to this class
The factory method for constructing the object.
The name of the parameter.
The EdmType of the parameter.
The of the parameter.
A new, read-only instance of the type.
Gets the built-in type kind for this .
A object that represents the built-in type kind for this
.
Gets the mode of this .
One of the values.
Thrown if the FunctionParameter instance is in ReadOnly state
Returns the identity of the member
Gets the name of this .
The name of this .
Gets the instance of the class that contains both the type of the parameter and facets for the type.
A object that contains both the type of the parameter and facets for the type.
Gets the type name of this parameter.
The type name of this parameter.
Gets whether the max length facet is constant for the database provider.
true if the facet is constant; otherwise, false.
Gets the maximum length of the parameter.
The maximum length of the parameter.
Gets whether the parameter uses the maximum length supported by the database provider.
true if parameter uses the maximum length supported by the database provider; otherwise, false.
Gets whether the precision facet is constant for the database provider.
true if the facet is constant; otherwise, false.
Gets the precision value of the parameter.
The precision value of the parameter.
Gets whether the scale facet is constant for the database provider.
true if the facet is constant; otherwise, false.
Gets the scale value of the parameter.
The scale value of the parameter.
Gets the on which this parameter is declared.
A object that represents the function on which this parameter is declared.
CodeGenerator class: use expression trees to dynamically generate code to get/set properties.
For an OSpace ComplexType returns the delegate to construct the clr instance.
For an OSpace EntityType returns the delegate to construct the clr instance.
for an OSpace property, get the property value from a clr instance
for an OSpace property, set the property value on a clr instance
If
is null for a non nullable property.
Invalid cast of
to property type.
From generated enties via StructuralObject.SetValidValue.
For an OSpace property, gets the delegate to set the property value on a clr instance.
Gets the related end instance for the source AssociationEndMember by creating a DynamicMethod to
call GetRelatedCollection or GetRelatedReference
Gets a parameterless constructor for the specified type.
Type to get constructor for.
Parameterless constructor for the specified type.
Gets a new expression that uses the parameterless constructor for the specified collection type.
For HashSet{T} will use ObjectReferenceEqualityComparer.
Type to get constructor for.
Parameterless constructor for the specified type.
generate a delegate equivalent to
private object Constructor() { return new XClass(); }
generate a delegate equivalent to
private object MemberGetter(object target) { return target.PropertyX; }
or if the property is Nullable<> generate a delegate equivalent to
private object MemberGetter(object target) { Nullable<X> y = target.PropertyX; return ((y.HasValue) ? y.Value : null); }
generate a delegate equivalent to
// if Property is Nullable value type
private void MemberSetter(object target, object value) {
if (AllowNull && (null == value)) {
((TargetType)target).PropertyName = default(PropertyType?);
return;
}
if (value is PropertyType) {
((TargetType)target).PropertyName = new (PropertyType?)((PropertyType)value);
return;
}
ThrowInvalidValue(value, TargetType.Name, PropertyName);
return
}
// when PropertyType is a value type
private void MemberSetter(object target, object value) {
if (value is PropertyType) {
((TargetType)target).PropertyName = (PropertyType)value;
return;
}
ThrowInvalidValue(value, TargetType.Name, PropertyName);
return
}
// when PropertyType is a reference type
private void MemberSetter(object target, object value) {
if ((AllowNull && (null == value)) || (value is PropertyType)) {
((TargetType)target).PropertyName = ((PropertyType)value);
return;
}
ThrowInvalidValue(value, TargetType.Name, PropertyName);
return
}
If the method is missing or static or has indexed parameters.
Or if the declaring type is a value type.
Or if the parameter type is a pointer.
Create delegate used to invoke either the GetRelatedReference or GetRelatedCollection generic method on the RelationshipManager.
source end of the relationship for the requested navigation
target end of the relationship for the requested navigation
Delegate that can be used to invoke the corresponding method.
Class representing a collection of member objects
Default constructor for constructing an empty collection
The type that has this member collection
Thrown if the declaring type is null
The constructor for constructing the collection with the given items
The type that has this member collection
The items to populate the collection
Thrown if the declaring type is null
Adds an item to the collection
The item to add to the list
Thrown if member argument is null
Thrown if the member passed in or the collection itself instance is in ReadOnly state
Thrown if the member that is being added already belongs to another MemberCollection
Thrown if the MemberCollection already contains a member with the same identity
Determines if this collection contains an item of the given identity
The identity of the item to check for
True if the collection contains the item with the given identity
Find the index of an item
The item whose index is to be looked for
The index of the found item, -1 if not found
Copies the items in this collection to an array
The array to copy to
The index in the array at which to start the copy
Thrown if array argument is null
Thrown if the arrayIndex is less than zero
Thrown if the array argument passed in with respect to the arrayIndex passed in not big enough to hold the MemberCollection being copied
Gets an item from the collection with the given identity
The identity of the item to search for
Whether case is ignore in the search
An item from the collection, null if the item is not found
True an item is retrieved
if identity argument is null
Gets an itme with identity
Get the declared only members of a particular type
Get the number of members the base type has. If the base type is not a structural type or has no
members, it returns 0
The number of members in the base type
Gets the index relative to this collection for the given index. For an index to really refers to something in
the base type, the return value is negative relative to this collection. For an index refers to something in this
collection, the return value is positive. In both cases, it's simply (index) - (base type member count)
The relative index
Returns the collection as a readonly collection
Gets the count on the number of items in the collection
Gets an item from the collection with the given index
The index to search for
An item from the collection
Thrown if the index is out of the range for the Collection
Always thrown on setter
Gets an item from the collection with the given identity
The identity of the item to search for
An item from the collection
Thrown if identity argument passed in is null
Thrown if the Collection does not have an item with the given identity
Always thrown on setter
Class representing a metadata attribute for an item
The constructor for MetadataProperty taking in a name, a TypeUsage object, and a value for the attribute
The name of this MetadataProperty
The TypeUsage describing the type of this MetadataProperty
The value for this attribute
Thrown if typeUsage argument is null
The constructor for MetadataProperty taking in all the ingredients for creating TypeUsage and the actual value
The name of the attribute
The edm type of the attribute
Whether the collection type of the given edm type should be used
The value of the attribute
Sets this item to be readonly, once this is set, the item will never be writable again.
The factory method for constructing the MetadataProperty object.
The name of the metadata property.
The type usage of the metadata property.
The value of the metadata property.
Thrown is null.
The newly created MetadataProperty will be read only.
Gets the built-in type kind for this .
A object that represents the built-in type kind for this
.
Gets the identity of this item
Gets the name of this .
The name of this .
Gets the value of this .
The value of this .
Thrown if the MetadataProperty instance is in readonly state
Gets the instance of the class that contains both the type of this
and facets for the type.
A object that contains both the type of this
and facets for the type.
Thrown if the MetadataProperty instance is in readonly state
Gets the value of this .
The value of this .
Attribute used to mark up properties that should appear in the MetadataItem.MetadataProperties collection
Initializes a new attribute with built in type kind
Built in type setting Type property
Sets IsCollectionType property
Initializes a new attribute with primitive type kind
Primitive type setting Type property
Sets IsCollectionType property
Initialize a new attribute with complex type kind (corresponding the the CLR type)
CLR type setting Type property
Sets IsCollectionType property
Initialize a new attribute
Sets Type property
Sets IsCollectionType property
Gets EDM type for values stored in property.
Gets bool indicating whether this is a collection type.
Metadata collection class supporting delay-loading of system item attributes and
extended attributes.
Constructor taking item.
Item with which the collection is associated.
Encapsulates information about system item attributes for a particular item type.
Retrieves system attribute information for the given type.
Requires: type must derive from MetadataItem
Type
Encapsulates information about a CLR property of an item class.
Initialize information.
Requires: attribute must belong to the given property.
Property referenced.
Attribute for the property.
Given an item, returns an instance of the item attribute described by this class.
Item from which to retrieve attribute.
Item attribute.
Class representing a metadata property on an item. Supports
redirection from MetadataProperty instance to item property value.
Represent the edm navigation property class
Initializes a new instance of the navigation property class
name of the navigation property
TypeUsage object containing the navigation property type and its facets
Thrown if name or typeUsage arguments are null
Thrown if name argument is empty string
cached dynamic methods to access the property values from a CLR instance
Where the given navigation property is on the dependent end of a referential constraint,
returns the foreign key properties. Otherwise, returns an empty set. We will return the members in the order
of the principal end key properties.
A collection of the foreign key properties.
Creates a NavigationProperty instance from the specified parameters.
The name of the navigation property.
Specifies the navigation property type and its facets.
The relationship type for the navigation.
The source end member in the navigation.
The target end member in the navigation.
The newly created NavigationProperty instance.
Gets the built-in type kind for this .
A object that represents the built-in type kind for this
.
Gets the relationship type that this navigation property operates on.
The relationship type that this navigation property operates on.
Thrown if the NavigationProperty instance is in ReadOnly state
Gets the "to" relationship end member of this navigation.
The "to" relationship end member of this navigation.
Thrown if the NavigationProperty instance is in ReadOnly state
Gets the "from" relationship end member in this navigation.
The "from" relationship end member in this navigation.
Thrown if the NavigationProperty instance is in ReadOnly state
Cached dynamic method to get the property value from a CLR instance
cached dynamic method to get the property value from a CLR instance
cached dynamic method to set the property value from a CLR instance
Represents the list of possible actions for delete operation
no action
Cascade to other ends
The enumeration defining the mode of a parameter
In parameter
Out parameter
Both in and out parameter
Return Parameter
Class representing a primitive type
Initializes a new instance of PrimitiveType
The constructor for PrimitiveType. It takes the required information to identify this type.
The name of this type
The namespace name of this type
dataSpace in which this primitive type belongs to
The primitive type that this type is derived from
The ProviderManifest of the provider of this type
Thrown if name, namespaceName, version, baseType or providerManifest arguments are null
The constructor for PrimitiveType, it takes in a CLR type containing the identity information
The CLR type object for this primitive type
The base type for this primitive type
The ProviderManifest of the provider of this type
Perform initialization that's common across all constructors
The primitive type to initialize
The primitive type kind of this primitive type
The ProviderManifest of the provider of this type
Returns the equivalent of this
.
For example if this instance is nvarchar and it's
base type is Edm String then the return type is Edm String.
If the type is actually already a model type then the
return type is "this".
An object that is an equivalent of this
.
Returns the list of primitive types.
A collection of type that contains the list of primitive types.
Returns the equivalent of a
.
An object that is an equivalent of a specified
.
A value of type .
Gets the built-in type kind for this .
A object that represents the built-in type kind for this
.
Gets a enumeration value that indicates a primitive type of this
.
A enumeration value that indicates a primitive type of this
.
Returns the ProviderManifest giving access to the Manifest that this type came from
The types ProviderManifest value
Gets the list of facet descriptions for this .
A collection of type that contains the list of facet descriptions for this
.
Returns an equivalent common language runtime (CLR) type of this
. Note that the
property always returns a non-nullable type value.
A object that represents an equivalent common language runtime (CLR) type of this
.
Primitive Types as defined by EDM
Binary Type Kind
Boolean Type Kind
Byte Type Kind
DateTime Type Kind
Decimal Type Kind
Double Type Kind
Guid Type Kind
Single Type Kind
SByte Type Kind
Int16 Type Kind
Int32 Type Kind
Int64 Type Kind
String Type Kind
Time Type Kind
DateTimeOffset Type Kind
Geometry Type Kind
Geography Type Kind
Geometric point type kind
Geometric linestring type kind
Geometric polygon type kind
Geometric multi-point type kind
Geometric multi-linestring type kind
Geometric multi-polygon type kind
Geometric collection type kind
Geographic point type kind
Geographic linestring type kind
Geographic polygon type kind
Geographic multi-point type kind
Geographic multi-linestring type kind
Geographic multi-polygon type kind
Geographic collection type kind
A private constructor to prevent other places from instantiating this class
Returns the primitive type corresponding to the given CLR type
The CLR type for which the PrimitiveType object is retrieved
The retrieved primitive type
True if a primitive type is returned
Returns the corresponding to the given CLR type
The CLR type for which the PrimitiveTypeKind value should be resolved
The PrimitiveTypeKind value to which the CLR type resolves, if any.
True if the CLR type represents a primitive (EDM) type; otherwise false.
Returns all the functions in this provider manifest
A collection of functions
Returns all the FacetDescriptions for a particular type
the type to return FacetDescriptions for.
The FacetDescriptions for the type given.
Initializes all the primitive types
Initialize the primitive type with the given
The CLR type of this type
The primitive type kind of the primitive type
Providers should override this to return information specific to their provider.
This method should never return null.
The name of the information to be retrieved.
An XmlReader at the begining of the information requested.
Gets the EDM provider manifest singleton instance
Returns the namespace used by this provider manifest
The ConcurrencyMode Facet Name
The StoreGeneratedPattern Facet Name
A private constructor to prevent other places from instantiating this class
Returns the list of all the canonical functions
Returns all the FacetDescriptions for a particular type
the type to return FacetDescriptions for.
The FacetDescriptions for the type given.
Returns a primitive type from this manifest having the specified primitive type kind
The value specifying the kind of primitive type to return
A primitive type having the given primitive type kind
Boostrapping all the primitive types for the EDM Provider Manifest
Initialize all the primitive type with the given primitive type kind and name
The primitive type to initialize
Type of the primitive type which is getting initialized
name of the built in type
the CLR Type of that maps to the EDM PrimitiveType
Boostrapping all the facet descriptions for the EDM Provider Manifest
Boostrapping all the canonical functions for the EDM Provider Manifest
Returns the list of super-types for the given primitiveType
Initializes Promotion Type relation
Initializes Canonical Model Types
Returns all the primitive types supported by the provider manifest
A collection of primitive types
Providers should override this to return information specific to their provider.
This method should never return null.
The name of the information to be retrieved.
An XmlReader at the begining of the information requested.
Gets the EDM provider manifest singleton instance
Returns the namespace used by this provider manifest
Store version hint
This class represents a referential constraint between two entities specifying the "to" and "from" ends of the relationship.
Constructs a new constraint on the relationship
role from which the relationship originates
role to which the relationship is linked/targeted to
properties on entity type of to role which take part in the constraint
properties on entity type of from role which take part in the constraint
Argument Null exception if any of the arguments is null
Returns the combination of the names of the
and the
.
The combination of the names of the
and the
.
Sets this item to be read-only, once this is set, the item will never be writable again.
Gets the built-in type kind for this .
A object that represents the built-in type kind for this
.
Returns the identity for this constraint
Gets the "from role" that takes part in this
.
A object that represents the "from role" that takes part in this
.
Thrown if value passed into setter is null
Thrown if the ReferentialConstraint instance is in ReadOnly state
Gets the "to role" that takes part in this .
A object that represents the "to role" that takes part in this
.
Thrown if value passed into setter is null
Thrown if the ReferentialConstraint instance is in ReadOnly state
Gets the list of properties for the "from role" on which this
is defined.
A collection of type that contains the list of properties for "from role" on which this
is defined.
Gets the list of properties for the "to role" on which this
is defined.
A collection of type that contains the list of properties for the "to role" on which this
is defined.
Class representing a ref type
The constructor for constructing a RefType object with the entity type it references
The entity type that this ref type references
Thrown if entityType argument is null
Constructs the name of the collection type
The entity type base that this ref type refers to
The identity of the resulting ref type
Gets the built-in type kind for this .
A object that represents the built-in type kind for this
.
Gets the entity type referenced by this .
An object that represents the entity type referenced by this
.
Represents the multiplicity information about the end of a relationship type
Lower Bound is Zero and Upper Bound is One
Both lower bound and upper bound is one
Lower bound is zero and upper bound is null
Represents the Edm Row Type
Initializes a new instance of RowType class with the given list of members
properties for this row type
Thrown if any individual property in the passed in properties argument is null
Initializes a RowType with the given members and initializer metadata
Adds a property
The property to add
Validates a EdmMember object to determine if it can be added to this type's
Members collection. If this method returns without throwing, it is assumed
the member is valid.
The member to validate
Thrown if the member is not a EdmProperty
Calculates the row type identity that would result from
a given set of properties.
The properties that determine the row type's structure
Metadata describing materialization of this row type
A string that identifies the row type
EdmEquals override verifying the equivalence of all members and their type usages.
The factory method for constructing the object.
Properties of the row type object.
Metadata properties that will be added to the function. Can be null.
A new, read-only instance of the object.
Gets LINQ initializer Metadata for this row type. If there is no associated
initializer type, value is null.
Gets the built-in type kind for this .
A object that represents the built-in type kind for this
.
Gets the list of properties on this .
A collection of type that contains the list of properties on this
.
Gets a collection of the properties defined by the current type.
A collection of the properties defined by the current type.
This class attempts to make a double linked connection between a parent and child without
exposing the properties publicly that would allow them to be mutable and possibly dangerous
in a multithreading environment
Class representing a type information for an item
The constructor for TypeUsage taking in a type
The type which the TypeUsage object describes
Thrown if edmType argument is null
The constructor for TypeUsage taking in a type and a collection of facets
The type which the TypeUsage object describes
The replacement collection of facets
Thrown if edmType argument is null
Factory method for creating a TypeUsage with specified EdmType
EdmType for which to create a type usage
new TypeUsage instance with default facet values
Factory method for creating a TypeUsage with specified EdmType
EdmType for which to create a type usage
new TypeUsage instance with default facet values
Factory method for creating a TypeUsage with specified EdmType and facets
EdmType for which to create a type usage
facets to be copied into the new TypeUsage
new TypeUsage instance
Creates a object with the specified conceptual model type.
A object with the default facet values for the specified
.
A for which the
object is created.
Creates a object to describe a string type by using the specified facet values.
A object describing a string type by using the specified facet values.
A for which the
object is created.
true to set the character-encoding standard of the string type to Unicode; otherwise, false.
true to set the character-encoding standard of the string type to Unicode; otherwise, false.
true to set the length of the string type to fixed; otherwise, false.
Creates a object to describe a string type by using the specified facet values and unbounded MaxLength.
A object describing a string type by using the specified facet values and unbounded MaxLength.
A for which the
object is created.
true to set the character-encoding standard of the string type to Unicode; otherwise, false.
true to set the length of the string type to fixed; otherwise, false
Creates a object to describe a binary type by using the specified facet values.
A object describing a binary type by using the specified facet values.
A for which the
object is created.
true to set the length of the binary type to fixed; otherwise, false.
The maximum length of the binary type.
Creates a object to describe a binary type by using the specified facet values.
A object describing a binary type by using the specified facet values.
A for which the
object is created.
true to set the length of the binary type to fixed; otherwise, false.
Creates a object of the type that the parameters describe.
A object.
The simple type that defines the units of measurement of the DateTime object.
The degree of granularity of the DateTimeOffset in fractions of a second, based on the number of decimal places supported. For example a precision of 3 means the granularity supported is milliseconds.
Creates a object of the type that the parameters describe.
A object.
The simple type that defines the units of measurement of the offset.
The degree of granularity of the DateTimeOffset in fractions of a second, based on the number of decimal places supported. For example a precision of 3 means the granularity supported is milliseconds.
Creates a object of the type that the parameters describe.
A object.
The simple type that defines the units of measurement of the DateTime object.
The degree of granularity of the DateTimeOffset in fractions of a second, based on the number of decimal places supported. For example a precision of 3 means the granularity supported is milliseconds.
Creates a object to describe a decimal type by using the specified facet values.
A object describing a decimal type by using the specified facet values.
A for which the
object is created.
The precision of the decimal type as type .
The scale of the decimal type as type .
Creates a object to describe a decimal type with unbounded precision and scale facet values.
A object describing a decimal type with unbounded precision and scale facet values.
A for which the
object is created.
Set of facets that should be included in identity for TypeUsage
keep this sorted for binary searching
Checks whether this is a subtype of the specified
.
true if this is a subtype of the specified
; otherwise, false.
The object to be checked.
Returns the full name of the type described by this .
The full name of the type described by this as string.
EdmEquals override verifying the equivalence of all facets. Two facets are considered
equal if they have the same name and the same value (Object.Equals)
Gets the built-in type kind for this .
A object that represents the built-in type kind for this
.
Gets the type information described by this .
An object that represents the type information described by this
.
Gets the list of facets for the type that is described by this
.
A collection of type that contains the list of facets for the type that is described by this
.
Returns a Model type usage for a provider type
Model (CSpace) type usage
returns the identity of the type usage
Class holding utility functions for metadata
Throws an appropriate exception if the given item is a readonly, used when an attempt is made to change
a property
The item whose readonly is being tested
Check to make sure the given item do have identity
The item to check for valid identity
The name of the argument
Retrieves a mapping to CLR type for the given EDM type. Assumes the MetadataWorkspace has no
Helper Class for EDM Metadata - this class contains all the helper methods
which only accesses public methods/properties. The other partial class contains all
helper methods which just uses internal methods/properties. The reason why we
did this for allowing view gen to happen at compile time - all the helper
methods that view gen or mapping uses are in this class. Rest of the
methods are in this class
Helper Class for EDM Metadata - this class contains all the helper methods
which needs access to internal methods. The other partial class contains all
helper methods which just uses public methods/properties. The reason why we
did this for allowing view gen to happen at compile time - all the helper
methods that view gen or mapping uses are in the other helper class. Rest of the
methods are in this class
The method wraps the GetAttribute method on XPathNavigator.
The problem with using the method directly is that the
Get Attribute method does not differentiate the absence of an attribute and
having an attribute with Empty string value. In both cases the value returned is an empty string.
So in case of optional attributes, it becomes hard to distinguish the case whether the
xml contains the attribute with empty string or doesn't contain the attribute
This method will return null if the attribute is not present and otherwise will return the
attribute value.
name of the attribute
The method returns typed attribute value of the specified xml attribute.
The method does not do any specific casting but uses the methods on XPathNavigator.
Searches for Facet Description with the name specified.
Collection of facet description
name of the facet
Creates a single comma delimited string given a list of strings
Performance of Enum.ToString() is slow and we use this value in building Identity
Performance of Enum.ToString() is slow and we use this value in building Identity
Verifies whether the given is a valid underlying type for an enumeration type.
to verifiy.
true if the is a valid underlying type for an enumeration type. Otherwise false .
Verifies whether a value of a member of an enumeration type is in range according to underlying type of the enumeration type.
Underlying type of the enumeration type.
Value to check.
true if the is in range of the . false otherwise.
Checks whether the is enum type and if this is the case returns its underlying type. Otherwise
returns after casting it to PrimitiveType.
Type to convert to primitive type.
Underlying type if is enumeration type. Otherwise itself.
This method should be called only for primitive or enumeration types.
Returns underlying EDM type of a given enum .
Enum type whose underlying EDM type needs to be returned. Must not be null.
The underlying EDM type of a given enum .
Returns the single error message from the list of errors
Returns the single error message from the list of errors
Returns a model (C-Space) typeusage for the given typeusage. if the type is already in c-space, it returns
the given typeusage. The typeUsage returned is created by invoking the provider service to map from provider
specific type to model type.
typeusage
the respective Model (C-Space) typeusage
Returns a model (C-Space) typeusage for the given member typeusage. if the type is already in c-space, it returns
the given typeusage. The typeUsage returned is created by invoking the provider service to map from provider
specific type to model type.
EdmMember
the respective Model (C-Space) typeusage
Checks if the edm type in the cspace type usage maps to some sspace type (called it S1). If S1 is equivalent or
promotable to the store type in sspace type usage, then it creates a new type usage with S1 and copies all facets
if necessary
Edm property containing the cspace member type information
edm property containing the sspace member type information
Validates whether cspace and sspace types are compatible.
Type in C-Space. Must be a primitive or enumeration type.
C-Space equivalent of S-space Type. Must be a primitive type.
true if the types are compatible. false otherwise.
This methods validate whether cspace and sspace types are compatible. The types are
compatible if:
both are primitive and the cspace type is a subtype of sspace type
or
cspace type is an enumeration type whose underlying type is a subtype of sspace type.
Helps answer mapping questions since we don't have a good API for mapping information
Returns all mapping fragments for the given entity set's types and their parent types.
Returns mappings for the given set/type only if the mapping applies also to childEntittyType either via IsTypeOf or explicitly specifying multiple types in mapping fragments.
This is the base class for the resource metadata artifact loader; derived
classes encapsulate a single resource as well as collections of resources,
along the lines of the Composite pattern.
Factory method to create an artifact loader. This is where an appropriate
subclass of MetadataArtifactLoader is created, depending on the kind of
resource it will encapsulate.
The path to the resource(s) to be loaded
Any URI extension checks to perform
A specific extension for an artifact resource
The global registry of URIs
A concrete instance of an artifact loader.
Factory method to create an aggregating artifact loader, one that encapsulates
multiple collections.
The list of collections to be aggregated
A concrete instance of an artifact loader.
Helper method that wraps a list of file paths in MetadataArtifactLoader instances.
The list of file paths to wrap
An acceptable extension for the file
An instance of MetadataArtifactLoader
Helper method that wraps a collection of XmlReader objects in MetadataArtifactLoader
instances.
The collection of XmlReader objects to wrap
An instance of MetadataArtifactLoader
If the path doesn't have the right extension, throw
The path to the resource
Get paths to all artifacts, in the original, unexpanded form
A List of strings identifying paths to all resources
Get paths to artifacts for a specific DataSpace, in the original, unexpanded
form
The DataSpace for the artifacts of interest
A List of strings identifying paths to all artifacts for a specific DataSpace
Get paths to all artifacts
A List of strings identifying paths to all resources
Get paths to artifacts for a specific DataSpace.
The DataSpace for the artifacts of interest
A List of strings identifying paths to all artifacts for a specific DataSpace
Get XmlReaders for all resources
A List of XmlReaders for all resources
Get XmlReaders for a specific DataSpace.
The DataSpace for the artifacts of interest
A List of XmlReader object
Helper method to determine whether a given path to a resource
starts with the "res://" prefix.
The resource path to test.
true if the path represents a resource location
Helper method to determine whether a resource identifies a C-Space
artifact.
The resource path
true if the resource identifies a C-Space artifact
Helper method to determine whether a resource identifies an S-Space
artifact.
The resource path
true if the resource identifies an S-Space artifact
Helper method to determine whether a resource identifies a CS-Space
artifact.
The resource path
true if the resource identifies a CS-Space artifact
Helper method to determine whether a resource identifies a valid artifact.
The resource path
true if the resource identifies a valid artifact
This helper method accepts a resource URI and a value from the DataSpace enum
and determines whether the resource identifies an artifact of that DataSpace.
A URI to an artifact resource
A DataSpace enum value
true if the resource identifies an artifact of the specified DataSpace
Normalize a file path:
1. Add backslashes if given a drive letter.
2. Resolve the '~' macro in a Web/ASP.NET environment.
3. Expand the |DataDirectory| macro, if found in the argument.
4. Convert relative paths into absolute paths.
the path to normalize
The normalized file path
Read-only access to the resource/file path
This enum is used to indicate the level of extension check to be perfoemed
on a metadata URI.
Do not perform any extension check
Check the extension against a specific value
Check the extension against the set of acceptable extensions
This class represents a super-collection (a collection of collections)
of artifact resources. Typically, this "meta-collection" would contain
artifacts represented as individual files, directories (which are in
turn collections of files), and embedded resources.
This is the root class for access to all loader objects.
The list of loaders aggregated by the composite.
Constructor - loads all resources into the _children collection
A list of collections to aggregate
Get the list of paths to all artifacts in the original, unexpanded form
A List of strings identifying paths to all resources
Get paths to artifacts for a specific DataSpace, in the original, unexpanded
form
The DataSpace for the artifacts of interest
A List of strings identifying paths to all artifacts for a specific DataSpace
Get paths to artifacts for a specific DataSpace.
The DataSpace for the artifacts of interest
A List of strings identifying paths to all artifacts for a specific DataSpace
Get paths to all artifacts
A List of strings identifying paths to all resources
Aggregates all resource streams from the _children collection
A List of XmlReader objects; cannot be null
Get XmlReaders for a specific DataSpace.
The DataSpace corresponding to the requested artifacts
A List of XmlReader objects
This class represents a collection of artifact files to be loaded from one
filesystem folder.
Constructor - loads all resources into the _children collection
The path to the (collection of) resources
The global registry of URIs
Load all the collections at once so we have a "fairly" matched in time set of files
otherwise we may end up loading the csdl files, and then not loading the ssdl, and msl
files for sometime later.
Get paths to artifacts for a specific DataSpace, in the original, unexpanded
form.
A filesystem folder can contain any kind of artifact, so we simply
ignore the parameter and return the original path to the folder.
The DataSpace for the artifacts of interest
A List of strings identifying paths to all artifacts for a specific DataSpace
Get paths to artifacts for a specific DataSpace.
The DataSpace for the artifacts of interest
A List of strings identifying paths to all artifacts for a specific DataSpace
Get paths to all artifacts
A List of strings identifying paths to all resources
Aggregates all resource streams from the _children collection
A List of XmlReader objects; cannot be null
Get XmlReaders for a specific DataSpace.
The DataSpace corresponding to the requested artifacts
A List of XmlReader objects
This class represents a collection of resources to be loaded from one
or more assemblies.
The list of metadata artifacts encapsulated by the composite.
This constructor expects to get the paths that have potential to turn into multiple
artifacts like
res://*/foo.csdl -- could be multiple assemblies
res://MyAssembly/ -- could be multiple artifacts in the one assembly
The path to the (collection of) resources
The global registry of URIs
Get paths to artifacts for a specific DataSpace, in the original, unexpanded
form.
An assembly can embed any kind of artifact as a resource, so we simply
ignore the parameter and return the original assembly name in the URI.
The DataSpace for the artifacts of interest
A List of strings identifying paths to all artifacts for a specific DataSpace
Get paths to artifacts for a specific DataSpace.
The DataSpace for the artifacts of interest
A List of strings identifying paths to all artifacts for a specific DataSpace
Get paths to all artifacts
A List of strings identifying paths to all resources
Aggregates all resource streams from the _children collection
A List of XmlReader objects; cannot be null
Get XmlReaders for a specific DataSpace.
The DataSpace corresponding to the requested artifacts
A List of XmlReader objects
Load all resources from the assembly/assemblies identified in the resource path.
The global registry of URIs
Load all resources from a specific assembly.
The full name identifying the assembly to load resources from
delegate for resolve the assembly
Splits the supplied path into the assembly portion and the resource
part (if any)
The resource path to parse
This class represents one file-based artifact item to be loaded.
This member indicates whether the file-based artifact has already been loaded.
It is used to prevent other instances of this class from (re)loading the same
artifact. See comment in the MetadataArtifactLoaderFile c'tor below.
Constructor
The path to the resource to load
The global registry of URIs
Implementation of IComparable.CompareTo()
The object to compare to
0 if the loaders are "equal" (i.e., have the same _path value)
Equals() returns true if the objects have the same _path value
The object to compare to
true if the objects have the same _path value
GetHashCode override that defers the result to the _path member variable.
Get paths to artifacts for a specific DataSpace.
The DataSpace for the artifacts of interest
A List of strings identifying paths to all artifacts for a specific DataSpace
Get paths to all artifacts
A List of strings identifying paths to all resources
Create and return an XmlReader around the file represented by this instance.
A List of XmlReaders for all resources
Create and return an XmlReader around the file represented by this instance
if it is of the requested DataSpace type.
The DataSpace corresponding to the requested artifacts
A List of XmlReader objects
Create an XmlReader around the artifact file
An XmlReader that wraps a file
This class represents one resource item to be loaded from an assembly.
Constructor - loads the resource stream
The global registry of URIs
Implementation of IComparable.CompareTo()
The object to compare to
0 if the loaders are "equal" (i.e., have the same _path value)
Equals() returns true if the objects have the same _path value
The object to compare to
true if the objects have the same _path value
GetHashCode override that defers the result to the _path member variable.
Get paths to artifacts for a specific DataSpace.
The DataSpace for the artifacts of interest
A List of strings identifying paths to all artifacts for a specific DataSpace
Get paths to all artifacts
A List of strings identifying paths to all resources
Create and return an XmlReader around the resource represented by this instance.
A List of XmlReaders for all resources
Create and return an XmlReader around the resource represented by this instance
if it is of the requested DataSpace type.
The DataSpace corresponding to the requested artifacts
A List of XmlReader objects
This method parses the path to the resource and attempts to load it.
The method also accounts for the wildcard assembly name.
This class represents a wrapper around an XmlReader to be used to load metadata.
Note that the XmlReader object isn't created here -- the wrapper simply stores
a reference to it -- therefore we do not Close() the reader when we Dispose()
the wrapper, i.e., Dispose() is a no-op.
Constructor - saves off the XmlReader in a private data field
The path to the resource to load
Implementation of IComparable.CompareTo()
The object to compare to
0 if the loaders are "equal" (i.e., have the same _path value)
Equals() returns true if the objects have the same _path value
The object to compare to
true if the objects have the same _path value
GetHashCode override that defers the result to the _path member variable.
Get paths to artifacts for a specific DataSpace.
The DataSpace for the artifacts of interest
A List of strings identifying paths to all artifacts for a specific DataSpace
Get paths to all artifacts
A List of strings identifying paths to all resources
Get XmlReaders for all resources
A List of XmlReaders for all resources
Create and return an XmlReader around the resource represented by this instance
if it is of the requested DataSpace type.
The DataSpace corresponding to the requested artifacts
A List of XmlReader objects
A helper function for splitting up a string that is a concatenation of strings delimited by the metadata
path separator into a string list. The resulting list sorted SSDL, MSL, CSDL, if possible.
The paths to split
An array of strings
Runtime Metadata Workspace
Initializes a new instance of the class.
Constructs a with loaders for all item collections ()
needed by EF except the o/c mapping which will be created automatically based on the given o-space and c-space
loaders. The item collection delegates are executed lazily when a given collection is used for the first
time. It is acceptable to pass a delegate that returns null if the collection will never be used, but this
is rarely done, and any attempt by EF to use the collection in such cases will result in an exception.
Delegate to return the c-space (CSDL) item collection.
Delegate to return the s-space (SSDL) item collection.
Delegate to return the c/s mapping (MSL) item collection.
Delegate to return the o-space item collection.
Constructs a with loaders for all item collections ()
that come from traditional EDMX mapping. Default o-space and o/c mapping collections will be used.
The item collection delegates are executed lazily when a given collection is used for the first
time. It is acceptable to pass a delegate that returns null if the collection will never be used, but this
is rarely done, and any attempt by EF to use the collection in such cases will result in an exception.
Delegate to return the c-space (CSDL) item collection.
Delegate to return the s-space (SSDL) item collection.
Delegate to return the c/s mapping (MSL) item collection.
Initializes a new instance of the class using the specified paths and assemblies.
The paths to workspace metadata.
The names of assemblies used to construct workspace.
Creates an configured to use the
data space.
The created parser object.
Creates a new bound to this metadata workspace based on the specified query expression.
A new with the specified expression as it's
property.
A that defines the query.
If
is null
If
contains metadata that cannot be resolved in this metadata workspace
If
is not structurally valid because it contains unresolvable variable references
Gets items.
The items.
The from which to retrieve items.
Registers the item collection with each associated data model.
The output parameter collection that needs to be filled up.
Loads metadata from the given assembly.
The assembly from which the metadata will be loaded.
Loads metadata from the given assembly.
The assembly from which the metadata will be loaded.
The delegate for logging the load messages.
Implicit loading means that we are trying to help the user find the right
assembly, but they didn't explicitly ask for it. Our Implicit rules require that
we filter out assemblies with the Ecma or MicrosoftPublic PublicKeyToken on them
Load metadata from the type's assembly into the OSpace ItemCollection.
If type comes from known source, has Ecma or Microsoft PublicKeyToken then the type's assembly is not
loaded, but the callingAssembly and its referenced assemblies are loaded.
The type's assembly is loaded into the OSpace ItemCollection
The assembly and its referenced assemblies to load when type is insuffiecent
If OSpace is not loaded for the specified EntityType
the load metadata from the callingAssembly and its referenced assemblies.
The CSPace type to verify its OSpace counterpart is loaded
The assembly and its referenced assemblies to load when type is insuffiecent
Returns an item by using the specified identity and the data model.
The item that matches the given identity in the specified data model.
The identity of the item.
The conceptual model in which the item is searched.
The type returned by the method.
Thrown if the space is not a valid space. Valid space is either C, O, CS or OCSpace
Returns an item by using the specified identity and the data model.
true if there is an item that matches the search criteria; otherwise, false.
The conceptual model on which the item is searched.
The conceptual model on which the item is searched.
When this method returns, contains a object. This parameter is passed uninitialized.
The type returned by the method.
Returns an item by using the specified identity and the data model.
The item that matches the given identity in the specified data model.
The identity of the item.
true to perform the case-insensitive search; otherwise, false.
The conceptual model on which the item is searched.
The type returned by the method.
Thrown if the space is not a valid space. Valid space is either C, O, CS or OCSpace
Returns an item by using the specified identity and the data model.
true if there is an item that matches the search criteria; otherwise, false.
The conceptual model on which the item is searched.
true to perform the case-insensitive search; otherwise, false.
The conceptual model on which the item is searched.
When this method returns, contains a object. This parameter is passed uninitialized.
The type returned by the method.
Gets all the items in the specified data model.
A collection of type that contains all the items in the specified data model.
The conceptual model for which the list of items is needed.
The type returned by the method.
Thrown if the space is not a valid space. Valid space is either C, O, CS or OCSpace
Returns an object by using the specified type name, namespace name, and data model.
An object that represents the type that matches the given type name and the namespace name in the specified data model. If there is no matched type, this method returns null.
The name of the type.
The namespace of the type.
The conceptual model on which the type is searched.
Thrown if the space is not a valid space. Valid space is either C, O, CS or OCSpace
Returns an object by using the specified type name, namespace name, and data model.
true if there is a type that matches the search criteria; otherwise, false.
The name of the type.
The namespace of the type.
The conceptual model on which the type is searched.
When this method returns, contains an object. This parameter is passed uninitialized.
Returns an object by using the specified type name, namespace name, and data model.
An object.
The name of the type.
The namespace of the type.
true to perform the case-insensitive search; otherwise, false.
The conceptual model on which the type is searched.
Thrown if the space is not a valid space. Valid space is either C, O, CS or OCSpace
Returns an object by using the specified type name, namespace name, and data model.
true if there is a type that matches the search criteria; otherwise, false.
The name of the type.
The namespace of the type.
true to perform the case-insensitive search; otherwise, false.
The conceptual model on which the type is searched.
When this method returns, contains an object. This parameter is passed uninitialized.
Returns an object by using the specified entity container name and the data model.
If there is no entity container, this method returns null; otherwise, it returns the first entity container.
The name of the entity container.
The conceptual model on which the entity container is searched.
Thrown if the space is not a valid space. Valid space is either C, O, CS or OCSpace
Returns an object by using the specified entity container name and the data model.
true if there is an entity container that matches the search criteria; otherwise, false.
The name of the entity container.
The conceptual model on which the entity container is searched.
When this method returns, contains an object. If there is no entity container, this output parameter contains null; otherwise, it returns the first entity container. This parameter is passed uninitialized.
Returns an object by using the specified entity container name and the data model.
If there is no entity container, this method returns null; otherwise, it returns the first entity container.
The name of the entity container.
true to perform the case-insensitive search; otherwise, false.
The conceptual model on which the entity container is searched.
Thrown if the space is not a valid space. Valid space is either C, O, CS or OCSpace
Returns an object by using the specified entity container name and the data model.
true if there is an entity container that matches the search criteria; otherwise, false.
The name of the entity container.
true to perform the case-insensitive search; otherwise, false.
The conceptual model on which the entity container is searched.
When this method returns, contains an object. If there is no entity container, this output parameter contains null; otherwise, it returns the first entity container. This parameter is passed uninitialized.
Returns all the overloads of the functions by using the specified name, namespace name, and data model.
A collection of type that contains all the functions that match the specified name in a given namespace and a data model.
The name of the function.
The namespace of the function.
The conceptual model in which the functions are searched.
Thrown if the space is not a valid space. Valid space is either C, O, CS or OCSpace
Returns all the overloads of the functions by using the specified name, namespace name, and data model.
A collection of type that contains all the functions that match the specified name in a given namespace and a data model.
The name of the function.
The namespace of the function.
The conceptual model in which the functions are searched.
true to perform the case-insensitive search; otherwise, false.
Thrown if the space is not a valid space. Valid space is either C, O, CS or OCSpace
Gets the function as specified by the function key.
All parameters are assumed to be .
name of the function
namespace of the function
types of the parameters
true for case-insensitive lookup
The function that needs to be returned
The function as specified in the function key or null
if name, namespaceName, parameterTypes or space argument is null
Returns the list of primitive types in the specified data model.
A collection of type that contains all the primitive types in the specified data model.
The data model for which you need the list of primitive types.
Thrown if the space is not a valid space. Valid space is either C, O, CS or OCSpace
Gets all the items in the specified data model.
A collection of type that contains all the items in the specified data model.
The conceptual model for which the list of items is needed.
Thrown if the space is not a valid space. Valid space is either C, O, CS or OCSpace
Given the canonical primitive type, get the mapping primitive type in the given dataspace
primitive type kind
dataspace in which one needs to the mapping primitive types
The mapped scalar type
if space argument is null
If ItemCollection has not been registered for the space passed in
Thrown if the space is not a valid space. Valid space is either C, O, CS or OCSpace
Search for a Mapping metadata with the specified type key.
type
The dataspace that the type for which map needs to be returned belongs to
true for case-insensitive lookup
space for which you want to get the mapped type
Returns false if no match found.
Search for a Mapping metadata with the specified type key.
typeIdentity of the type
The dataspace that the type for which map needs to be returned belongs to
space for which you want to get the mapped type
Thrown if mapping space is not valid
Search for a Mapping metadata with the specified type key.
space for which you want to get the mapped type
Thrown if mapping space is not valid
Search for a Mapping metadata with the specified type key.
space for which you want to get the mapped type
Returns false if no match found.
Tests the retrieval of .
true if the retrieval was successful; otherwise, false.
The from which to attempt retrieval of
.
When this method returns, contains the item collection. This parameter is passed uninitialized.
Checks if the space is valid and whether the collection is registered for the given space, and if both are valid,
then returns the itemcollection for the given space
The dataspace for the item collection that should be returned
if true, will throw if the collection isn't registered
Thrown if required and mapping space is not valid or registered
Returns a object that represents the object space type that matches the type supplied by the parameter edmSpaceType .
A object that represents the Object space type. If there is no matched type, this method returns null.
A object that represents the
.
Returns a object via the out parameter objectSpaceType that represents the type that matches the
supplied by the parameter edmSpaceType .
true if there is a type that matches the search criteria; otherwise, false.
A object that represents the
.
When this method returns, contains a object that represents the Object space type. This parameter is passed uninitialized.
Returns a object that represents the object space type that matches the type supplied by the parameter edmSpaceType .
A object that represents the Object space type. If there is no matched type, this method returns null.
A object that represents the
.
Returns a object via the out parameter objectSpaceType that represents the type that matches the
supplied by the parameter edmSpaceType .
true if there is a type that matches the search criteria; otherwise, false.
A object that represents the
.
When this method returns, contains a object that represents the Object space type. This parameter is passed uninitialized.
Helper method returning the OSpace enum type mapped to the specified Edm Space Type.
If the DataSpace of the argument is not CSpace, or the mapped OSpace type
cannot be determined, an ArgumentException is thrown.
The CSpace type to look up
The OSpace type mapped to the supplied argument
Must be StructuralType or EnumType.
Helper method returning the OSpace structural or enum type mapped to the specified Edm Space Type.
If the DataSpace of the argument is not CSpace, or if the mapped OSpace type
cannot be determined, the method returns false and sets the out parameter
to null.
The CSpace type to look up
The OSpace type mapped to the supplied argument
true on success, false on failure
Must be StructuralType or EnumType.
Returns a object that represents the
that matches the type supplied by the parameter objectSpaceType .
A object that represents the
. If there is no matched type, this method returns null.
A that supplies the type in the object space.
Returns a object via the out parameter edmSpaceType that represents the
that matches the type supplied by the parameter objectSpaceType .
true if there is a type that matches the search criteria; otherwise, false.
A object that represents the object space type.
When this method returns, contains a object that represents the
. This parameter is passed uninitialized.
Returns a object that represents the
that matches the type supplied by the parameter objectSpaceType .
A object that represents the
. If there is no matched type, this method returns null.
A that supplies the type in the object space.
Returns a object via the out parameter edmSpaceType that represents the
that matches the type supplied by the parameter objectSpaceType .
true on success, false on failure.
A object that represents the object space type.
When this method returns, contains a object that represents the
. This parameter is passed uninitialized.
Helper method returning the Edm Space structural or enum type mapped to the OSpace Type parameter. If the
DataSpace of the supplied type is not OSpace, or the mapped Edm Space type cannot
be determined, an ArgumentException is thrown.
The OSpace type to look up
The CSpace type mapped to the OSpace parameter
Must be StructuralType or EnumType
Helper method returning the Edm Space structural or enum type mapped to the OSpace Type parameter. If the
DataSpace of the supplied type is not OSpace, or the mapped Edm Space type cannot
be determined, the method returns false and sets the out parameter to null.
The OSpace type to look up
The mapped CSpace type
true on success, false on failure
Must be StructuralType or EnumType
Returns generated update or query view for the given extent.
Returns a TypeOf/TypeOfOnly Query for a given Extent and Type as a command tree.
Returns generated function definition for the given function.
Guarantees type match of declaration and generated parameters.
Guarantees return type match.
Throws internal error for functions without definition.
Passes thru exception occured during definition generation.
Determines if a target function exists for the given function import.
Function import (function declared in a model entity container)
Function target mapping (function to which the import is mapped in the target store)
true if a mapped target function exists; false otherwise
Returns the view loader associated with this workspace,
creating a loader if non exists. The loader includes
context information used by the update pipeline when
processing changes to C-space extents.
Takes in a Edm space type usage and converts into an
equivalent O space type usage
Returns true if the item collection for the given space has already been registered else returns false
Requires: C, S and CS are registered in this and other
Determines whether C, S and CS are equivalent. Useful in determining whether a DbCommandTree
is usable within a particular entity connection.
Other workspace.
true is C, S and CS collections are equivalent
Clears all the metadata cache entries.
Returns the canonical Model TypeUsage for a given PrimitiveTypeKind
PrimitiveTypeKind for which a canonical TypeUsage is expected
a canonical model TypeUsage
Returns the Model PrimitiveType for a given primitiveTypeKind
a PrimitiveTypeKind for which a Model PrimitiveType is expected
Model PrimitiveType
Gets original value members from an entity set and entity type.
The original value members from an entity set and entity type.
The entity set from which to retrieve original values.
The entity type of which to retrieve original values.
Returns members of a given /
for which original values are needed when modifying an entity.
The s for which original value is required.
An belonging to the C-Space.
An that participates in the given
.
true if entities may be updated partially; otherwise, false.
Return members for and methods.
An EntitySet belonging to the C-Space
An EntityType that participates in the given EntitySet
Scenario the members should be returned for.
ReadOnlyCollection of interesting members for the requested scenario (
).
Returns the QueryCacheManager hosted by this metadata workspace instance
The Max EDM version thats going to be supported by the runtime.
Internal helper class for query
Creates a new instance of perspective class so that query can work
ignorant of all spaces
runtime metadata container
Look up a type in the target data space based upon the fullName
fullName
true for case-insensitive lookup
The type usage object to return
True if the retrieval succeeded
Class for representing a collection of items for the object layer.
Most of the implementation for actual maintenance of the collection is
done by ItemCollection
Initializes a new instance of the class.
The method loads the O-space metadata for all the referenced assemblies starting from the given assembly
in a recursive way.
The assembly should be from Assembly.GetCallingAssembly via one of our public API's.
assembly whose dependency list we are going to traverse
Loads metadata from the given assembly.
The assembly from which the metadata will be loaded.
Loads metadata from the given assembly.
The assembly from which the metadata will be loaded.
The EDM metadata source for the O space metadata.
The delegate to which log messages are sent.
Loads metadata from the specified assembly.
The assembly from which the metadata will be loaded.
The EDM metadata source for the O space metadata.
Explicit loading means that the user specifically asked us to load this assembly.
We won't do any filtering, they "know what they are doing"
Implicit loading means that we are trying to help the user find the right
assembly, but they didn't explicitly ask for it. Our Implicit rules require that
we filter out assemblies with the Ecma or MicrosoftPublic PublicKeyToken on them
Load metadata from the type's assembly.
The type's assembly is loaded into the OSpace ItemCollection
true if the type and all its generic arguments are filtered out (did not attempt to load assembly)
internal static method to get the relationship name
Returns a collection of primitive type objects.
A collection of primitive type objects.
Returns the CLR type that corresponds to the supplied by the objectSpaceType parameter.
The CLR type of the OSpace argument.
A that represents the object space type.
Returns a CLR type corresponding to the supplied by the objectSpaceType parameter.
true if there is a type that matches the search criteria; otherwise, false.
A that represents the object space type.
The CLR type.
The method returns the underlying CLR type for the specified OSpace type argument. If the DataSpace of the parameter is not OSpace, an ArgumentException is thrown.
The CLR type of the OSpace argument.
The OSpace type to look up.
Returns the underlying CLR type for the specified OSpace enum type argument. If the DataSpace of the parameter is not OSpace, the method returns false and sets the out parameter to null.
true on success, false on failure
The OSpace enum type to look up
The CLR enum type of the OSpace argument
A helper method returning the underlying CLR type for the specified OSpace Enum or Structural type argument.
If the DataSpace of the parameter is not OSpace, an ArgumentException is thrown.
The OSpace type to look up
The CLR type of the OSpace argument
A helper method returning the underlying CLR type for the specified OSpace enum or structural type argument.
If the DataSpace of the parameter is not OSpace, the method returns false and sets
the out parameter to null.
The OSpace enum type to look up
The CLR enum type of the OSpace argument
true on success, false on failure
Given the canonical primitive type, get the mapping primitive type in the given dataspace
canonical primitive type
The mapped scalar type
Get the OSpace type given the CSpace typename
Given the ospace type, returns the fullname of the mapped cspace type.
Today, since we allow non-default mapping between entity type and complex type,
this is only possible for entity and complex type.
Returns all the items of the specified type from this item collection.
A collection of type that contains all items of the specified type.
The type returned by the method.
This class is responsible for keeping track of which assemblies we have already
considered so we don't reconsider them again.
The current rules for an assembly to be "seen" is
1. It is already in our dictionary
AND
1. We are in attribute loading mode
OR
2. We have seen it already with a non null EdmItemCollection
OR
3. We are seeing it with a null EdmItemCollection this time
Is the assembly and its referened assemblies not expected to have any metadata
Class for representing a collection of items for the object layer.
Most of the implementation for actual maintenance of the collection is
done by ItemCollection
Loads the given assembly and all the other referencd assemblies in the cache. If the assembly was already present
then it loads from the cache
Check to see if the type is already loaded - either in the typesInLoading, or ObjectItemCollection or
in the global cache
Loads the set of types from the given assembly and adds it to the given list of types
This method loads all the relationship type that this entity takes part in
Load metadata of the given type - when you call this method, you should check and make sure that the type has
edm attribute. If it doesn't,we won't load the type and it will be returned as null
Load all the property metadata of the given type
The type where properties are loaded
Load the property with scalar property attribute.
Note that we pass the CLR type in because in the case where the property is declared on a generic
base class the DeclaringType of propert won't work for us and we need the real entity type instead.
The CLR type of the entity
Metadata representing the property
True if the property forms part of the entity's key
Resolves enum type property.
The type to add the declared property to.
Property to resolve.
For testing.
The enumeration defining the type semantics used to resolve function overloads.
These flags are defined in the provider manifest per function definition.
Allow Implicit Conversion between given and formal argument types (default).
Allow Type Promotion between given and formal argument types.
Use strict Equivalence only.
Class for representing a collection of items in Store space.
For testing purposes only.
constructor that loads the metadata files from the specified xmlReaders, and returns the list of errors
encountered during load as the out parameter errors.
xmlReaders where the CDM schemas are loaded
the paths where the files can be found that match the xml readers collection
An out parameter to return the collection of errors encountered while loading
constructor that loads the metadata files from the specified xmlReaders, and returns the list of errors
encountered during load as the out parameter errors.
xmlReaders where the CDM schemas are loaded
the paths where the files can be found that match the xml readers collection
Initializes a new instance of the class using the specified XMLReader.
The XMLReader used to create metadata.
Initializes a new instances of the class.
The model of the .
Initializes a new instance of the class using the specified file paths.
The file paths used to create metadata.
Returns a collection of the objects.
A object that represents the collection of the
objects.
Given the canonical primitive type, get the mapping primitive type in the given dataspace
canonical primitive type
The mapped scalar type
checks if the schemaKey refers to the provider manifest schema key
and if true, loads the provider manifest
The store manifest
Get all the overloads of the function with the given name, this method is used for internal perspective
The full name of the function
true for case-insensitive lookup
A collection of all the functions with the given name in the given data space
Thrown if functionaName argument passed in is null
Convert the S type function parameters and returnType to C types.
Factory method that creates a .
SSDL artifacts to load. Must not be null.
Paths to SSDL artifacts. Used in error messages. Can be null in which case
the base Uri of the XmlReader will be used as a path.
Custom resolver. Currently used to resolve DbProviderServices implementation. If null
the default resolver will be used.
The collection of errors encountered while loading.
instance if no errors encountered. Otherwise null.
Returns the query cache manager
Gets the provider factory of the StoreItemCollection.
The provider factory of the StoreItemCollection.
Gets the provider manifest of the StoreItemCollection.
The provider manifest of the StoreItemCollection.
Gets the manifest token of the StoreItemCollection.
The manifest token of the StoreItemCollection.
Gets the invariant name of the StoreItemCollection.
The invariant name of the StoreItemCollection.
Gets the version of the store schema for this collection.
The version of the store schema for this collection.
Internal helper class for query
Creates a new instance of perspective class so that query can work
ignorant of all spaces
runtime metadata container
Look up a type in the target data space based upon the fullName
fullName
true for case-insensitive lookup
a list of types that have the specified full name but may differ by strong name
Returns the entity container in CSpace or SSpace
Represents a set of static Type helpers operating on TypeMetadata
Asserts types are in Model space
Asserts querycommandtrees are in model space type terms
Determines whether a given typeUsage is valid as OrderBy sort key
Determines whether a given typeusage is valid as GroupBy key
Determine wheter a given typeusage is valid for Distinct operator
Determine wheter a given typeusage is valid for set comparison operator such as UNION, INTERSECT and EXCEPT
Returns true if typeUsage type is valid for IS [NOT] NULL (expr) operator
Creates metadata for a new row type with column names and types based on the key members of the specified Entity type
The Entity type that provides the Key members on which the column names and types of the new row type will be based
A new RowType info with column names and types corresponding to the Key members of the specified Entity type
Gets primitive type usage for .
Primitive or enum type usage.
Primitive type usage for .
For enum types a new type usage based on the underlying type will be created. For primitive types
the value passed to the function will be returned.
Factory method for creating a type usage for underlying type of enum type usage.
Enum type usage used to create an underlying type usage of.
Type usage for the underlying enum type.
Factory method for creating a type usage for underlying union type of spatial type usage.
Spatial type usage used to create a union type usage of.
Type usage for the spatial union type of the correct topology.
Retrieves Properties and/or RelationshipEnds declared by the specified type or any base type.
Retrieves Properties and/or RelationshipEnds declared by (and ONLY by) the specified type.
Retrieves Properties and/or RelationshipEnds declared by (and ONLY by) the specified type.
Returns row type if supplied function is a tvf returning Collection(RowType), otherwise null.
If the type refered to by the TypeUsage is a RefType, extracts the EntityType and returns true,
otherwise returns false.
TypeUsage that may or may not refer to a RefType
Non-null if the TypeUsage refers to a RefType, null otherwise
True if the TypeUsage refers to a RefType, false otherwise
Converts the given CLR type into a DbType
The CLR type to convert
returns a Typeusage
Provides type semantics service, type operations and type predicates for the EDM type system.
For detailed functional specification, see "The EDP Type System.docx" and "edm.spec.doc".
Notes:
1) The notion of 'type' for the sake of type operation semantics is based on TypeUsage, i.e., EdmType *plus* facets.
2) EDM built-in primitive types are defined by the EDM Provider Manifest.
3) SubType and Promotable are similar notions however subtyping is stricter than promotability. Subtyping is used for mapping
validation while Promotability is used in query, update expression static type validation.
Determines whether two types are exactly equal.
For row types, this INCLUDES property names as well as property types.
The first type to compare.
The second type to compare.
If the two types are structurally equal, true ; otherwise false .
Determines if the two types are structurally equivalent.
Equivalence for nomimal types is based on lexical identity and structural equivalence for structural types.
Structural equivalence for row types is based only on equivalence of property types, property names are ignored.
true if equivalent, false otherwise
determines if two types are equivalent or if fromType is promotable to toType
true if fromType equivalent or promotable to toType, false otherwise
determines if two types are equivalent or if fromType is promotable to toType
true if fromType equivalent or promotable to toType, false otherwise
determines if subType is equal to or a sub-type of superType.
true if subType is equal to or a sub-type of superType, false otherwise
determines if subType EdmType is a sub-type of superType EdmType.
true if subType is a sub-type of superType, false otherwise
Determines if fromType is promotable to toType.
true if fromType is promotable to toType, false otherwise
Flattens composite transient type down to nominal type leafs.
determines if fromType can be casted to toType.
Type to cast from.
Type to cast to.
true if can be casted to ; false otherwise.
Cast rules:
- primitive types can be casted to other primitive types
- primitive types can be casted to enum types
- enum types can be casted to primitive types
- enum types cannot be casted to other enum types except for casting to the same type
Determines if a common super type (LUB) exists between type1 and type2.
true if a common super type between type1 and type2 exists and out commonType represents the common super type. false otherwise along with commonType as null
Gets a Common super-type of type1 and type2 if one exists. null otherwise.
determines if an EdmFunction is an aggregate function
determines if fromType can be cast to toType. this operation is valid only
if fromtype and totype are polimorphic types.
determines if fromEdmType can be cast to toEdmType. this operation is valid only
if fromtype and totype are polimorphic types.
Determines if the
is a structural nominal type, i.e., EntityType or ComplexType
Type to be checked.
true if the
is a nominal type. false otherwise.
determines if type is a collection type.
determines if type is a complex type.
determines if type is an EntityType
determines if type is a Relationship Type.
determines if type is of EnumerationType.
determines if is primitive or enumeration type
Type to verify.
true if is primitive or enumeration type. false otherwise.
determines if is primitive or enumeration type
Type to verify.
true if is primitive or enumeration type. false otherwise.
Determines if type is a numeric type, i.e., is one of:
Byte, Int16, Int32, Int64, Decimal, Single or Double
Determines if type is an integer numeric type, i.e., is one of: Byte, Int16, Int32, Int64
Determines if type is an fixed point numeric type, i.e., is one of: Decimal
Determines if type is an float point numeric type, i.e., is one of: Single or Double.
Determines if type is an unsigned integer numeric type, i.e., is Byte
determines if type is a polimorphic type, ie, EntityType or ComplexType.
determines if type is of Boolean Kind
determines if type is a primitive/scalar type.
determines if type is a primitive type of given primitiveTypeKind
determines if type is a RowType
determines if type is a ReferenceType
determines if type is a spatial type
determines if type is a strong spatial type (i.e., a spatial type, but not one of the two spatial union types)
determines if type is a structural type, ie, EntityType, ComplexType, RowType or ReferenceType.
determines if edmMember is part of the key of it's defining type.
determines if type is Nullable.
determines if edmMember is Nullable.
determines if given type is equal-comparable.
true if equal-comparable, false otherwise
Determines if type1 is equal-comparable to type2.
in order for type1 and type2 to be equal-comparable, they must be
individualy equal-comparable and have a common super-type.
an instance of a TypeUsage
an instance of a TypeUsage
true if type1 and type2 are equal-comparable, false otherwise
Determines if given type is order-comparable
Determines if type1 is order-comparable to type2.
in order for type1 and type2 to be order-comparable, they must be
individualy order-comparable and have a common super-type.
an instance of a TypeUsage
an instance of a TypeUsage
true if type1 and type2 are order-comparable, false otherwise
Removes facets that are not type constraints.
Determines if the given edmType is equal comparable. Consult "EntitySql Language Specification",
section 7 - Comparison and Dependent Operations for details.
an instance of an EdmType
true if edmType is equal-comparable, false otherwise
Determines if the given edmType is order comparable. Consult "EntitySql Language Specification",
section 7 - Comparison and Dependent Operations for details.
an instance of an EdmType
true if edmType is order-comparable, false otherwise
Computes the closure of common super types of the set of predefined edm primitive types
This is done only once and cached as opposed to previous implementation that was computing
this for every new pair of types.
returns the intersection of types.
Returns the list of common super types of two primitive types.
Class representing a validtion error event args
Construct the validation error event args with a validation error object
The validation error object for this event args
Gets the validation error object this event args
The validation severity level
Warning
Error
Internal
Class that contains all the constants for various schemas
This exception is thrown when a requested object is not found in the store.
Initializes a new instance of .
Initializes a new instance of with a specialized error message.
The message that describes the error.
Initializes a new instance of class that uses a specified error message and a reference to the inner exception.
The message that describes the error.
The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified.
Initializes a new instance of ObjectNotFoundException
Caches an ELinq query
Constructs a new compiled query instance which hosts the delegate returned to the user
(one of the Invoke overloads).
Compiled query expression.
Creates a new delegate that represents the compiled LINQ to Entities query.
, a generic delegate that represents the compiled LINQ to Entities query.
The lambda expression to compile.
A type derived from .
Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg1 must be a primitive type.
Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg2 must be a primitive type.
Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg3 must be a primitive type.
Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg4 must be a primitive type.
Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg5 must be a primitive type.
Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg6 must be a primitive type.
Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg7 must be a primitive type.
Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg8 must be a primitive type.
Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg9 must be a primitive type.
Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg10 must be a primitive type.
Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg11 must be a primitive type.
Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg12 must be a primitive type.
Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg13 must be a primitive type.
Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg14 must be a primitive type.
Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg15 must be a primitive type.
The type T of the query results returned by executing the delegate returned by the
method.
Creates a new delegate that represents the compiled LINQ to Entities query.
, a generic delegate that represents the compiled LINQ to Entities query.
The lambda expression to compile.
A type derived from .
Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg1 must be a primitive type.
Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg2 must be a primitive type.
Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg3 must be a primitive type.
Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg4 must be a primitive type.
Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg5 must be a primitive type.
Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg6 must be a primitive type.
Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg7 must be a primitive type.
Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg8 must be a primitive type.
Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg9 must be a primitive type.
Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg10 must be a primitive type.
Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg11 must be a primitive type.
Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg12 must be a primitive type.
Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg13 must be a primitive type.
Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg14 must be a primitive type.
The type T of the query results returned by executing the delegate returned by the
method.
Creates a new delegate that represents the compiled LINQ to Entities query.
, a generic delegate that represents the compiled LINQ to Entities query.
The lambda expression to compile.
A type derived from .
Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg1 must be a primitive type.
Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg2 must be a primitive type.
Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg3 must be a primitive type.
Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg4 must be a primitive type.
Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg5 must be a primitive type.
Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg6 must be a primitive type.
Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg7 must be a primitive type.
Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg8 must be a primitive type.
Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg9 must be a primitive type.
Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg10 must be a primitive type.
Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg11 must be a primitive type.
Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg12 must be a primitive type.
Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg13 must be a primitive type.
The type T of the query results returned by executing the delegate returned by the
method.
Creates a new delegate that represents the compiled LINQ to Entities query.
, a generic delegate that represents the compiled LINQ to Entities query.
The lambda expression to compile.
A type derived from .
Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg1 must be a primitive type.
Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg2 must be a primitive type.
Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg3 must be a primitive type.
Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg4 must be a primitive type.
Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg5 must be a primitive type.
Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg6 must be a primitive type.
Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg7 must be a primitive type.
Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg8 must be a primitive type.
Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg9 must be a primitive type.
Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg10 must be a primitive type.
Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg11 must be a primitive type.
Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg12 must be a primitive type.
The type T of the query results returned by executing the delegate returned by the
method.
Creates a new delegate that represents the compiled LINQ to Entities query.
, a generic delegate that represents the compiled LINQ to Entities query.
The lambda expression to compile.
A type derived from .
Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg1 must be a primitive type.
Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg2 must be a primitive type.
Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg3 must be a primitive type.
Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg4 must be a primitive type.
Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg5 must be a primitive type.
Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg6 must be a primitive type.
Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg7 must be a primitive type.
Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg8 must be a primitive type.
Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg9 must be a primitive type.
Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg10 must be a primitive type.
Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg11 must be a primitive type.
The type T of the query results returned by executing the delegate returned by the
method.
Creates a new delegate that represents the compiled LINQ to Entities query.
, a generic delegate that represents the compiled LINQ to Entities query.
The lambda expression to compile.
A type derived from .
Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg1 must be a primitive type.
Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg2 must be a primitive type.
Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg3 must be a primitive type.
Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg4 must be a primitive type.
Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg5 must be a primitive type.
Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg6 must be a primitive type.
Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg7 must be a primitive type.
Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg8 must be a primitive type.
Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg9 must be a primitive type.
Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg10 must be a primitive type.
The type T of the query results returned by executing the delegate returned by the
method.
Creates a new delegate that represents the compiled LINQ to Entities query.
, a generic delegate that represents the compiled LINQ to Entities query.
The lambda expression to compile.
A type derived from .
Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg1 must be a primitive type.
Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg2 must be a primitive type.
Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg3 must be a primitive type.
Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg4 must be a primitive type.
Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg5 must be a primitive type.
Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg6 must be a primitive type.
Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg7 must be a primitive type.
Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg8 must be a primitive type.
Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg9 must be a primitive type.
The type T of the query results returned by executing the delegate returned by the
method.
Creates a new delegate that represents the compiled LINQ to Entities query.
, a generic delegate that represents the compiled LINQ to Entities query.
The lambda expression to compile.
A type derived from .
Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg1 must be a primitive type.
Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg2 must be a primitive type.
Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg3 must be a primitive type.
Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg4 must be a primitive type.
Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg5 must be a primitive type.
Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg6 must be a primitive type.
Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg7 must be a primitive type.
Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg8 must be a primitive type.
The type T of the query results returned by executing the delegate returned by the
method.
Creates a new delegate that represents the compiled LINQ to Entities query.
, a generic delegate that represents the compiled LINQ to Entities query.
The lambda expression to compile.
A type derived from .
Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg1 must be a primitive type.
Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg2 must be a primitive type.
Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg3 must be a primitive type.
Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg4 must be a primitive type.
Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg5 must be a primitive type.
Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg6 must be a primitive type.
Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg7 must be a primitive type.
The type T of the query results returned by executing the delegate returned by the
method.
Creates a new delegate that represents the compiled LINQ to Entities query.
, a generic delegate that represents the compiled LINQ to Entities query.
The lambda expression to compile.
A type derived from .
Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg1 must be a primitive type.
Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg2 must be a primitive type.
Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg3 must be a primitive type.
Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg4 must be a primitive type.
Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg5 must be a primitive type.
Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg6 must be a primitive type.
The type T of the query results returned by executing the delegate returned by the
method.
Creates a new delegate that represents the compiled LINQ to Entities query.
, a generic delegate that represents the compiled LINQ to Entities query.
The lambda expression to compile.
A type derived from .
Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg1 must be a primitive type.
Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg2 must be a primitive type.
Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg3 must be a primitive type.
Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg4 must be a primitive type.
Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg5 must be a primitive type.
The type T of the query results returned by executing the delegate returned by the
method.
Creates a new delegate that represents the compiled LINQ to Entities query.
, a generic delegate that represents the compiled LINQ to Entities query.
The lambda expression to compile.
A type derived from .
Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg1 must be a primitive type.
Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg2 must be a primitive type.
Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg3 must be a primitive type.
Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg4 must be a primitive type.
The type T of the query results returned by executing the delegate returned by the
method.
Creates a new delegate that represents the compiled LINQ to Entities query.
, a generic delegate that represents the compiled LINQ to Entities query.
The lambda expression to compile.
A type derived from .
Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg1 must be a primitive type.
Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg2 must be a primitive type.
Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg3 must be a primitive type.
The type T of the query results returned by executing the delegate returned by the
method.
Creates a new delegate that represents the compiled LINQ to Entities query.
, a generic delegate that represents the compiled LINQ to Entities query.
The lambda expression to compile.
A type derived from .
Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg1 must be a primitive type.
Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg2 must be a primitive type.
The type T of the query results returned by executing the delegate returned by the
method.
Creates a new delegate that represents the compiled LINQ to Entities query.
, a generic delegate that represents the compiled LINQ to Entities query.
The lambda expression to compile.
A type derived from .
Represents the type of the parameter that has to be passed in when executing the delegate returned by this method. TArg1 must be a primitive type.
The type T of the query results returned by executing the delegate returned by the
method.
Creates a new delegate that represents the compiled LINQ to Entities query.
, a generic delegate that represents the compiled LINQ to Entities query.
The lambda expression to compile.
A type derived from .
The type T of the query results returned by executing the delegate returned by the
method.
This method is trying to distinguish between a set of types and a singleton type
It also has the restriction that to be a set of types, it must be assignable from ObjectQuery<T>
Otherwise we won't be able to cast our query to the set requested.
The type asked for as a result type.
Is it a set of a type.
The element type to use
The values currently assigned to the properties of an entity.
Provides access to the original values of object data. The DbUpdatableDataRecord implements methods that allow updates to the original values of an object.
Retrieves the field value as a Boolean.
The field value as a Boolean.
The ordinal of the field.
Retrieves the field value as a byte.
The field value as a byte.
The ordinal of the field.
Retrieves the field value as a byte array.
The number of bytes copied.
The ordinal of the field.
The index at which to start copying data.
The destination buffer where data is copied.
The index in the destination buffer where copying will begin.
The number of bytes to copy.
Retrieves the field value as a char.
The field value as a char.
The ordinal of the field.
Retrieves the field value as a char array.
The number of characters copied.
The ordinal of the field.
The index at which to start copying data.
The destination buffer where data is copied.
The index in the destination buffer where copying will begin.
The number of characters to copy.
Retrieves the field value as an .
The field value as an .
The ordinal of the field.
Retrieves the field value as a
The field value as a .
The ordinal of the field.
Retrieves the name of the field data type.
The name of the field data type.
The ordinal of the field.
Retrieves the field value as a .
The field value as a .
The ordinal of the field.
Retrieves the field value as a decimal.
The field value as a decimal.
The ordinal of the field.
Retrieves the field value as a double.
The field value as a double.
The ordinal of the field.
Retrieves the type of a field.
The field type.
The ordinal of the field.
Retrieves the field value as a float.
The field value as a float.
The ordinal of the field.
Retrieves the field value as a .
The field value as a .
The ordinal of the field.
Retrieves the field value as an .
The field value as an .
The ordinal of the field.
Retrieves the field value as an .
The field value as an .
The ordinal of the field.
Retrieves the field value as an .
The field value as an .
The ordinal of the field.
Retrieves the name of a field.
The name of the field.
The ordinal of the field.
Retrieves the ordinal of a field by using the name of the field.
The ordinal of the field.
The name of the field.
Retrieves the field value as a string.
The field value.
The ordinal of the field.
Retrieves the value of a field.
The field value.
The ordinal of the field.
Retrieves the value of a field.
The field value.
The ordinal of the field.
Populates an array of objects with the field values of the current record.
The number of field values returned.
An array of objects to store the field values.
Returns whether the specified field is set to .
true if the field is set to ; otherwise false.
The ordinal of the field.
Sets the value of a field in a record.
The ordinal of the field.
The value of the field.
Sets the value of a field in a record.
The ordinal of the field.
The value of the field.
Sets the value of a field in a record.
The ordinal of the field.
The value of the field.
Sets the value of a field in a record.
The ordinal of the field.
The value of the field.
Sets the value of a field in a record.
The ordinal of the field.
The value of the field.
Sets the value of a field in a record.
The ordinal of the field.
The value of the field.
Sets the value of a field in a record.
The ordinal of the field.
The value of the field.
Sets the value of a field in a record.
The ordinal of the field.
The value of the field.
Sets the value of a field in a record.
The ordinal of the field.
The value of the field.
Sets the value of a field in a record.
The ordinal of the field.
The value of the field.
Sets the value of a field in a record.
The ordinal of the field.
The value of the field.
Sets the value of a field in a record.
The ordinal of the field.
The value of the field.
Sets the value of a field in a record.
The ordinal of the field.
The value of the field.
Sets the value of a field in a record.
The ordinal of the field.
The value of the field.
Sets field values in a record.
The number of the fields that were set.
The values of the field.
Sets a field to the value.
The ordinal of the field.
Retrieves a field value as a .
A field value as a .
The ordinal of the field.
Retrieves the field value as a .
The field value as a .
The ordinal of the field.
Sets the value of a field in a record.
The ordinal of the field.
The value of the field.
Gets the number of fields in the record.
An integer value that is the field count.
Returns a value that has the given field ordinal.
The value that has the given field ordinal.
The ordinal of the field.
Gets a value that has the given field name.
The field value.
The name of the field.
Gets data record information.
A object.
This is the interface that represent the minimum interface required
to be an entity in ADO.NET.
This class contains the common methods need for an date object.
Public constant name used for change tracking
Providing this definition allows users to use this constant instead of
hard-coding the string. This helps to ensure the property name is correct
and allows faster comparisons in places where we are looking for this specific string.
Users can still use the case-sensitive string directly instead of the constant,
it will just be slightly slower on comparison.
Including the dash (-) character around the name ensures that this will not conflict with
a real data property, because -EntityKey- is not a valid identifier name
Raises the event.
The name of the changed property.
Raises the event.
The name of the property changing.
Returns the minimum date time value supported by the data source.
A value that is the minimum date time that is supported by the data source.
Raises an event that is used to report that a property change is pending.
The name of the changing property.
Raises an event that is used to report that a property change has occurred.
The name for the changed property.
Returns a complex type for the specified property.
Unlike most of the other helper methods in this class, this one is not static
because it references the SetValidValue for complex objects, which is also not static
because it needs a reference to this.
A complex type object for the property.
A complex object that inherits from complex object.
The name of the complex property that is the complex object.
Indicates whether the type supports null values.
Indicates whether the type is initialized.
The type of the complex object being requested.
This method is called by a ComplexObject contained in this Entity
whenever a change is about to be made to a property of the
ComplexObject so that the change can be forwarded to the change tracker.
The name of the top-level entity property that contains the ComplexObject that is calling this method.
The instance of the ComplexObject on which the property is changing.
The name of the changing property on complexObject.
This method is called by a ComplexObject contained in this Entity
whenever a change has been made to a property of the
ComplexObject so that the change can be forwarded to the change tracker.
The name of the top-level entity property that contains the ComplexObject that is calling this method.
The instance of the ComplexObject on which the property is changing.
The name of the changing property on complexObject.
Determines whether the specified byte arrays contain identical values.
true if both arrays are of the same length and contain the same byte values or if both arrays are null; otherwise, false.
The first byte array value to compare.
The second byte array to compare.
Returns a copy of the current byte value.
A copy of the current value.
The current byte array value.
Makes sure the value being set for a property is valid.
The value being validated.
The value passed into the property setter.
Flag indicating if this property is allowed to be null.
The name of the property that is being validated.
If value is null for a non nullable value.
Makes sure the value being set for a property is valid.
A value being set.
The value being set.
Indicates whether the property is nullable.
Makes sure the value being set for a property is valid.
The value being set.
The Boolean value.
The name of the property that is being validated.
Makes sure the value being set for a property is valid.
The value being set.
The Boolean value.
Makes sure the value being set for a property is valid.
The nullable value being set.
The nullable value.
The name of the property that is being validated.
Makes sure the value being set for a property is valid.
The nullable value being set.
The nullable value.
Makes sure the value being set for a property is valid.
A that is set.
The value.
The name of the property that is being validated.
Makes sure the value being set for a property is valid.
The value that is set.
The value that is being validated.
Makes sure the value being set for a property is valid.
The nullable value being set.
The nullable value.
The name of the property that is being validated.
Makes sure the value being set for a property is valid.
The nullable value being set.
The nullable value.
Makes sure the value being set for a property is valid.
The value being set.
The value.
The name of the property that is being validated.
Makes sure the value being set for a property is valid.
The value being set.
The value.
Makes sure the value being set for a property is valid.
The nullable value being set.
The nullable value.
The name of the property that is being validated.
Makes sure the value being set for a property is valid.
The nullable value being set.
The nullable value.
Makes sure the value being set for a property is valid.
The value being set.
The value.
The name of the property that is being validated.
Makes sure the value being set for a property is valid.
The value being set.
The value.
Makes sure the value being set for a property is valid.
The nullable value being set.
The nullable value.
The name of the property that is being validated.
Makes sure the value being set for a property is valid.
The nullable value being set.
The nullable value.
Makes sure the value being set for a property is valid.
The value being set.
The value.
The name of the property that is being validated.
Makes sure the value being set for a property is valid.
The value being set.
The value.
Makes sure the value being set for a property is valid.
The nullable value being set.
The nullable value.
The name of the property that is being validated.
Makes sure the value being set for a property is valid.
The nullable value being set.
The nullable value.
Makes sure the value being set for a property is valid.
The value being set.
The value.
The name of the property that is being validated.
Makes sure the value being set for a property is valid.
A value being set.
The value.
Makes sure the value being set for a property is valid.
The value being set.
The value.
The name of the property that is being validated.
Makes sure the value being set for a property is valid.
The nullable value being set.
The nullable value.
Makes sure the value being set for a property is valid.
The value being set.
The value.
The name of the property that is being validated.
Makes sure the value being set for a property is valid.
The value being set.
The value.
Makes sure the value being set for a property is valid.
The nullable value being set.
The nullable value.
The name of the property that is being validated.
Makes sure the value being set for a property is valid.
The nullable value being set.
The nullable value.
Makes sure the value being set for a property is valid.
The value being set.
The value.
The name of the property that is being validated.
Makes sure the value being set for a property is valid.
The value being set.
The value.
Makes sure the value being set for a property is valid.
The nullable value being set.
The nullable value.
The name of the property that is being validated.
Makes sure the value being set for a property is valid.
The nullable value being set.
The nullable value.
Makes sure the Single value being set for a property is valid.
The value being set.
The value.
The name of the property that is being validated.
Makes sure the Single value being set for a property is valid.
The value being set.
The value.
Makes sure the value being set for a property is valid.
The nullable value being set.
The nullable value.
The name of the property that is being validated.
Makes sure the value being set for a property is valid.
The nullable value being set.
The nullable value.
Makes sure the value being set for a property is valid.
The value being set.
The value.
Name of the property that is being validated.
Makes sure the value being set for a property is valid.
The value being set.
The value.
Makes sure the value being set for a property is valid.
The nullable value being set.
The nullable value.
The name of the property that is being validated.
Makes sure the value being set for a property is valid.
The nullable value being set.
The nullable value.
Makes sure the value being set for a property is valid.
The value being set.
The value.
The name of the property that is being validated.
Makes sure the value being set for a property is valid.
The value being set.
The value.
Makes sure the value being set for a property is valid.
The nullable value being set.
The nullable value.
The name of the property that is being validated.
Makes sure the value being set for a property is valid.
The nullable value being set.
The nullable value.
Makes sure the value being set for a property is valid.
The value being set.
The value.
The name of the property that is being validated.
Makes sure the value being set for a property is valid.
The value being set.
The value.
Makes sure the value being set for a property is valid.
The nullable value being set.
The nullable value.
The name of the property that is being validated.
Makes sure the value being set for a property is valid.
The nullable value being set.
The nullable value.
Makes sure the value being set for a property is valid.
The value being set.
The value.
The name of the property that is being validated.
Makes sure the value being set for a property is valid.
The value being set.
The value.
Makes sure the value being set for a property is valid.
The nullable value being set.
The nullable value.
The name of the property that is being validated.
Makes sure the value being set for a property is valid.
The nullable value being set.
The nullable value.
Makes sure the value being set for a property is valid.
The value being set.
The value.
The name of the property that is being validated.
Makes sure the value being set for a property is valid.
The value being set.
The value.
Makes sure the UInt16 value being set for a property is valid.
The nullable UInt16 value being set.
The nullable UInt16 value.
The name of the property that is being validated.
Makes sure the UInt16 value being set for a property is valid.
The nullable UInt16 value being set.
The nullable UInt16 value.
Makes sure the value being set for a property is valid.
The value being set.
The value.
The name of the property that is being validated.
Makes sure the value being set for a property is valid.
The value being set.
The value.
Makes sure the UInt32 value being set for a property is valid.
The nullable UInt32 value being set.
The nullable UInt32 value.
The name of the property that is being validated.
Makes sure the UInt32 value being set for a property is valid.
The nullable UInt32 value being set.
The nullable UInt32 value.
Makes sure the value being set for a property is valid.
The value being set.
The value.
The name of the property that is being validated.
Makes sure the value being set for a property is valid.
The value being set.
The value.
Makes sure the value being set for a property is valid.
The nullable UInt64 value being set.
The nullable UInt64 value.
The name of the property that is being validated.
Makes sure the value being set for a property is valid.
The nullable UInt64 value being set.
The nullable UInt64 value.
Validates that the property is not null, and throws if it is.
The validated property.
The string value to be checked.
Flag indicating if this property is allowed to be null.
The name of the property that is being validated.
The string value is null for a non-nullable string.
Validates that the property is not null, and throws if it is.
The validated value.
The string value to be checked.
Flag indicating if this property is allowed to be null.
Validates that the property is not null, and throws if it is.
The value being set.
The value to be checked.
Flag indicating if this property is allowed to be null.
Name of the property that is being validated.
The value is null for a non-nullable property.
Validates that the property is not null, and throws if it is.
The value being set.
value to be checked.
Flag indicating if this property is allowed to be null.
The value is null for a non-nullable property.
Validates that the property is not null, and throws if it is.
The value being set.
value to be checked.
Flag indicating if this property is allowed to be null.
The name of the property that is being validated.
The value is null for a non-nullable property.
Validates that the property is not null, and throws if it is.
The value being set.
The value to be checked.
Flag indicating if this property is allowed to be null.
The value is null for a non-nullable property.
Sets a complex object for the specified property.
A complex type that derives from complex object.
The original complex object for the property, if any.
The complex object is being set.
The complex property that is being set to the complex object.
The type of the object being replaced.
Verifies that a complex object is not null.
The complex object being validated.
The complex object that is being validated.
The complex property on the parent object that is associated with complexObject .
The type of the complex object being verified.
Notification that a property has been changed.
The PropertyChanged event can indicate all properties on the
object have changed by using either a null reference
(Nothing in Visual Basic) or String.Empty as the property name
in the PropertyChangedEventArgs.
Notification that a property is about to be changed.
The PropertyChanging event can indicate all properties on the
object are changing by using either a null reference
(Nothing in Visual Basic) or String.Empty as the property name
in the PropertyChangingEventArgs.
Determines whether the structural object is attached to a change tracker or not
Associate the ComplexType with an Entity or another ComplexObject
Parent may be an Entity or ComplexObject
Object to be added to.
The property on the parent that reference the complex type.
Removes this instance from the parent it was attached to.
Parent may be an Entity or ComplexObject
Notifies the change tracker that a property change is pending on a complex object.
The name of the changing property.
property is null.
Notifies the change tracker that a property of a complex object has changed.
The name of the changed property.
property is null.
This method is used to report all changes on this ComplexObject to its parent entity or ComplexObject
Should be null in this method override. This is only relevant in Entity's implementation of this method, so it is unused here Instead of passing the most-derived property name up the hierarchy, we will always pass the current _parentPropertyName Once this gets up to the Entity, it will actually use the value that was passed in
The instance of the object on which the property is changing.
The name of the changing property on complexObject.
This method is used to report all changes on this ComplexObject to its parent entity or ComplexObject
Should be null in this method override. This is only relevant in Entity's implementation of this method, so it is unused here Instead of passing the most-derived property name up the hierarchy, we will always pass the current _parentPropertyName Once this gets up to the Entity, it will actually use the value that was passed in.
The instance of the object on which the property is changing.
The name of the changing property on complexObject.
Attribute for complex properties
Implied default AttributeUsage properties Inherited=True, AllowMultiple=False,
The metadata system expects this and will only look at the first of each of these attributes, even if there are more.
Base attribute for properties mapped to store elements.
Implied default AttributeUsage properties Inherited=True, AllowMultiple=False,
The metadata system expects this and will only look at the first of each of these attributes, even if there are more.
Only allow derived attributes from this assembly
attribute for complex types
Base attribute for schematized types
Only allow derived attributes from this assembly
The name of the type in the conceptual schema that maps to the class to which this attribute is applied.
A that is the name.
The namespace name of the entity object type or complex type in the conceptual schema that maps to this type.
A that is the namespace name.
Attribute identifying the Edm base class
Attribute indicating an enum type.
Attribute identifying the Ends defined for a RelationshipSet
Implied default AttributeUsage properties Inherited=True, AllowMultiple=False,
The metadata system expects this and will only look at the first of each of these attributes, even if there are more.
Initializes a new instance of the
class.
The namespace name of the relationship property.
The name of the relationship. The relationship name is not namespace qualified.
The role name at the other end of the relationship.
The namespace name of the navigation property.
A that is the namespace name.
Gets the unqualified relationship name.
The relationship name.
Gets the role name at the other end of the relationship.
The target role name is specified by the Role attribute of the other End element in the association that defines this relationship in the conceptual model. For more information, see Association (EDM).
Defines a relationship between two entity types based on an association in the conceptual model.
Creates an instance of the class.
The name of the namespace for the association in which this entity participates.
The name of a relationship in which this entity participates.
Name of the role for the type at one end of the association.
A value of that indicates the multiplicity at one end of the association, such as one or many.
The type of the entity at one end of the association.
Name of the role for the type at the other end of the association.
A value of that indicates the multiplicity at the other end of the association, such as one or many.
The type of the entity at the other end of the association.
Initializes a new instance of the
class.
The name of the namespace for the association in which this entity participates.
The name of a relationship in which this entity participates.
Name of the role for the type at one end of the association.
A value of that indicates the multiplicity at one end of the association, such as one or many.
The type of the entity at one end of the association.
Name of the role for the type at the other end of the association.
A value of that indicates the multiplicity at the other end of the association, such as one or many.
The type of the entity at the other end of the association.
A value that indicates whether the relationship is based on the foreign key value.
The namespace for the relationship.
A that is the namespace for the relationship.
Name of the relationship.
A that is the name of a relationship that is defined by this
.
Name of the role at one end of the relationship.
A that is the name of the role.
Multiplicity at one end of the relationship.
A value that indicates the multiplicity.
Type of the entity at one end of the relationship.
A that is the type of the object at this end of the association.
Name of the role at the other end of the relationship.
A that is the name of the role.
Multiplicity at the other end of the relationship.
A value that indicates the multiplicity.
Type of the entity at the other end of the relationship.
A that is the type of the object t the other end of the association.
Gets a Boolean value that indicates whether the relationship is based on the foreign key value.
true if the relationship is based on the foreign key value; otherwise false.
Attribute for scalar properties in an IEntity.
Implied default AttributeUsage properties Inherited=True, AllowMultiple=False,
The metadata system expects this and will only look at the first of each of these attributes, even if there are more.
Gets or sets the value that indicates whether the property can have a null value.
The value that indicates whether the property can have a null value.
Gets or sets the value that indicates whether the property is part of the entity key.
The value that indicates whether the property is part of the entity key.
Attribute for static types
Initializes a new instance of the class.
Initializes a new instance of the class with a unique value for each model referenced by the assembly.
Setting this parameter to a unique value for each model file in a Visual Basic
assembly will prevent the following error:
"'System.Data.Entity.Core.Objects.DataClasses.EdmSchemaAttribute' cannot be specified more than once in this project, even with identical parameter values."
A string that is a unique GUID value for the model in the assembly.
Collection of entities modeling a particular EDM construct
which can either be all entities of a particular type or
entities participating in a particular relationship.
Base class for EntityCollection and EntityReference
Represents one end of a relationship.
Loads the related object or objects into this related end with the default merge option.
Asynchronously loads the related object or objects into this related end with the default merge option.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
A to observe while waiting for the task to complete.
A task that represents the asynchronous operation.
Loads the related object or objects into the related end with the specified merge option.
The to use when merging objects into an existing
.
Asynchronously loads the related object or objects into the related end with the specified merge option.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
The to use when merging objects into an existing
.
A to observe while waiting for the task to complete.
A task that represents the asynchronous operation.
Adds an object to the related end.
An object to add to the collection. entity must implement
.
Adds an object to the related end.
An object to add to the collection.
Removes an object from the collection of objects at the related end.
true if entity was successfully removed, false if entity was not part of the
.
The object to remove from the collection. entity must implement
.
Removes an object from the collection of objects at the related end.
true if entity was successfully removed; false if entity was not part of the
.
An object to remove from the collection.
Defines a relationship between two attached objects.
The object being attached. entity must implement
.
Defines a relationship between two attached objects.
The object being attached.
Returns an that represents the objects that belong to the related end.
An that represents the objects that belong to the related end.
Returns an that iterates through the collection of related objects.
An that iterates through the collection of related objects.
Gets a value that indicates whether all related objects have been loaded.
true if the related end contains all the related entities from the database; otherwise, false.
Gets the name of the relationship in which this related end participates.
The name of the relationship in which this is participating. The relationship name is not namespace qualified.
Gets the role name at the source end of the relationship.
The role name at the source end of the relationship.
Gets the role name at the target end of the relationship.
The role name at the target end of the relationship.
Returns a reference to the metadata for the related end.
A object that contains metadata for the end of a relationship.
The default constructor is required for some serialization scenarios with EntityReference.
Note that this field should no longer be used directly. Instead, use the _wrappedOwner
field. This field is retained only for compatibility with the serialization format introduced in v1.
Returns an that represents the objects that belong to the related end.
An that represents the objects that belong to the related end.
This is the query which represents the source of the
related end. It is constructed on demand using the
_connection and _cache fields and a query string based on
the type of related end and the metadata passed into its
constructor indicating the particular EDM construct the
related end models. This method is called by both subclasses of this type
and those subclasses pass in their generic type parameter in order
to produce an ObjectQuery of the right type. This allows this common
functionality to be implemented here in the base class while still
allowing the base class to be non-generic.
MergeOption to use when creating the query
Indicates whether the query can produce results. For instance, a lookup with null key values cannot produce results.
The query loading related entities.
Validates that a call to Load has the correct conditions
This helps to reduce the complexity of the Load call (SQLBU 524128)
See RelatedEnd.CreateSourceQuery method. This is returned here so we can create it and validate the state before returning it to the caller
Loads the related object or objects into the related end with the default merge option.
When the source object was retrieved by using a query
and the is not
or the related objects are already loaded
or when the source object is not attached to the
or when the source object is being tracked but is in the
or state
or the
used for
is .
Asynchronously loads the related object or objects into the related end with the default merge option.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
A to observe while waiting for the task to complete.
A task that represents the asynchronous operation.
When the source object was retrieved by using a query
and the is not
or the related objects are already loaded
or when the source object is not attached to the
or when the source object is being tracked but is in the
or state
or the
used for
is .
Loads an object or objects from the related end with the specified merge option.
The to use when merging objects into an existing
.
When the source object was retrieved by using a query
and the
is not
or the related objects are already loaded
or when the source object is not attached to the
or when the source object is being tracked but is in the
or state
or the
used for
is .
Asynchronously loads an object or objects from the related end with the specified merge option.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
The to use when merging objects into an existing
.
A to observe while waiting for the task to complete.
A task that represents the asynchronous operation.
When the source object was retrieved by using a query
and the
is not
or the related objects are already loaded
or when the source object is not attached to the
or when the source object is being tracked but is in the
or state
or the
used for
is .
Takes a list of related entities and merges them into the current collection.
Entities to relate to the owner of this EntityCollection
MergeOption to use when updating existing relationships
Indicates whether IsLoaded should be set to true after the Load is complete. Should be false in cases where we cannot guarantee that the set of entities is complete and matches the server, such as Attach.
Attaches an entity to the related end. This method works in exactly the same way as Attach(object).
It is maintained for backward compatibility with previous versions of IRelatedEnd.
The entity to attach to the related end
Thrown when
is null.
Thrown when the entity cannot be related via the current relationship end.
Attaches an entity to the related end. If the related end is already filled
or partially filled, this merges the existing entities with the given entity. The given
entity is not assumed to be the complete set of related entities.
Owner and all entities passed in must be in Unchanged or Modified state.
Deleted elements are allowed only when the state manager is already tracking the relationship
instance.
The entity to attach to the related end
Thrown when
is null.
Thrown when the entity cannot be related via the current relationship end.
Adds an entity to the related end. This method works in exactly the same way as Add(object).
It is maintained for backward compatibility with previous versions of IRelatedEnd.
Entity instance to add to the related end
Adds an entity to the related end. If the owner is
attached to a cache then the all the connected ends are
added to the object cache and their corresponding relationships
are also added to the ObjectStateManager. The RelatedEnd of the
relationship is also fixed.
Entity instance to add to the related end
Removes an entity from the related end. This method works in exactly the same way as Remove(object).
It is maintained for backward compatibility with previous versions of IRelatedEnd.
Entity instance to remove from the related end
Returns true if the entity was successfully removed, false if the entity was not part of the RelatedEnd.
Removes an entity from the related end. If owner is
attached to a cache, marks relationship for deletion and if
the relationship is composition also marks the entity for deletion.
Entity instance to remove from the related end
Returns true if the entity was successfully removed, false if the entity was not part of the RelatedEnd.
Adds the current RelatedEnd object to the navigation property if compatible.
The other related end.
Specifies whether the cached foreign key is conceptual null.
true if the cached foreign key is conceptual null; otherwise, false.
Updates the dependent end foreign keys.
The dependent end foreign keys.
The target related end.
true to force foreign key changes; otherwise, false.
Verifies the detached key matches.
The entity keys.
Returns true if this Related end represents the dependent of a Referential Constraint
If true then the method will only return true if the Referential Constraint is identifying
Check if current RelatedEnd is a Principal end of some Referential Constraint and if some of the "from" properties is not-nullable
Returns an that iterates through the collection of related objects.
An that iterates through the collection of related objects.
Set the context and load options so that Query can be constructed on demand.
Validated the detached entity keys associated with the related end.
Clear the source and context.
Used internally to deserialize entity objects along with the
instances.
The serialized stream.
Occurs when a change is made to a related end.
internal event to notify change in collection
This class describes a relationship navigation from the
navigation property on one entity to another entity.
RelationshipNavigation uniquely identify a relationship type.
The RelationshipNavigation class is internal only, so this property is also internal.
See RelationshipName, SourceRoleName, and TargetRoleName for the public exposure
of the information contained in this RelationshipNavigation.
Gets the name of the relationship in which this related end participates.
The name of the relationship in which this participates. The relationship name is not namespace qualified.
Gets the role name at the source end of the relationship.
A that is the role name.
Gets the role name at the target end of the relationship.
A that is the role name.
Gets a reference to the metadata for the related end.
A object that contains metadata for the end of a relationship.
Gets a value that indicates whether all related objects have been loaded.
true if the related end contains all the related objects from the database; otherwise, false.
Initializes a new instance of the class.
Returns the collection as an used for data binding.
An of entity objects.
Loads related objects into the collection, using the specified merge option.
Specifies how the objects in this collection should be merged with the objects that might have been returned from previous queries against the same
.
Defines relationships between an object and a collection of related objects in an object context.
Loads related entities into the local collection. If the collection is already filled
or partially filled, merges existing entities with the given entities. The given
entities are not assumed to be the complete set of related entities.
Owner and all entities passed in must be in Unchanged or Modified state. We allow
deleted elements only when the state manager is already tracking the relationship
instance.
Collection of objects in the object context that are related to the source object.
entities collection is null.
The source object or an object in the entities collection is null or is not in an
or state.-or-The relationship cannot be defined based on the EDM metadata. This can occur when the association in the conceptual schema does not support a relationship between the two types.
Defines a relationship between two attached objects in an object context.
The object being attached.
When the entity is null.
When the entity cannot be related to the source object. This can occur when the association in the conceptual schema does not support a relationship between the two types.-or-When either object is null or is not in an
or state.
Requires: collection is null or contains related entities.
Loads related entities into the local collection.
If null, retrieves entities from the server through a query; otherwise, loads the given collection
Adds an object to the collection.
An object to add to the collection. entity must implement
.
entity is null.
Add the item to the underlying collection
Remove the item from the underlying collection
Removes an object from the collection and marks the relationship for deletion.
true if item was successfully removed; otherwise, false.
The object to remove from the collection.
entity object is null.
The entity object is not attached to the same object context.-or-The entity object does not have a valid relationship manager.
True if the verify succeeded, False if the Add should no-op
Remove from the RelatedEnd
Remove from the POCO collection
Returns an enumerator that is used to iterate through the objects in the collection.
An that iterates through the set of values cached by
.
Returns an enumerator that is used to iterate through the set of values cached by
.
An that iterates through the set of values cached by
.
Removes all entities from the collection.
Determines whether a specific object exists in the collection.
true if the object is found in the ; otherwise, false.
The object to locate in the .
Copies all the contents of the collection to an array, starting at the specified index of the target array.
The array to copy to.
The zero-based index in the array at which copying begins.
Used internally to serialize entity objects.
The streaming context.
Used internally to deserialize entity objects.
The streaming context.
Returns an object query that, when it is executed, returns the same set of objects that exists in the current collection.
An that represents the entity collection.
When the object is in an state
or when the object is in a
state with a
other than
.
internal Event to notify changes in the collection.
Gets the number of objects that are contained in the collection.
The number of elements that are contained in the
.
Gets a value that indicates whether the
is read-only.
Always returns false.
IListSource.ContainsListCollection implementation. Always returns false.
This means that the IList we return is the one which contains our actual data,
it is not a list of collections.
This is the class is the basis for all perscribed EntityObject classes.
Interface that defines an entity containing a key.
Gets or sets the for instances of entity types that implement this interface.
If an object is being managed by a change tracker, it is expected that
IEntityChangeTracker methods EntityMemberChanging and EntityMemberChanged will be
used to report changes on EntityKey. This allows the change tracker to validate the
EntityKey's new value and to verify if the change tracker is in a state where it can
allow updates to the EntityKey.
The for instances of entity types that implement this interface.
Minimum interface that a data class must implement in order to be managed by a change tracker.
Gets or sets the used to report changes.
The used to report changes.
Interface that a data class must implement if exposes relationships
Returns the relationship manager that manages relationships for an instance of an entity type.
Classes that expose relationships must implement this property
by constructing and setting RelationshipManager in their constructor.
The implementation of this property should use the static method RelationshipManager.Create
to create a new RelationshipManager when needed. Once created, it is expected that this
object will be stored on the entity and will be provided through this property.
The for this entity.
Used by the ObjectStateManager to attach or detach this EntityObject to the cache.
Reference to the ObjectStateEntry that contains this entity
Notifies the change tracker that a property change is pending.
The name of the changing property.
property is null.
Notifies the change tracker that a property has changed.
The name of the changed property.
property is null.
This method is called by a ComplexObject contained in this Entity
whenever a change is about to be made to a property of the
ComplexObject so that the change can be forwarded to the change tracker.
The name of the top-level entity property that contains the ComplexObject that is calling this method.
The instance of the ComplexObject on which the property is changing.
The name of the changing property on complexObject.
This method is called by a ComplexObject contained in this Entity
whenever a change has been made to a property of the
ComplexObject so that the change can be forwarded to the change tracker.
The name of the top-level entity property that contains the ComplexObject that is calling this method.
The instance of the ComplexObject on which the property is changing.
The name of the changing property on complexObject.
Gets the entity state of the object.
The of this object.
Gets or sets the key for this object.
The for this object.
Returns the container for the lazily created relationship
navigation property objects, collections and refs.
Helper class used when we are not currently attached to a change tracker.
Simplifies the code so we don't always have to check for null before using the change tracker
This interface is implemented by a change tracker and is used by data classes to report changes
Notifies the change tracker of a pending change to a property of an entity type.
The name of the property that is changing.
Notifies the change tracker that a property of an entity type has changed.
The name of the property that has changed.
Notifies the change tracker of a pending change to a complex property.
The name of the top-level entity property that is changing.
The complex type that contains the property that is changing.
The name of the property that is changing on complex type.
Notifies the change tracker that a property of a complex type has changed.
The name of the complex property of the entity type that has changed.
The complex type that contains the property that changed.
The name of the property that changed on complex type.
Gets current state of a tracked object.
An that is the state of the tracked object.For more information, see Identity Resolution, State Managment, and Change Tracking and Tracking Changes in POCO Entities.
Models a relationship end with multiplicity 1.
The default constructor is required for some serialization scenarios. It should not be used to
create new EntityReferences. Use the GetRelatedReference or GetRelatedEnd methods on the RelationshipManager
class instead.
This method is called when either the EntityKey or the Value property is set to null when it is
already null. For an FK association of a tracked entity the method will attempt to null FKs
thereby deleting the relationship. This may result in conceptual nulls being set.
Takes key values from the given principal entity and transfers them to the foreign key properties
of the dependant entry. This method requires a context, but does not require that either
entity is in the context. This allows it to work in NoTracking cases where we have the context
but we're not tracked by that context.
The entity into which foreign key values will be written
The entity from which key values will be obtained
If non-null, then keeps track of FKs that have already been set such that an exception can be thrown if we find conflicting values
If true, then the property setter is called even if FK values already match, which causes the FK properties to be marked as modified.
Takes key values from the given principal key and transfers them to the foreign key properties
of the dependant entry. This method requires a context, but does not require that either
entity or key is in the context. This allows it to work in NoTracking cases where we have the context
but we're not tracked by that context.
The entity into which foreign key values will be written
The key from which key values will be obtained
Adds to navigation property if compatible.
The related end to add.
Returns whether the foreign key is conceptually null.
This occurs when a relationship is set to null but the foreign key property is a non-nullable CLR type and therefore can't be set to null.
true if the foreign key is conceptually null; otherwise, false.
Updates the foreign key if this is the dependent end of the relationship.
true if they key was updated; otherwise, false.
The target related end.
If true, then the property setter is called even if FK values already match, which causes the FK properties to be marked as modified.
Ensures the detached entity key is valid (not temporary etc.)
Verifies the detached key matches of the entity key.
The key entity.
Attempts to null all FKs associated with the dependent end of this relationship on this entity.
This may result in setting conceptual nulls if the FK is not nullable.
Returns the key for the related object.
Returns the EntityKey of the target entity associated with this EntityReference.
Is non-null in the following scenarios:
(a) Entities are tracked by a context and an Unchanged or Added client-side relationships exists for this EntityReference's owner with the
same RelationshipName and source role. This relationship could have been created explicitly by the user (e.g. by setting
the EntityReference.Value, setting this property directly, or by calling EntityCollection.Add) or automatically through span queries.
(b) If the EntityKey was non-null before detaching an entity from the context, it will still be non-null after detaching, until any operation
occurs that would set it to null, as described below.
(c) Entities are detached and the EntityKey is explicitly set to non-null by the user.
(d) Entity graph was created using a NoTracking query with full span
Is null in the following scenarios:
(a) Entities are tracked by a context but there is no Unchanged or Added client-side relationship for this EntityReference's owner with the
same RelationshipName and source role.
(b) Entities are tracked by a context and a relationship exists, but the target entity has a temporary key (i.e. it is Added) or the key
is one of the special keys
(c) Entities are detached and the relationship was explicitly created by the user.
An that is the key of the related object.
EntityReferences can only deferred load if they are empty
Models a relationship end with multiplicity 1.
Creates a new instance of .
The default constructor is required for some serialization scenarios. It should not be used to
create new EntityReferences. Use the GetRelatedReference or GetRelatedEnd methods on the RelationshipManager
class instead.
Loads the related object for this with the specified merge option.
Specifies how the object should be returned if it already exists in the
.
The source of the is null
or a query returned more than one related end
or a query returned zero related ends, and one related end was expected.
This operation is not allowed if the owner is null
Creates a many-to-one or one-to-one relationship between two objects in the object context.
The object being attached.
When the entity is null.
When the entity cannot be related to the current related end. This can occur when the association in the conceptual schema does not support a relationship between the two types.
True if the verify succeeded, False if the Add should no-op
Disconnected adds are not supported for an EntityReference so we should report this as an error.
The entity to add to the related end in a disconnected state.
Disconnected removes are not supported for an EntityReference so we should report this as an error.
The entity to remove from the related end in a disconnected state.
Remove from the RelatedEnd
Remove from the POCO collection
Creates an equivalent object query that returns the related object.
An that returns the related object.
When the object is in an state
or when the object is in a
state with a
other than .
Take any values in the incoming RelatedEnd and sets them onto the values
that currently exist in this RelatedEnd
This method is used internally to serialize related entity objects.
The serialized stream.
This method is used internally to serialize related entity objects.
The serialized stream.
AddToLocalEnd is used by both APIs a) RelatedEnd.Add b) Value property setter.
ApplyConstraints is true in case of RelatedEnd.Add because one cannot add entity to ref it its already set
however applyConstraints is false in case of Value property setter because value can be set to a new value
even if its non null.
Gets or sets the related object returned by this
.
The object returned by this .
Internal interface used to provide a non-typed way to store a reference to an object
that knows the type and cardinality of the source end of a relationship
Used during relationship fixup when the source end of the relationship is not
yet in the relationships list, and needs to be created
RelationshipNavigation to be set on new RelatedEnd
RelationshipManager to use for creating the new end
Reference to the new collection or reference on the other end of the relationship
Used during relationship fixup when the source end of the relationship is not
yet in the relationships list, and needs to be created
RelationshipNavigation to be set on new RelatedEnd
RelationshipManager to use for creating the new end
Reference to the new collection or reference on the other end of the relationship
Identifies the kind of a relationship
The relationship is an Association
Container for the lazily created relationship navigation
property objects (collections and refs).
For testing.
For testing.
Lazy initialization of the _relationships collection.
Creates a new object.
Used by data classes that support relationships. If the change tracker
requests the RelationshipManager property and the data class does not
already have a reference to one of these objects, it calls this method
to create one, then saves a reference to that object. On subsequent accesses
to that property, the data class should return the saved reference.
The reason for using a factory method instead of a public constructor is to
emphasize that this is not something you would normally call outside of a data class.
By requiring that these objects are created via this method, developers should
give more thought to the operation, and will generally only use it when
they explicitly need to get an object of this type. It helps define the intended usage.
The requested .
Reference to the entity that is calling this method.
Factory method that creates a new, uninitialized RelationshipManager. This should only be
used to create a RelationshipManager for an IEntityWrapper for an entity that does not
implement IEntityWithRelationships. For entities that implement IEntityWithRelationships,
the Create(IEntityWithRelationships) method should be used instead.
The new RelationshipManager
Replaces the existing wrapped owner with one that potentially contains more information,
such as an entity key. Both must wrap the same entity.
Get the collection of entities related to the current entity using the specified
combination of relationship name, source role name, and target role name
Type of the entity in the source role (same as the type of this)
Type of the entity in the target role
CSpace-qualified name of the relationship to navigate
Name of the source role for the navigation. Indicates the direction of navigation across the relationship.
Name of the target role for the navigation. Indicates the direction of navigation across the relationship.
Accessor of the property on the source of the navigation.
Accessor of the property on the target of the navigation.
Multiplicity of the source role. RelationshipMultiplicity.OneToOne and RelationshipMultiplicity.Zero are both accepted for a reference end, and RelationshipMultiplicity.Many is accepted for a collection
Collection of related entities of type TTargetEntity
Re-merge items from collection so that relationship fixup is performed.
Ensure that any items in previous collection are excluded from the re-merge
The previous EntityCollection containing items that have already had fixup performed
The new EntityCollection
Get the entity reference of a related entity using the specified
combination of relationship name, source role name, and target role name
CSpace-qualified name of the relationship to navigate
Name of the source role for the navigation. Indicates the direction of navigation across the relationship.
Name of the target role for the navigation. Indicates the direction of navigation across the relationship.
Accessor of the property on the source of the navigation.
Accessor of the property on the target of the navigation.
Multiplicity of the source role. RelationshipMultiplicity.OneToOne and RelationshipMultiplicity.Zero are both accepted for a reference end, and RelationshipMultiplicity.Many is accepted for a collection
Reference for related entity of type TTargetEntity
Internal version of GetRelatedEnd that works with the o-space navigation property
name rather than the c-space relationship name and end name.
the name of the property to lookup
the related end for the given property
Returns either an or
of the correct type for the specified target role in a relationship.
representing the
or
that was retrieved.
Name of the relationship in which targetRoleName is defined. The relationship name is not namespace qualified.
Target role to use to retrieve the other end of relationshipName .
relationshipName or targetRoleName is null.
The source type does not match the type of the owner.
targetRoleName is invalid or unable to find the relationship type in the metadata.
Takes an existing EntityReference that was created with the default constructor and initializes it using the provided relationship and target role names.
This method is designed to be used during deserialization only, and will throw an exception if the provided EntityReference has already been initialized,
if the relationship manager already contains a relationship with this name and target role, or if the relationship manager is already attached to a ObjectContext.W
The relationship name.
The role name of the related end.
The to initialize.
The type of the being initialized.
When the provided
is already initialized.-or-When the relationship manager is already attached to an
or when the relationship manager already contains a relationship with this name and target role.
Takes an existing EntityCollection that was created with the default constructor and initializes it using the provided relationship and target role names.
This method is designed to be used during deserialization only, and will throw an exception if the provided EntityCollection has already been initialized,
or if the relationship manager is already attached to a ObjectContext.
Type of the entity represented by targetRoleName
Given a relationship name that may or may not be qualified with a namespace name, this method
attempts to lookup a namespace using the entity type that owns this RelationshipManager as a
source and adds that namespace to the front of the relationship name. If the namespace
can't be found, then the relationshipName is returned untouched and the expectation is that
other validations will fail later in the code paths that use this.
This method should only be used at the imediate top-level public surface since all internal
calls are expected to use fully qualified names already.
Trys to get an ObjectItemCollection and returns null if it can;t be found.
Trys to get the EntityType metadata and returns false if it can't be found.
Trys to get an DefaultObjectMappingItemCollection and returns false if it can't be found.
Retrieves the AssociationEndMembers that corespond to the target end of a relationship
given a specific CLR type that exists on the source end of a relationship
Note: this method can be very expensive if this RelationshipManager is not attached to an
ObjectContext because no OSpace Metadata is available
A CLR type that is on the source role of the relationship
The OSpace EntityType that represents this CLR type
Gets an of related objects with the specified relationship name and target role name.
The of related objects.
Name of the relationship to navigate. The relationship name is not namespace qualified.
Name of the target role for the navigation. Indicates the direction of navigation across the relationship.
The type of the returned .
The specified role returned an instead of an
.
Gets the for a related object by using the specified combination of relationship name and target role name.
The of a related object.
Name of the relationship to navigate. The relationship name is not namespace qualified.
Name of the target role for the navigation. Indicates the direction of navigation across the relationship.
The type of the returned .
The specified role returned an instead of an
.
Gets collection or ref of related entity for a particular navigation.
Describes the relationship and navigation direction
Encapsulates information about the other end's type and cardinality, and knows how to create the other end
Factory method for creating new related ends
Type of the source end
Type of the target end
RelationshipNavigation to be set on the new RelatedEnd
Multiplicity of the source role
Multiplicity of the target role
An existing related end to initialize instead of creating a new one
new EntityCollection or EntityReference, depending on the specified target multiplicity
Returns an enumeration of all the related ends managed by the relationship manager.
An of objects that implement
. An empty enumeration is returned when the relationships have not yet been populated.
Called by Object Services to prepare an for binary serialization with a serialized relationship.
Describes the source and destination of a given serialized stream, and provides an additional caller-defined context.
Add the rest of the graph, attached to this owner, to ObjectStateManager
if TRUE, the rest of the graph is attached directly as Unchanged without calling AcceptChanges()
Traverse the relationships and find all the dependent ends that contain FKs, then attempt
to null all of those FKs.
Used internally to deserialize entity objects along with the
instances.
The serialized stream.
Searches the list of relationships for an entry with the specified relationship name and role names
CSpace-qualified name of the relationship
name of the target role
the RelatedEnd if found, otherwise null
true if the entry found, false otherwise
Helper method to validate consistency of RelationshipManager instances
entity to compare against
True if entity is the owner of this RelationshipManager, otherwise false
Calls AttachContext on each RelatedEnd referenced by this manager.
Calls AttachContext on each RelatedEnd referenced by this manager and also on all the enties
referenced by that related end.
Calls DetachContext on each RelatedEnd referenced by this manager.
Returns a defensive copy of all the known relationships. The copy is defensive because
new items may get added to the collection while the caller is iterating over it. Without
the copy this would cause an exception for concurrently modifying the collection.
this flag is used to keep track of nodes which have
been visited. Currently used for Exclude operation.
Provides access to the entity that owns this manager in its wrapped form.
This class describes a relationship navigation from the
navigation property on one entity to another entity. It is
used throughout the collections and refs system to describe a
relationship and to connect from the navigation property on
one end of a relationship to the navigation property on the
other end.
Creates a navigation object with the given relationship
name, role name for the source and role name for the
destination.
Canonical-space name of the relationship.
Name of the role which is the source of the navigation.
Name of the role which is the destination of the navigation.
The navigation property which is the source of the navigation.
The navigation property which is the destination of the navigation.
Compares this instance to a given Navigation by their values.
Returns a value-based hash code.
the hash value of this Navigation
ToString is provided to simplify debugging, etc.
Canonical-space relationship name.
Role name for the source of this navigation.
Role name for the destination of this navigation.
Navigation property name for the destination of this navigation.
NOTE: There is not a FromPropertyAccessor property on RelationshipNavigation because it is not currently accessed anywhere
It is only used to calculate the "reverse" RelationshipNavigation.
The "reverse" version of this navigation.
ObjectView that provides binding to a list of data records.
This class provides an implementation of ITypedList that returns property descriptors
for each column of results in a data record.
Manages a list suitable for data binding.
The type of elements in the binding list.
This class provides an implementation of IBindingList that exposes a list of elements to be bound, provides a mechanism to change the membership of the list, and events to notify interested objects when the membership of the list is modified or an element in the list is modified.
ObjectView relies on an object that implements IObjectViewData to manage the binding list. See the documentation for IObjectViewData for details.
Specifies whether events handled from an underlying collection or individual bound item
should result in list change events being fired from this IBindingList.
True to prevent events from being fired from this IBindingList;
otherwise false to allow events to propogate.
Object that listens for underlying collection or individual bound item changes,
and notifies this object when they occur.
Index of last item added via a call to IBindingList.AddNew.
Object that maintains the underlying bound list,
and specifies the operations allowed on that list.
Construct a new instance of ObjectView using the supplied IObjectViewData and event data source.
Object that maintains the underlying bound list, and specifies the operations allowed on that list.
Event source to "attach" to in order to listen to collection and item changes.
If a new item has been added to the list, and is the position of that item,
remove it from the list and cancel the add operation.
Index of item to be removed as a result of the cancellation of a previous addition.
Commit a new item to the binding list.
Index of item to be committed. This index must match the index of the item created by the last call to IBindindList.AddNew; otherwise this method is a nop.
Handle a change in the underlying collection bound by this ObjectView.
The source of the event.
Event arguments that specify the type of modification and the associated item.
Get item at the specified index.
The zero-based index of the element to get or set.
This strongly-typed indexer is used by the data binding in WebForms and ASP.NET
to determine the Type of elements in the bound list.
The list of properties available for binding can then be determined from that element Type.
Cache of the property descriptors for the element type of the root list wrapped by ObjectView.
EDM RowType that describes the shape of record elements.
Return a instance that represents
a strongly-typed indexer property on the specified type.
that may define the appropriate indexer.
instance of indexer defined on supplied type that returns an object of any type but
; or null if no such indexer is defined on the supplied type.
The algorithm here is lifted from System.Windows.Forms.ListBindingHelper,
from the GetTypedIndexer method.
The Entity Framework could not take a dependency on WinForms,
so we lifted the appropriate parts from the WinForms code here.
Not the best, but much better than guessing as to what algorithm is proper for data binding.
Return the element type for the supplied type.
If represents a list type that doesn't also implement ITypedList or IListSource, return the element type for items in that list. Otherwise, return the type supplied by
.
The algorithm here is lifted from System.Windows.Forms.ListBindingHelper,
from the GetListItemType(object) method.
The Entity Framework could not take a dependency on WinForms,
so we lifted the appropriate parts from the WinForms code here.
Not the best, but much better than guessing as to what algorithm is proper for data binding.
Class describing a LINQ parameter and its bound expression. For instance, in
products.Select(p => p.ID)
the 'products' query is the bound expression, and 'p' is the parameter.
Class containing binding information for an expression converter (associating CQT bindings
with LINQ lambda parameter or LINQ sub-expressions)
Usage 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();
Initialize a new binding context
Set up a new binding scope where parameter expressions map to their paired CQT expressions.
DbExpression/LinqExpression binding
Removes a scope when leaving a particular sub-expression.
Models a compiled Linq to Entities ObjectQuery
Models a Linq to Entities ObjectQuery
An instance of a class derived from ObjectQueryState is used to model every instance of
.
A different ObjectQueryState-derived class is used depending on whether the ObjectQuery is an Entity SQL,
Linq to Entities, or compiled Linq to Entities query.
The that should be used in the absence of an explicitly specified
or user-specified merge option or a merge option inferred from the query definition itself.
Generic MethodInfo used in the non-generic CreateQuery
The context of the ObjectQuery
The element type of this query, as a CLR type
The collection of parameters associated with the ObjectQuery
The full-span specification
The user-specified default merge option
Indicates whether query caching is enabled for the implemented ObjectQuery.
Optionally used by derived classes to record the most recently used .
Constructs a new instance that uses the specified context and parameters collection.
The ObjectContext to which the implemented ObjectQuery belongs
Constructs a new copying the state information from the specified
.
The element type of the implemented ObjectQuery, as a CLR type.
The ObjectQuery from which the state should be copied.
Sets the values the and properties on
to match the values of the corresponding properties on this instance.
The query state to which this instances settings should be applied.
Must return true and set to a valid value
if command text is available for this query; must return false otherwise.
Implementations of this method must not throw exceptions.
The command text of this query, if available.
true if command text is available for this query and was successfully retrieved; otherwise false .
Must return true and set to a valid value if a
LINQ Expression is available for this query; must return false otherwise.
Implementations of this method must not throw exceptions.
The LINQ Expression that defines this query, if available.
true if an Expression is available for this query and was successfully retrieved; otherwise false .
Retrieves an that can be used to retrieve the results of this query using the specified merge option.
If is null, an appropriate default value will be used.
The merge option which should be supported by the returned execution plan
an execution plan capable of retrieving the results of this query using the specified merge option
Must returns a new ObjectQueryState instance that is a duplicate of this instance and additionally contains the specified Include path in its
.
The element type of the source query on which Include was called
The source query on which Include was called
The new Include path to add
Must returns an ObjectQueryState that is a duplicate of this instance and additionally contains the specified Include path
Retrieves the result type of the query in terms of C-Space metadata. This method is called once, on-demand, if a call
to cannot be satisfied using cached type metadata or a currently cached execution plan.
Must return a that describes the result typeof this query in terms of C-Space metadata
Helper method to return the first non-null merge option from the specified nullable merge options,
or the if the value of all specified nullable merge options is null.
The available nullable merge option values, in order of decreasing preference
the first non-null merge option; or the default merge option if the value of all
is null
Helper method to return the first non-null merge option from the specified nullable merge options.
The available nullable merge option values, in order of decreasing preference
the first non-null merge option; or null if the value of all is null
Helper method to create a new ObjectQuery based on this query state instance.
A new - typed as
Helper method used to create an ObjectQuery based on an underlying ObjectQueryState instance.
This method must be public to be reliably callable from using reflection.
Shouldn't be named CreateQuery to avoid ambiguity with reflection.
The required element type of the new ObjectQuery
A new ObjectQuery based on the specified query state, with the specified element type
Gets the element type - the type of each result item - for this query as a CLR type instance.
Gets the ObjectContext with which the implemented ObjectQuery is associated
Gets the collection of parameters associated with the implemented ObjectQuery. May be null.
Call if a guaranteed non-null collection is required.
Gets the Span specification associated with the implemented ObjectQuery. May be null.
The merge option that this query considers currently 'in effect'. This may be a merge option set via the ObjectQuery.MergeOption
property, or the merge option that applies to the currently cached execution plan, if any, or the global default merge option.
Gets or sets a value indicating which should be used when preparing this query for execution via
if no option is explicitly specified - for example during foreach-style enumeration.
sets this property on its underlying query state instance.
Gets or sets a user-defined value indicating whether or not query caching is enabled for the implemented ObjectQuery.
Gets the result type - not just the element type - for this query as an EDM Type usage instance.
Constructs a new instance based on the specified Linq Expression
against the specified ObjectContext.
The element type of the implemented ObjectQuery, as a CLR type.
The ObjectContext with which the implemented ObjectQuery is associated.
The Linq Expression that defines this query.
Constructs a new instance based on the specified Linq Expression,
copying the state information from the specified ObjectQuery.
The element type of the implemented ObjectQuery, as a CLR type.
The ObjectQuery from which the state information should be copied.
The Linq Expression that defines this query.
Returns a new ObjectQueryState instance with the specified navigation property path specified as an Include span.
For eLINQ queries the Include operation is modelled as a method call expression applied to the source ObectQuery,
so the property is always null on the returned instance.
The element type of the resulting query
The ObjectQuery on which Include was called; required to build the new method call expression
The new Include path
A new ObjectQueryState instance that incorporates the Include path, in this case a new method call expression
eLINQ queries do not have command text. This method always returns false.
Always set to null
Always returns false
Gets the LINQ Expression that defines this query for external (of ObjectQueryState) use.
Note that the property is used, which is overridden by compiled eLINQ
queries to produce an Expression tree where parameter references have been replaced with constants.
The LINQ expression that describes this query
Always returns true
Creates a new compiled query state instance
The element type of the new instance (the 'T' of the ObjectQuery < T > that the new state instance will back)"
The object context with which the new instance should be associated
The compiled query definition, as a
The cache token to use when retrieving or storing the new instance's execution plan in the query cache
The values passed into the CompiledQuery delegate
Overrides GetResultType and attempts to first retrieve the result type from the cache entry.
The query result type from this compiled query's cache entry, if possible; otherwise defers to
Overrides CreateExpressionConverter to return a converter that uses a binding context based on the compiled query parameters,
rather than a default binding context.
An expression converter appropriate for converting this compiled query state instance
Gets a LINQ expression that defines this query.
This is overridden to remove parameter references from the underlying expression,
producing an expression that contains the values of those parameters as s.
Replaces ParameterExpresion with ConstantExpression
to make the expression usable as a donor expression
Class supporting conversion of LINQ expressions to EDM CQT expressions.
Gets the name of the key column appearing in ELinq GroupBy projections
Gets the name of the group column appearing in ELinq CQTs (used in GroupBy expressions)
Gets the name of the parent column appearing in ELinq EntityCollection projections
Gets the name of the children column appearing in ELinq EntityCollection projections
The Edm namespace name, used for canonical functions
Adds a new mapping from DbExpression => Span information for the specified expression,
after first ensuring that the mapping dictionary has been instantiated.
The expression for which Span information should be added
The Span information, which may be null . If null , no attempt is made to update the dictionary of span mappings.
The original argument, to allow return AddSpanMapping(expression, span) scenarios
Attempts to retrieve Span information for the specified DbExpression.
The expression for which Span information should be retrieved.
Will contain the Span information for the specified expression if it is present in the Span mapping dictionary.
true if Span information was retrieved for the specified expression and now contains this information; otherwise false .
Removes the Span mapping entry for the specified expression,
and creates a new entry for the specified expression that maps
to the expression's original Span information. If no Span
information is present for the specified expression then no
changes are made to the Span mapping dictionary.
The expression from which to take Span information
The expression to which the Span information should be applied
Unifies the Span information from the specified and
expressions, and applies it to the specified expression. Unification proceeds
as follows:
- If neither nor have Span information, no changes are made
- If one of or has Span information, that single Span information
entry is removed from the Span mapping dictionary and used to create a new entry that maps from the
expression to the Span information.
- If both and have Span information, both entries are removed
from the Span mapping dictionary, a new Span is created that contains the union of the original Spans, and
a new entry is added to the dictionary that maps from expression to this new Span.
The first expression argument
The second expression argument
The result expression
Gets the target type for a CQT cast operation.
Appropriate type usage, or null if this is a "no-op"
Check that the given cast specification is supported and if necessary adjust target type (for instance
add precision and scale for Integral -> Decimal casts)
Determines if an instance of fromType can be assigned to an instance of toType using
CLR semantics. in case of primitive type, it must rely on identity since unboxing primitive requires
exact match. for nominal types, rely on subtyping.
Gets the target type for an Is or As expression.
Type of operation; used in error reporting.
Test or return type.
Input type in CLR metadata.
Appropriate target type usage.
Utility method validating type for comparison ops (isNull, equals, etc.).
Only primitive types, entity types, and simple row types (no IGrouping/EntityCollection) are
supported.
Describe type for exception message.
Creates an implementation of IsNull. Throws exception when operand type is not supported.
Creates an implementation of equals using the given pattern. Throws exception when argument types
are not supported for equals comparison.
Helper method for String.StartsWith, String.EndsWith and String.Contains
object.Method(argument), where Method is one of String.StartsWith, String.EndsWith or
String.Contains is translated into:
1) If argument is a constant or parameter and the provider supports escaping:
object like ("%") + argument1 + ("%"), where argument1 is argument escaped by the provider
and ("%") are appended on the begining/end depending on whether
insertPercentAtStart/insertPercentAtEnd are specified
2) Otherwise:
object.Method(argument) -> defaultTranslator
Should '%' be inserted at the begining of the pattern
Should '%' be inserted at the end of the pattern
The delegate that provides the default translation
The translation
Prepare the given input patternValue into a pattern to be used in a LIKE expression by
first escaping it by the provider and then appending "%" and the beginging/end depending
on whether insertPercentAtStart/insertPercentAtEnd is specified.
Translates the arguments into DbExpressions
and creates a canonical function with the given functionName and these arguments
Should represent a non-aggregate canonical function
Passed only for error handling purposes
Creates a canonical function with the given name and the given arguments
Should represent a non-aggregate canonical function
Passed only for error handling purposes
Finds a canonical function with the given functionName and argumentTypes
Finds a function with the given namespaceName, functionName and argumentTypes
Helper method for FindFunction
Helper method for FindCanonicalFunction
Translates System.Linq.Expression.MethodCallExpression to System.Data.Entity.Core.Common.CommandTrees.DbExpression
Tries to get a translator for the given method info.
If the given method info corresponds to a Visual Basic property,
it also initializes the Visual Basic translators if they have not been initialized
Tries to check whether there is an alternative method suggested insted of the given unsupported one.
Initializes the dictionary of alternative methods.
Currently, it simply initializes an empty dictionary.
Populates the dictionary of alternative methods with the VB methods
Recursively rewrite the argument expression to unwrap any "structured" set sources
using ExpressionCoverter.NormalizeSetSource(). This is currently required for IGrouping
and EntityCollection as argument types to functions.
NOTE: Changes made to this function might have to be applied to ExpressionCoverter.NormalizeSetSource() too.
Removes casts where possible, for example Cast from a Reference type to Object type
Handles nested converts recursively. Removing no-op casts is required to prevent the
expression converter from complaining.
Checks if the return type specified by the call expression matches that expected by the
function definition. Performs a recursive check in case of Collection type.
DbFunctionExpression for the function definition
Return type expected by the function definition
LINQ MethodCallExpression
Return type specified by the call
Indicates if current call is for an Element of a Collection type
DbFunctionExpression with aligned return types
A context-sensitive DbExpression builder class that simulates order preservation
for operators (project, filter, oftype, skip and limit) that are not natively order
preserving. The builder simulates order preservation by 'lifting' order keys in
the expression tree. For instance, source.Sort(o).Where(f) is rewritten as
source.Where(f).Sort(o) since otherwise the sort keys would be ignored.
In general, the lifter works as follows:
- The input to the operator is matched against a series of patterns for intrinsically
ordered expressions.
- For each pattern, the lifter encodes the compensation required for each of the
lifting operators that can be applied.
Returns a lifter instance which supports lifting the intrinsic order of the given
source expression across specific operations (filter, project, oftype, skip, and limit)
Lifting only occurs for expressions that are ordered. Each of the nested
OrderByLifterBase class implementations represents one or two of the ordered patterns with
the exception of the PassthroughOrderByLifter. The latter class represents expressions
without intrinsic order that therefore require no lifting.
Represents an expression of the form: source.Skip(k, o).Limit(k2)
Represents an expression of the form: source.Sort(o).Limit(k)
Represents an expression of the form: source.Skip(k, o).Limit(k2).Project(p)
This class is also used to represent expressions of the form: source.Skip(k, o).Project(p).Limit(k).
As a result, the rewrites must be spelled out entirely (the implementation cannot assume that
_limit exists in a particular position in the tree)
Represents an expression of the form: source.Sort(o).Limit(k).Project(p)
This class is also used to represent expressions of the form: source.Sort(o).Project(p).Limit(k).
As a result, the rewrites must be spelled out entirely (the implementation cannot assume that
_limit exists in a particular position in the tree)
Represents an expression of the form: source.Skip(k, o).Project(p)
Represents an expression of the form: source.Skip(k, o)
Represents an expression of the form: source.Sort(o).Project(p)
Represents an expression for which there is an explicit order by: source.Sort(o)
Used for sources that do not have any intrinsic order.
Tries to get a translator for the given property info.
If the given property info corresponds to a Visual Basic property,
it also initializes the Visual Basic translators if they have not been initialized
This method is used to determine whether client side evaluation should be done,
if the property can be evaluated in the store, it is not being evaluated on the client
Facet encapsulating information necessary to initialize a LINQ projection
result.
Requires: other has the same type as this and refers to the same CLR type
Determine whether this Metadata is compatible with the other based on record layout.
Produces an expression initializing an instance of ClrType (given emitters for input
columns)
Yields expected types for input columns. Null values are returned for children
whose type is irrelevant to the initializer.
return a list of propertyReader expressions from an array of translator results.
Implementation of IGrouping that can be initialized using the standard
initializer pattern supported by ELinq
Type of key
Type of record
Metadata for grouping initializer.
Metadata for anonymous type materialization.
Metadata for standard projection initializers.
Metadata for entity collection initializer.
Make sure the other metadata instance generates the same property
(otherwise, we get incorrect behavior where multiple nav props return
the same type)
A LINQ expression corresponding to a query parameter.
Gets the current value of the parameter given (optional) compiled query arguments.
Create QueryParameterExpression based on this one, but with the funcletized expression
wrapped by the given method
Gets the parameter reference for the parameter.
Determines which leaves of a LINQ expression tree should be evaluated locally before
sending a query to the store. These sub-expressions may map to query parameters (e.g. local variables),
to constants (e.g. literals 'new DateTime(2008, 1, 1)') or query sub-expression
(e.g. 'context.Products'). Parameter expressions are replaced with QueryParameterExpression
nodes. All other elements are swapped in place with either expanded expressions (for sub-queries)
or constants. Where the expression includes mutable state that may influence the translation
to a query, a Func(Of Boolean) delegate is returned indicating when a recompilation is necessary.
Performs funcletization on the given expression. Also returns a delegates that can be used
to determine if the entire tree needs to be recompiled.
Replaces context parameter (e.g. 'ctx' in CompiledQuery.Compile(ctx => ctx.Products)) with constant
containing the object context.
Returns a function indicating whether the given expression and all of its children satisfy the
'localCriterion'.
Determines whether the node may be evaluated locally and whether
it is a constant. Assumes that all children are also client expressions.
Determines whether the node may be evaluated locally and whether
it is a variable. Assumes that all children are also variable client expressions.
Determines whether the node may be evaluated as a compiled query parameter.
Assumes that all children are also eligible compiled query parameters.
Determine whether the given CLR type is legal for an ObjectParameter or constant
DbExpression.
Creates the next available parameter name.
Walks the expression tree and replaces client-evaluable expressions with constants
or QueryParameterExpressions.
Returns a delegate indicating (when called) whether a change has been identified
requiring a complete recompile of the query.
Compiles a delegate returning the value of the given expression.
Inlines a funcletizable expression. Queries and lambda expressions are expanded
inline. All other values become simple constants.
Gets the appropriate LINQ expression for an inline ObjectQuery instance.
Replaces expression patterns produced by the compiler with approximations
used in query translation. For instance, the following VB code:
x = y
becomes the expression
Equal(MethodCallExpression(Microsoft.VisualBasic.CompilerServices.Operators.CompareString(x, y, False), 0)
which is normalized to
Equal(x, y)
Comment convention:
CODE(Lang): _VB or C# coding pattern being simplified_
ORIGINAL: _original LINQ expression_
NORMALIZED: _normalized LINQ expression_
If we encounter a MethodCallExpression, we never need to lift to lift to null. This capability
exists to translate certain patterns in the language. In this case, the user (or compiler)
has explicitly asked for a method invocation (at which point, lifting can no longer occur).
Gets a dictionary mapping from LINQ expressions to matched by those expressions. Used
to identify composite expression patterns.
Handle binary patterns:
- VB 'Is' operator
- Compare patterns
CODE: x
ORIGINAL: Convert(x, typeof(object))
ORIGINAL(Funcletized): Constant(x, typeof(object))
NORMALIZED: x
Returns true if the given expression is a constant '0'.
Handles MethodCall patterns:
- Operator overloads
- VB operators
Identifies and normalizes any predicate argument in the given call expression. If no changes
are needed, returns the existing expression. Otherwise, returns a new call expression
with a normalized predicate argument.
Determines whether the given call expression has a 'predicate' argument (e.g. Where(source, predicate))
and returns the ordinal for the predicate.
Obviously this method will need to be replaced if we ever encounter a method with multiple predicates.
Determines whether the given expression of the form Lambda(Coalesce(left, Constant(false)), ...), a pattern
introduced by the VB compiler for predicate arguments. Returns the 'normalized' version of the expression
Lambda((bool)left, ...)
This method exists solely to support creation of valid relational operator LINQ expressions that are not natively supported
by the CLR (e.g. String > String). This method must not be invoked.
Create an operator relating 'left' and 'right' given a relational operator.
Try to create an operator relating 'left' and 'right' using the given operator. If the given operator
does not define a known relation, returns false.
CODE(C#): Class.Compare(left, right)
ORIGINAL: MethodCallExpression(Compare, left, right)
NORMALIZED: Condition(Equal(left, right), 0, Condition(left > right, 1, -1))
Why is this an improvement? We know how to evaluate Condition in the store, but we don't
know how to evaluate MethodCallExpression... Where the CompareTo appears within a larger expression,
e.g. left.CompareTo(right) > 0, we can further simplify to left > right (we register the "ComparePattern"
to make this possible).
Encapsulates an expression matching some pattern.
Gets pattern kind.
Gets pattern kind.
Matches expression of the form x.CompareTo(y) or Class.CompareTo(x, y)
Gets left-hand argument to Compare operation.
Gets right-hand argument to Compare operation.
LINQ query provider implementation.
Constructs a new provider with the given context. This constructor can be
called directly when initializing ObjectContext or indirectly when initializing
ObjectQuery.
The ObjectContext of the provider.
Constructs a new provider with the given ObjectQuery. This ObjectQuery instance
is used to transfer state information to the new ObjectQuery instance created using
the private CreateQuery method overloads.
Creates a new query from an expression.
The element type of the query.
Expression forming the query.
A new instance.
Provides an untyped method capable of creating a strong-typed ObjectQuery
(based on the argument) and returning it as an
instance of the untyped (in a generic sense) ObjectQuery base class.
The LINQ expression that defines the new query
The result type of the new ObjectQuery
A new , as an instance of ObjectQuery
Creates a new query instance using the given LINQ expresion.
The current query is used to produce the context for the new query, but none of its logic
is used.
Element type for query result.
LINQ expression forming the query.
ObjectQuery implementing the expression logic.
Executes the given LINQ expression returning a single value, or null if the query yields
no results. If the return type is unexpected, raises a cast exception.
The current query is used to produce the context for the new query, but none of its logic
is used.
Type of returned value.
Expression to evaluate.
Single result from execution.
Creates a new query instance using the given LINQ expresion.
The current query is used to produce the context for the new query, but none of its logic
is used.
Expression forming the query.
ObjectQuery instance implementing the given expression.
Executes the given LINQ expression returning a single value, or null if the query yields
no results.
The current query is used to produce the context for the new query, but none of its logic
is used.
Expression to evaluate.
Single result from execution.
Uses an expression-specific 'materialization' function to produce
a singleton result from an IEnumerable query result. The function
used depends on the semantics required by the expression that is
the root of the query. First, FirstOrDefault and SingleOrDefault are
currently handled as special cases, and the default behavior is to
use the Enumerable.Single materialization pattern.
The expected result type and the required element type of the IEnumerable collection
The query result set
The expression that is the root of the LINQ query expression tree
An instance of TResult if evaluation of the expression-specific singleton-producing function is successful
Static utility class for identifying methods in Queryable, Sequence, and IEnumerable
and
Identifies methods as instances of known sequence operators.
Method info to identify
Identified sequence operator
true if method is known; false otherwise
Identifies method call expressions as calls to known sequence operators.
Expression that may represent a call to a known sequence method
If true , and the argument is a LambdaExpression, the Body of the LambdaExpression argument will be retrieved, and that expression will then be examined for a sequence method call instead of the Lambda itself.
Identified sequence operator
true if is a and its target method is known; false otherwise
Looks up some implementation of a sequence method.
Sequence method to find
Known method
true if some method is found; false otherwise
Requires:
- no collisions on type names
- no output or reference method parameters
Produces a string description of a method consisting of the name and all parameters,
where all generic type parameters have been substituted with number identifiers.
Method to identify.
Canonical description of method (suitable for lookup)
Returns all static methods in the Queryable and Enumerable classes.
Enumeration of known extension methods
Static utility class. Replica of query\DLinq\TypeSystem.cs
Resolves MemberInfo to a property or field.
Member to test.
Name of member.
Type of member.
Given member normalized as a property or field.
Represents either a entity, entity stub or relationship
For testing.
Gets the updatable version of original values of the object associated with this
.
The updatable original values of object data.
Accepts the current values as original values.
Marks an entity as deleted.
Returns the names of an object’s properties that have changed since the last time
was called.
An collection of names as string.
Sets the state of the object or relationship to modify.
If State is not Modified or Unchanged
Marks the specified property as modified.
The name of the property.
If State is not Modified or Unchanged
Rejects any changes made to the property with the given name since the property was last loaded, attached, saved, or changes were accepted. The orginal value of the property is stored and the property will no longer be marked as modified.
The name of the property to change.
Uses DetectChanges to determine whether or not the current value of the property with the given name is different from its original value. Note that this may be different from the property being marked as modified since a property which has not changed can still be marked as modified.
true if the property has changed; otherwise, false.
The name of the property.
Changes state of the entry to the specified value.
The value to set for the
property of the entry.
Sets the current values of the entry to match the property values of a supplied object.
The detached object that has updated values to apply to the object. currentEntity can also be the object’s entity key.
Sets the original values of the entry to match the property values of a supplied object.
The detached object that has original values to apply to the object. originalEntity can also be the object’s entity key.
Used to report that a scalar entity property is about to change
The current value of the specified property is cached when this method is called.
The name of the entity property that is changing
Used to report that a scalar entity property has been changed
The property value that was cached during EntityMemberChanging is now
added to OriginalValues
The name of the entity property that has changing
Used to report that a complex property is about to change
The current value of the specified property is cached when this method is called.
The name of the top-level entity property that is changing
The complex object that contains the property that is changing
The name of the property that is changing on complexObject
Used to report that a complex property has been changed
The property value that was cached during EntityMemberChanging is now added to OriginalValues
The name of the top-level entity property that has changed
The complex object that contains the property that changed
The name of the property that changed on complexObject
Reuse or create a new (Entity)DataRecordInfo.
Gets the for the
.
The for the
.
Gets the for the object or relationship.
The for the object or relationship.
Gets the state of the .
The state of the .
Gets the entity object.
The entity object.
Gets the entity key.
The entity key.
Gets a value that indicates whether the represents a relationship.
true if the represents a relationship; otherwise, false.
Gets bit array indicating which properties are modified.
Gets the read-only version of original values of the object or relationship.
The read-only version of original values of the relationship set entry or entity.
Gets the current property values of the object or relationship associated with this
.
A that contains the current values of the object or relationship associated with this
.
Gets the instance for the object represented by entry.
The object.
The entry is a stub or represents a relationship
Returns the EntityState from the ObjectStateEntry
Singlely-linked list of RelationshipEntry.
One of the ends in the RelationshipEntry must equal this.EntityKey
Number of RelationshipEntry in the _relationshipEnds list.
For testing purposes only.
For testing purposes only.
Looks at the type of entity represented by this entry and sets flags defining the type of
change tracking that will be needed. The three main types are:
- Pure POCO objects or non-change-tracking proxies which need DetectChanges for everything.
- Entities derived from EntityObject which don't need DetectChanges at all.
- Change tracking proxies, which only need DetectChanges for complex properties.
Marks specified property as modified.
This API recognizes the names in terms of OSpace
If State is not Modified or Unchanged
Rejects any changes made to the property with the given name since the property was last loaded,
attached, saved, or changes were accepted. The orginal value of the property is stored and the
property will no longer be marked as modified.
If the result is that no properties of the entity are marked as modified, then the entity will
be marked as Unchanged.
Changes to properties can only rejected for entities that are in the Modified or Unchanged state.
Calling this method for entities in other states (Added, Deleted, or Detached) will result in
an exception being thrown.
Rejecting changes to properties of an Unchanged entity or unchanged properties of a Modifed
is a no-op.
The name of the property to change.
Gets a version of the OriginalValues property that can be updated
API to accept the current values as original values and mark the entity as Unchanged.
Changes state of the entry to the specified
The requested state
Apply modified properties to the original object.
object with modified properties
Apply original values to the entity.
The object with original values
Add a RelationshipEntry (one of its ends must equal this.EntityKey)
Determines if a given relationship entry is present in the list of entries
The entry to look for
True of the relationship end is found
Remove a RelationshipEntry (one of its ends must equal this.EntityKey)
Update one of the ends for the related RelationshipEntry
the EntityKey the relationship should currently have
if promoting entity stub to full entity
Reuse or create a new (Entity)DataRecordInfo.
Used to report that a scalar entity property is about to change
The current value of the specified property is cached when this method is called.
The name of the entity property that is changing
Used to report that a scalar entity property has been changed
The property value that was cached during EntityMemberChanging is now
added to OriginalValues
The name of the entity property that has changing
Used to report that a complex property is about to change
The current value of the specified property is cached when this method is called.
The name of the top-level entity property that is changing
The complex object that contains the property that is changing
The name of the property that is changing on complexObject
Used to report that a complex property has been changed
The property value that was cached during EntityMemberChanging is now added to OriginalValues
The name of the top-level entity property that has changed
The complex object that contains the property that changed
The name of the property that changed on complexObject
Method called to complete the change tracking process on an entity property. The original property value
is now saved in the original values record if there is not already an entry in the record for this property.
The parameters to this method must have the same values as the parameter values passed to the last call to
EntityValueChanging on this ObjectStateEntry.
All inputs are in OSpace.
Name of the top-level entity property that has changed
If entityMemberName refers to a complex property, this is the complex object that contains the change. Otherwise this is null.
If entityMemberName refers to a complex property, this is the name of the property that has changed on complexObject. Otherwise this is null.
Method called to start the change tracking process on an entity property. The current property value is cached at
this stage in preparation for later storage in the original values record. Multiple successful calls to this method
will overwrite the cached values.
All inputs are in OSpace.
Name of the top-level entity property that is changing
If entityMemberName refers to a complex property, this is the complex object that contains the change. Otherwise this is null.
If entityMemberName refers to a complex property, this is the name of the property that is changing on complexObject. Otherwise this is null.
Helper method to recursively expand a complex object's values down to scalars for storage in the original values record.
This method is used when a whole complex object is set on its parent object, instead of just setting
individual scalar values on that object.
metadata for the complex property being expanded on the parent where the parent can be an entity or another complex object
Old value of the complex property. Scalar values from this object are stored in the original values record
New value of the complex property. This object reference is used in the original value record and is associated with the scalar values for the same property on the oldComplexObject
Whether or not to use the existing complex object in the original values or to use the original value that is already present
Helper method to validate that the property names being reported as changing/changed are valid for this entity and that
the entity is in a valid state for the change request. Also determines if this is a change on a complex object, and
returns the appropriate metadata and object to be used for the rest of the changing and changed operations.
Top-level entity property name
Complex object that contains the change, null if the change is on a top-level entity property
Name of the property that is changing on the complexObject, null for top-level entity properties
Metadata for the type that contains the change, either for the entity itself or for the complex object
Property name that is actually changing -- either entityMemberName for entities or complexObjectMemberName for complex objects
Object reference that contains the change, either the entity or complex object as appropriate for the requested change
Ordinal of the property that is changing, or -2 if the EntityKey is changing in a valid scenario. This is relative to the returned typeMetadata. Throws exceptions if the requested property name(s) are invalid for this entity.
Helper method to set the information needed for the change tracking cache. Ensures that all of these values get set together.
Uses DetectChanges to determine whether or not the current value of the property with the given
name is different from its original value. Note that this may be different from the property being
marked as modified since a property which has not changed can still be marked as modified.
For complex properties, a new instance of the complex object which has all the same property
values as the original instance is not considered to be different by this method.
The name of the property.
True if the property has changed; false otherwise.
Processes each dependent end of an FK relationship in this entity and determines if a nav
prop is set to a principal. If it is, and if the principal is Unchanged or Modified,
then the primary key value is taken from the principal and used to fixup the FK value.
This is called during AddObject so that references set from the added object will take
precedence over FK values such that there is no need for the user to set FK values
explicitly. If a conflict in the FK value is encountered due to an overlapping FK
that is tied to two different PK values, then an exception is thrown.
Note that references to objects that are not yet tracked by the context are ignored, since
they will ultimately be brought into the context as Added objects, at which point we would
have skipped them anyway because the are not Unchanged or Modified.
Designed to be used by Change Detection methods to insert
Added/Deleted relationships into
Creates new entries in the dictionaries if required
IEntityWrapper or EntityKey
The set of detected relationships to add this entry to
The entity the relationship points to
The related end the relationship originates from
Detaches an entry and create in its place key entry if necessary
Removes relationships with another key entries and removes these key entries if necessary
Nulls all FK values in this entity, or sets conceptual nulls if they are not nullable.
see if there are any relationship entries that point to key entries
if there are, remove the relationship entry
This is called when one of the ends of a relationship is being removed
An option relationshipSet; deletes only relationships that are part of this set
Turns this entry into a key entry (SPAN stub).
Verifies that the property with the given ordinal is editable.
the property is not editable
For each FK contained in this entry, the entry is removed from the index maintained by
the ObjectStateManager for that key.
Looks at the foreign keys contained in this entry and performs fixup to the entities that
they reference, or adds the key and this entry to the index of foreign keys that reference
entities that we don't yet know about.
Given a RelatedEnd that represents a FK from this dependent entity to the principal entity of the
relationship, this method fixes up references between the two entities.
Represents a FK relationship to a principal
The foreign key, if it has already been computed
If true, then the IsLoaded flag for the relationship is set
If true, then any existing references will be replaced
Determins whether or not setting a reference will cause implicit ref stealing as part of FK fixup.
If it would, then an exception is thrown. If it would not and we can safely overwrite the existing
value, then true is returned. If it would not but we should not overwrite the existing value,
then false is returned.
Given that this entry represents an entity on the dependent side of a FK, this method attempts to return the key of the
entity on the principal side of the FK. If the two entities both exist in the context, then the primary key of
the principal entity is found and returned. If the principal entity does not exist in the context, then a key
for it is built up from the foreign key values contained in the dependent entity.
The role indicating the FK to navigate
Set to the principal key or null on return
True if the principal key was found or built; false if it could not be found or built
Performs fixuyup of foreign keys based on referencesd between objects. This should only be called
for Added objects since this is the only time that references take precedence over FKs in fixup.
Fixup the FKs by the current reference values
Do this in the order of fixing up values from the principal ends first, and then propogate those values to the dependents
Returns a list of all RelatedEnds for this entity
that are the dependent end of an FK Association
Identifies any changes in FK's and creates entries in;
- TransactionManager.AddedRelationshipsByForeignKey
- TransactionManager.DeletedRelationshipsByForeignKey
If the FK change will result in fix-up then two entries
are added to TransactionManager.AddedRelationshipsByForeignKey
(one for each direction of the new realtionship)
The EntityKey associated with the ObjectStateEntry
Original values
DbDataRecord
Current values
DbUpdatableDataRecord
True if the underlying entity is not capable of tracking changes to complex types such that
DetectChanges is required to do this.
True if the underlying entity is not capable of tracking changes to scalars such that
DetectChanges is required to do this.
True if the underlying entity is not capable of performing full change tracking such that
it must be considered by at least some parts of DetectChanges.
An enumerable so that EntityEntry doesn't implement it
Convert the singly-linked list into an Array
An enumerator to walk the RelationshipEntry linked-list
For testing purpuses only.
Construct a new instance of the FieldDescriptor class that describes a property
on items of the supplied type.
Type of object whose property is described by this FieldDescriptor.
True if property value on item can be modified; otherwise false .
EdmProperty that describes the property on the item.
Determine a CLR Type to use a property descriptro form an EDM TypeUsage
The EDM TypeUsage containing metadata about the type
A CLR type that represents that EDM type
Get instance associated with this field descriptor.
The instance associated with this field descriptor, or null if there is no EDM property association.
This class is used in Referential Integrity Constraints feature.
It is used to get around the problem of enumerating dictionary contents,
but allowing update of the value without breaking the enumerator.
Base class containing common code for different implementations of the IEntityWrapper
interface. Generally speaking, operations involving the ObjectContext, RelationshipManager
and raw Entity are handled through this class.
The type of entity wrapped
Internally, entities are wrapped in some implementation of this
interface. This allows the RelationshipManager and other classes
to treat POCO entities and traditional entities in the same way
where ever possible.
Ensures that the collection with the given name is not null by setting a new empty
collection onto the property if necessary.
The name of the collection to operate on
Retrieves the EntityKey from the entity if it implements IEntityWithKey
The EntityKey on the entity
Attaches the wrapped entity to the given context.
the context with which to associate this entity
the entity set to which the entity belongs
the merge option to use
Resets the context with which the wrapped entity is associated.
the context with which to associate this entity
the entity set to which the entity belongs
the merge option to use
Detaches the wrapped entity from its associated context.
Sets the entity's ObjectStateEntry as the entity's change tracker if possible.
The ObjectStateEntry may be null when a change tracker is being removed from an
entity.
the object to use as a change tracker
Takes a snapshot of the entity state unless the entity has an associated
change tracker or the given entry is null, in which case no action is taken.
the entity's associated state entry
Takes a snapshot of the relationships of the entity stored in the entry
Populates a value into a collection of values stored in a property of the entity.
If the collection to be populated is actually managed by and returned from
the RelationshipManager when needed, then this method is a no-op. This is
typically the case for non-POCO entities.
Removes a value from a collection of values stored in a property of the entity.
If the collection to be updated is actually managed by and returned from
the RelationshipManager when needed, then this method is a no-op. This is
typically the case for non-POCO entities.
Returns value of the entity's property described by the navigation property.
navigation property to retrieve
Populates a single value into a field or property of the entity.
If the element to be populated is actually managed by and returned from
the RelationshipManager when needed, then this method is a no-op. This is
typically the case for non-POCO entities.
Removes a single value from a field or property of the entity.
If the field or property contains reference to a different object,
this method is a no-op.
If the element to be populated is actually managed by and returned from
the RelationshipManager when needed, then this method is a no-op. This is
typically the case for non-POCO entities.
The value to remove
Sets the given value onto the entity with the registered change either handled by the
entity itself or by using the given EntityEntry as the change tracker.
The state entry of the entity to for which a value should be set
State member information indicating the member to set
The ordinal of the member to set
The object onto which the value should be set; may be the entity, or a contained complex value
The value to set
Updates the current value records using Shaper.UpdateRecord but with additional change tracking logic
added as required by POCO and proxy entities. For the simple case of no proxy and an entity with
a change tracker, this translates into a simple call to ShaperUpdateRecord.
The value
The existing ObjectStateEntry
The Relationship Manager that is associated with the wrapped entity.
Information about whether or not the entity instance actually owns and uses its RelationshipManager
This is used to determine how to do relationship fixup in some cases
The actual entity that is wrapped by this wrapper object.
If this IEntityWrapper is tracked, accesses the ObjectStateEntry that is used in the state manager
The key associated with this entity, which may be null if no key is known.
The context with which the wrapped entity is associated, or null if the entity
is detached.
The merge option assoicated with the wrapped entity.
The Type object that should be used to identify this entity in o-space.
This is normally just the type of the entity object, but if the object
is a proxy that we have generated, then the type of the base class is returned instead.
This ensures that both proxy entities and normal entities are treated as the
same kind of entity in the metadata and places where the metadata is used.
Set to true while the process of initalizing RelatedEnd objects for an IPOCO proxy is in process.
This flag prevents the context from being set onto the related ends, which in turn means that
the related ends don't need to have keys, which in turn means they don't need to be part of an EntitySet.
True if the underlying entity is not capable of tracking changes to relationships such that
DetectChanges is required to do this.
Constructs a wrapper for the given entity and its associated RelationshipManager.
The entity to be wrapped
the RelationshipManager associated with this entity
Constructs a wrapper as part of the materialization process. This constructor is only used
during materialization where it is known that the entity being wrapped is newly constructed.
This means that some checks are not performed that might be needed when thw wrapper is
created at other times, and information such as the identity type is passed in because
it is readily available in the materializer.
The entity to wrap
The RelationshipManager associated with this entity
The entity set, or null if none is known
The context to which the entity should be attached
NoTracking for non-tracked entities, AppendOnly otherwise
The type of the entity ignoring any possible proxy type
Supports materialization of complex type instances from records. Used
by the ObjectStateManager.
Add a DataContractAttribute to the proxy type, based on one that may have been applied to the base type.
From http://msdn.microsoft.com/en-us/library/system.runtime.serialization.datacontractattribute.aspx: A data contract has two basic requirements: a stable name and a list of members. The stable name consists of the namespace uniform resource identifier (URI) and the local name of the contract. By default, when you apply the DataContractAttribute to a class, it uses the class name as the local name and the class's namespace (prefixed with "http://schemas.datacontract.org/2004/07/") as the namespace URI. You can override the defaults by setting the Name and Namespace properties. You can also change the namespace by applying the ContractNamespaceAttribute to the namespace. Use this capability when you have an existing type that processes data exactly as you require but has a different namespace and class name from the data contract. By overriding the default values, you can reuse your existing type and have the serialized data conform to the data contract.
The first attempt at WCF serialization of proxies involved adding a DataContractAttribute to the proxy type in such a way so that the name and namespace of the proxy's data contract matched that of the base class. This worked when serializing proxy objects for the root type of the DataContractSerializer, but not for proxy objects of types derived from the root type. Attempting to add the proxy type to the list of known types failed as well, since the data contract of the proxy type did not match the base type as intended. This was due to the fact that inheritance is captured in the data contract. So while the proxy and base data contracts had the same members, the proxy data contract differed in that is declared itself as an extension of the base data contract. So the data contracts were technically not equivalent. The approach used instead is to allow proxy types to have their own DataContract. Users then have at least two options available to them. The first approach is to add the proxy types to the list of known types. The second approach is to implement an IDataContractSurrogate that can map a proxy instance to a surrogate that does have a data contract equivalent to the base type (you could use the base type itself for this purpose). While more complex to implement, it allows services to hide the use of proxies from clients. This can be quite useful in order to maximize potential interoperability.
Factory for creating proxy classes that can intercept calls to a class' members.
A hook such that test code can change the AssemblyBuilderAccess of the
proxy assembly through reflection into the EntityProxyFactory.
Dictionary of proxy class type information, keyed by the pair of the CLR type and EntityType CSpaceName of the type being proxied.
A null value for a particular EntityType name key records the fact that
no proxy Type could be created for the specified type.
Dictionary of proxy class type information, keyed by the proxy type
The runtime assembly of the proxy types.
This is not the same as the AssemblyBuilder used to create proxy types.
Return proxy type information for the specified O-Space EntityType.
EntityType in O-Space that represents the CLR type to be proxied. Must not be null.
A non-null EntityProxyTypeInfo instance that contains information about the type of proxy for the specified O-Space EntityType; or null if no proxy can be created for the specified type.
A mechanism to lookup AssociationType metadata for proxies for a given entity and association information
The entity instance used to lookup the proxy type
The name of the relationship (FullName or Name)
The AssociationType for that property
True if an AssociationType is found in proxy metadata, false otherwise
Enumerate list of supplied O-Space EntityTypes,
and generate a proxy type for each EntityType (if possible for the particular type).
Enumeration of O-Space EntityType objects. Must not be null. In addition, the elements of the enumeration must not be null.
Determine if the specified type represents a known proxy type.
The Type to be examined.
True if the type is a known proxy type; otherwise false.
Return an enumerable of the current set of CLR proxy types.
Enumerable of the current set of CLR proxy types. This value will never be null.
The enumerable is based on a shapshot of the current list of types.
Build a CLR proxy type for the supplied EntityType.
EntityType in O-Space that represents the CLR type to be proxied.
EntityProxyTypeInfo object that contains the constructed proxy type, along with any behaviors associated with that type; or null if a proxy type cannot be constructed for the specified EntityType.
In order for deserialization of proxy objects to succeed in this AppDomain,
an assembly resolve handler must be added to the AppDomain to resolve the dynamic assembly,
since it is not present in a location discoverable by fusion.
Proxy assembly to be resolved.
Construct an interception delegate for the specified proxy member.
EdmMember that specifies the member to be intercepted.
Type of the proxy.
Sets a delegate onto the _resetFKSetterFlag field such that it can be executed to make
a call into the state manager to reset the InFKSetter flag.
Returns the delegate that takes a proxy instance and uses it to reset the InFKSetter flag maintained
by the state manager of the context associated with the proxy instance.
Called in the finally clause of each overridden property setter to ensure that the flag
indicating that we are in an FK setter is cleared. Note that the wrapped entity is passed as
an obejct becayse IEntityWrapper is an internal type and is therefore not accessable to
the proxy type. Once we're in the framework it is cast back to an IEntityWrapper.
Sets a delegate onto the _compareByteArrays field such that it can be executed to check
whether two byte arrays are the same by value comparison.
Return boolean that specifies if the specified type can be proxied.
O-space EntityType
True if the class is not abstract or sealed, does not implement IEntityWithRelationships, and has a public or protected default constructor; otherwise false.
While it is technically possible to derive from an abstract type
in order to create a proxy, we avoid this so that the proxy type
has the same "concreteness" of the type being proxied.
The check for IEntityWithRelationships ensures that codegen'ed
entities that derive from EntityObject as well as properly
constructed IPOCO entities will not be proxied.
Specifies information about a proxied class member.
The member must be a Property for the current implementation,
but this may be generalized later to support methods as well.
Initially, this class held a reference to the PropertyInfo that represented the proxy property.
This property was unused, so it was removed. However, it may be necessary to add it later.
This is pointed out here since it may not seem obvious as to why this would be omitted.
Contains the Type of a proxy class, along with any behaviors associated with that proxy Type.
Set the proxy object's private entity wrapper field value to the specified entity wrapper object.
The proxy object (representing the wrapped entity) is retrieved from the wrapper itself.
Wrapper object to be referenced by the proxy.
The supplied entity wrapper. This is done so that this method can be more easily composed within lambda expressions (such as in the materializer).
Gets the proxy object's entity wrapper field value
Provides Entity-SQL query building services for .
Knowledge of how to compose Entity-SQL fragments using query builder operators resides entirely in this class.
Helper method to extract the Entity-SQL command text from an instance if that
instance models an Entity-SQL-backed ObjectQuery, or to throw an exception indicating that query builder methods
are not supported on this query.
The instance from which the Entity-SQL command text should be retrieved
The Entity-SQL command text, if the specified query state instance is based on Entity-SQL
If the specified instance is not based on Entity-SQL command text, and so does not support Entity-SQL query builder methods
Merges s from a source ObjectQuery with ObjectParameters specified as an argument to a builder method.
A new is returned that contains copies of parameters from both
and .
The to use when constructing the new parameter collection
ObjectParameters from the ObjectQuery on which the query builder method was called
ObjectParameters that were specified as an argument to the builder method
A new ObjectParameterCollection containing copies of all parameters
Merges s from two ObjectQuery arguments to SetOp builder methods (Except, Intersect, Union, UnionAll).
A new is returned that contains copies of parameters from both
and .
ObjectParameters from the first ObjectQuery argument (on which the query builder method was called)
ObjectParameters from the second ObjectQuery argument (specified as an argument to the builder method)
A new ObjectParameterCollection containing copies of all parameters
ObjectQueryState based on Entity-SQL query text.
The Entity-SQL text that defines the query.
It is important that this field is readonly for consistency reasons wrt .
If this field becomes read-write, then write should be allowed only when is null,
or there should be a mechanism keeping both fields consistent.
Optional that defines the query. Must be semantically equal to the
.
It is important that this field is readonly for consistency reasons wrt .
If this field becomes read-write, then there should be a mechanism keeping both fields consistent.
Can a Limit subclause be appended to the text of this query?
Initializes a new query EntitySqlQueryState instance.
The Entity-SQL text of the query
The ObjectContext containing the metadata workspace the query was built against, the connection on which to execute the query, and the cache to store the results in. Must not be null.
Initializes a new query EntitySqlQueryState instance.
The Entity-SQL text of the query
Optional that defines the query. Must be semantically equal to the
.
The ObjectContext containing the metadata workspace the query was built against, the connection on which to execute the query, and the cache to store the results in. Must not be null.
Always returns the Entity-SQL text of the implemented ObjectQuery.
Always set to the Entity-SQL text of this ObjectQuery.
Always returns true .
Determines whether or not the current query is a 'Skip' or 'Sort' operation
and so would allow a 'Limit' clause to be appended to the current query text.
True if the current query is a Skip or Sort expression, or a Project expression with a Skip or Sort expression input.
Implementation of the change tracking strategy for entities that support change trackers.
These are typically entities that implement IEntityWithChangeTracker.
A strategy interface that defines methods used for different types of change tracking.
Implementors of this interface are used by the EntityWrapper class.
Sets a change tracker onto an entity, or does nothing if the entity does not support change trackers.
The change tracker to set
Takes a snapshot of the entity contained in the given state entry, or does nothing if
snapshots are not required for the entity.
The state entry representing the entity to snapshot
Sets the given value onto the entity with the registered change either handled by the
entity itself or by using the given EntityEntry as the change tracker.
The state entry of the entity to for which a value should be set
State member information indicating the member to set
The ordinal of the member to set
The object onto which the value should be set; may be the entity, or a contained complex value
The value to set
Updates the current value records using Shaper.UpdateRecord but with additional change tracking logic
added as required by POCO and proxy entities.
The value
The existing ObjectStateEntry
Constructs a strategy object that will cause the change tracker to be set onto the
given object.
The object onto which a change tracker will be set
Implementor of IEntityKeyStrategy for entities that implement IEntityWithKey. Getting and setting
the key is deferred to the entity itself.
A strategy interface that defines methods used for setting and getting EntityKey values on an entity.
Implementors of this interface are used by the EntityWrapper class.
Gets the entity key.
The key
Sets the entity key
The key
Returns the entity key directly from the entity
the key
Creates a strategy object for the given entity. Keys will be stored in the entity.
The entity to use
Implementation of the IEntityWrapper interface that is used for non-null entities that do not implement
all of our standard interfaces: IEntityWithKey, IEntityWithRelationships, and IEntityWithChangeTracker, and
are not proxies.
Different strategies for dealing with these entities are defined by strategy objects that are set into the
wrapper at construction time.
Constructs a wrapper for the given entity.
Note: use EntityWrapperFactory instead of calling this constructor directly.
The entity to wrap
The RelationshipManager associated with the entity
A delegate to create the property accesor strategy object
A delegate to create the change tracking strategy object
A delegate to create the entity key strategy object
Constructs a wrapper as part of the materialization process. This constructor is only used
during materialization where it is known that the entity being wrapped is newly constructed.
This means that some checks are not performed that might be needed when thw wrapper is
created at other times, and information such as the identity type is passed in because
it is readily available in the materializer.
The entity to wrap
The RelationshipManager associated with the entity
The entity's key
The entity set, or null if none is known
The context to which the entity should be attached
NoTracking for non-tracked entities, AppendOnly otherwise
The type of the entity ignoring any possible proxy type
A delegate to create the property accesor strategy object
A delegate to create the change tracking strategy object
A delegate to create the entity key strategy object
Factory class for creating IEntityWrapper instances.
Called to create a new wrapper outside of the normal materialization process.
This method is typically used when a new entity is created outside the context and then is
added or attached. The materializer bypasses this method and calls wrapper constructors
directory for performance reasons.
This method does not check whether or not the wrapper already exists in the context.
The entity for which a wrapper will be created
The key associated with that entity, or null
The new wrapper instance
Returns a delegate that creates the fast LightweightEntityWrapper
Convenience function that gets the ObjectStateManager from the context and calls
WrapEntityUsingStateManager.
the entity to wrap
the context in which the entity may exist, or null
a new or existing wrapper
Convenience function that gets the ObjectStateManager from the context and calls
WrapEntityUsingStateManager.
The entity to wrap
The context in which the entity may exist, or null
Set to the existing state entry if one is found, else null
a new or existing wrapper
Wraps an entity and returns a new wrapper, or returns an existing wrapper if one
already exists in the ObjectStateManager or in a RelationshipManager associated with
the entity.
the entity to wrap
the state manager in which the entity may exist, or null
a new or existing wrapper
Wraps an entity and returns a new wrapper, or returns an existing wrapper if one
already exists in the ObjectStateManager or in a RelationshipManager associated with
the entity.
The entity to wrap
The state manager in which the entity may exist, or null
The existing state entry for the given entity if one exists, otherwise null
A new or existing wrapper
When an entity enters Object Services that was retreived with NoTracking, it may not have certain fields set that are in many cases
assumed to be present. This method updates the wrapper with a key and a context.
The wrapped entity
The context that will be using this wrapper
The entity set this wrapped entity belongs to
Returns a func that will create a PocoPropertyAccessorStrategy object for a given entity.
The func to be used to create the strategy object.
Returns a func that will create a null IPropertyAccessorStrategy strategy object for a given entity.
The func to be used to create the strategy object.
Returns a func that will create a EntityWithChangeTrackerStrategy object for a given entity.
The func to be used to create the strategy object.
Returns a func that will create a SnapshotChangeTrackingStrategy object for a given entity.
The func to be used to create the strategy object.
Returns a func that will create a EntityWithKeyStrategy object for a given entity.
The func to be used to create the strategy object.
Returns a func that will create a GetPocoEntityKeyStrategyFunc object for a given entity.
The func to be used to create the strategy object.
An extension of the EntityWrapper class for entities that are known not to implement
IEntityWithRelationships. Using this class causes the RelationshipManager to be created
independently.
The type of entity wrapped
Constructs a wrapper as part of the materialization process. This constructor is only used
during materialization where it is known that the entity being wrapped is newly constructed.
This means that some checks are not performed that might be needed when thw wrapper is
created at other times, and information such as the identity type is passed in because
it is readily available in the materializer.
The entity to wrap
The entity's key
The entity set, or null if none is known
The context to which the entity should be attached
NoTracking for non-tracked entities, AppendOnly otherwise
The type of the entity ignoring any possible proxy type
A delegate to create the property accesor strategy object
A delegate to create the change tracking strategy object
A delegate to create the entity key strategy object
Constructs a wrapper for the given entity.
Note: use EntityWrapperFactory instead of calling this constructor directly.
The entity to wrap
A delegate to create the property accesor strategy object
A delegate to create the change tracking strategy object
A delegate to create the entity key strategy object
An extension of the EntityWrapper class for entities that implement IEntityWithRelationships.
Using this class causes creation of the RelationshipManager to be defered to the entity object.
The type of entity wrapped
Constructs a wrapper as part of the materialization process. This constructor is only used
during materialization where it is known that the entity being wrapped is newly constructed.
This means that some checks are not performed that might be needed when thw wrapper is
created at other times, and information such as the identity type is passed in because
it is readily available in the materializer.
The entity to wrap
The entity's key
The entity set, or null if none is known
The context to which the entity should be attached
NoTracking for non-tracked entities, AppendOnly otherwise
The type of the entity ignoring any possible proxy type
A delegate to create the property accesor strategy object
A delegate to create the change tracking strategy object
A delegate to create the entity key strategy object
Constructs a wrapper for the given entity.
Note: use EntityWrapperFactory instead of calling this constructor directly.
The entity to wrap
A delegate to create the property accesor strategy object
A delegate to create the change tracking strategy object
A delegate to create the entity key strategy object
Returns true if the supplied key represents a Conceptual Null
The key to be checked
Checks if the Real Key represents different FK values
than those present when the Conceptual Null was created
The key representing the Conceptual Null
The key to be checked
True if the values are different, false otherwise
Creates an EntityKey that represents a Conceptual Null
An EntityKey representing the existing FK values that could not be nulled
EntityKey marked as a conceptual null with the FK values from the original key
Creates an EntityKey for a principal entity based on the foreign key values contained
in this entity. This implies that this entity is at the dependent end of the relationship.
The EntityEntry for the dependent that contains the FK
Identifies the principal end for which a key is required
The key, or null if any value in the key is null
Creates an EntityKey for a principal entity based on the foreign key values contained
in this entity. This implies that this entity is at the dependent end of the relationship.
The EntityEntry for the dependent that contains the FK
The constraint that describes this FK relationship
The entity set at the principal end of the the relationship
If true then the key will be constructed from the original FK values
The key, or null if any value in the key is null
A strategy interface that defines methods used for setting and getting values of
properties and collections on entities.
Implementors of this interface are used by the EntityWrapper class.
Gets the value of a navigation property for the given related end.
Specifies the related end for which a value is required
The property value
Sets the value of a navigation property for the given related end.
Specifies the related end for which a value should be set
The value to set
Adds a value to the collection represented by the given related end.
The related end for the collection to use
The value to add to the collection
Removes a value from the collection represented by the given related end.
The related end for the collection to use
The value to remove from the collection
True if a value was found and removed; false otherwise
Creates a new collection for the given related end.
The related end for which a collection should be created
The new collection
Defines and injects behavior into proxy class Type definitions
to allow navigation properties to lazily load their references or collection elements.
Return an expression tree that represents the actions required to load the related end
associated with the intercepted proxy member.
EdmMember that specifies the member to be intercepted.
The Func that retrieves the wrapper from a proxy
Expression tree that encapsulates lazy loading behavior for the supplied member, or null if the expression tree could not be constructed.
Determine if the specified member is compatible with lazy loading.
OSpace EntityType representing a type that may be proxied.
Member of the to be examined.
True if the member is compatible with lazy loading; otherwise false.
To be compatible with lazy loading,
a member must meet the criteria for being able to be proxied (defined elsewhere),
and must be a navigation property.
In addition, for relationships with a multiplicity of Many,
the property type must be an implementation of ICollection<T>.
Method called by proxy interceptor delegate to provide lazy loading behavior for navigation properties.
property type
The property value whose associated relationship is to be loaded.
String name of the relationship.
String name of the related end to be loaded for the relationship specified by
.
Entity wrapper object used to retrieve RelationshipManager for the proxied entity.
True if the value instance was mutated and can be returned False if the class should refetch the value because the instance has changed
Implementation of IEntityWrapper for any entity that implements IEntityWithChangeTracker, IEntityWithRelationships,
and IEntityWithKey and is not a proxy. This is a lightweight wrapper that delegates functionality to those interfaces.
This improves the speed and memory utilization for the standard code-gen cases in materialization.
The type of entity wrapped
Constructs a wrapper for the given entity.
Note: use EntityWrapperFactory instead of calling this constructor directly.
The entity to wrap
Constructs a wrapper as part of the materialization process. This constructor is only used
during materialization where it is known that the entity being wrapped is newly constructed.
This means that some checks are not performed that might be needed when thw wrapper is
created at other times, and information such as the identity type is passed in because
it is readily available in the materializer.
The entity to wrap
The key for the entity
The entity set, or null if none is known
The context to which the entity should be attached
NoTracking for non-tracked entities, AppendOnly otherwise
The type of the entity ignoring any possible proxy type
Defines an entity wrapper that wraps an entity with a null value.
This is a singleton class for which the same instance is always returned
any time a wrapper around a null entity is requested. Objects of this
type are immutable and mutable to allow this behavior to work correctly.
The single instance of this class.
Responsible for performing Relationship-span only rewrites over a Command Tree rooted
by the property. Virtual methods provide an opportunity for derived
classes to implement Full-span rewrites.
Constructs a new ObjectSpanRewriter that will attempt to apply spanning to the specified query
(represented as a DbExpression) when is called.
A representing the query to span.
Main 'public' entry point called by ObjectQuery.
The rewritten version of if spanning was required; otherwise null .
Gathers the applicable { from, to } relationship end pairings for the specified entity type.
Note that it is possible for both { x, y } and { y, x } - where x and y are relationship ends -
to be returned if the relationship is symmetric (in the sense that it has multiplicity of at
most one in each direction and the type of each end is Ref to the same Entity type, or a supertype).
The Entity type for which the applicable { from, to } end pairings should be retrieved.
A List of association end members pairings that describes the available { from, to } navigations for the specified Entity type that are valid for Relationship Span; or null if no such pairings exist.
Determines whether the specified { from, to } relationship end pairing represents a navigation that is
valid for a relationship span sourced by an instance of the specified entity type.
The Entity type which valid 'from' ends must reference (or a supertype of that Entity type)
The Association type to consider.
The candidate 'from' end, which will be checked based on the Entity type it references
The candidate 'to' end, which will be checked base on the upper bound of its multiplicity
True if the end pairing represents a valid navigation from an instance of the specified entity type to an association end with a multiplicity upper bound of at most 1; otherwise false
Gets the metadata workspace the will be used to retrieve required metadata, for example association types.
Gets a DbExpression representing the query that should be spanned.
Gets a value indicating whether relationship span is required (ObjectQuery sets this to 'false' for NoTracking queries).
Gets a dictionary that indicates, for a given result row type produced by a span rewrite,
which columns represent which association end members.
This dictionary is initially empty before is called and will remain so
if no rewrites are required.
Maintains a reference to the SpanPathInfo tree node representing the
current position in the 'Include' path that is currently being expanded.
Populates the Include span tree with appropriate branches for the Include path
represented by the specified list of navigation property names.
The root SpanPathInfo
A list of navigation property names that describes a single Include span path
Retrieves the Entity (result or element) type produced by a Navigation Property.
The navigation property
The Entity type produced by the navigation property. This may be the immediate result type (if the result is at most one) or the element type of the result type, otherwise.
Retrieves the Entity (result or element) type referenced by the specified TypeUsage, if
its EdmType is an Entity type or a collection type with an Entity element type.
The TypeUsage that provides the EdmType to examine
The referenced Entity (element) type, if present.
true if the specified is an Entity type or a collection type with an Entity element type; otherwise false .
Utility method to retrieve the 'To' AssociationEndMember of a NavigationProperty
The navigation property
The AssociationEndMember that is the target of the navigation operation represented by the NavigationProperty
Represents a node in the 'Include' navigation property tree
built from the list of SpanPaths on the Span object with which
the FullSpanRewriter is constructed.
The effective Entity type of this node in the tree
Describes the navigation properties that should be retrieved
from this node in the tree and the Include sub-paths that extend
from each of those navigation properties
Represents the 'compiled' form of all elements (query + result assembly) required to execute a specific
If the query yields entities from a single entity set, the value is stored here.
For testing purposes only. For anything else call .
Implementor of IEntityKeyStrategy for getting and setting a key on an entity that does not
implement IEntityWithKey. The key is stored in the strategy object.
Implementation of the property accessor strategy that gets and sets values on POCO entities. That is,
entities that do not implement IEntityWithRelationships.
Constructs a strategy object to work with the given entity.
The entity to use
We only get here if a navigation property getter returns null. In this case, we try to set the
navigation property to some collection that will work.
This class determines if the proxied type implements ISerializable with the special serialization constructor.
If it does, it adds the appropriate members to the proxy type.
Implementation of the change tracking strategy for entities that require snapshot change tracking.
These are typically entities that do not implement IEntityWithChangeTracker.
Returns the single static instance of this class; a single instance is all that is needed
because the class is stateless.
Defines behavior for implementations of IQueryable that allow modifications to the membership of the resulting set.
Type of entities returned from the queryable.
Notifies the set that an object that represents a new entity must be added to the set.
Depending on the implementation, the change to the set may not be visible in an enumeration of the set
until changes to that set have been persisted in some manner.
The new object to add to the set.
Notifies the set that an object that represents an existing entity must be added to the set.
Depending on the implementation, the change to the set may not be visible in an enumeration of the set
until changes to that set have been persisted in some manner.
The existing object to add to the set.
Notifies the set that an object that represents an existing entity must be deleted from the set.
Depending on the implementation, the change to the set may not be visible in an enumeration of the set
until changes to that set have been persisted in some manner.
The existing object to delete from the set.
Notifies the set that an object that represents an existing entity must be detached from the set.
Depending on the implementation, the change to the set may not be visible in an enumeration of the set
until changes to that set have been persisted in some manner.
The object to detach from the set.
Defines the behavior required for objects that maintain a binding list exposed by ObjectView.
The type of elements in the binding list.
Throw an exception if the IObjectViewData instance does not allow newly-created items to be added to this list.
Add an item to the binding list.
Item to be added. The value of this parameter will never be null, and the item is guaranteed to not already exist in the binding list.
True if this method is being called as part of a IBindingList.AddNew operation; otherwise false .
Index of added item in the binding list.
If is true,
the item should only be added to the list returned by the List property, and not any underlying collection.
Otherwise, the item should be added to the binding list as well as any underlying collection.
Add the item in the binding list at the specified index to any underlying collection.
Index of the item in the binding list. The index is guaranteed to be valid for the binding list.
Clear all of the items in the binding list, as well as in the underlying collection.
Remove an item from the binding list.
Item to be removed. The value of this parameter will never be null. The item does not have to exist in the binding list.
True if this method is being called as part of a ICancelAddNew.CancelNew operation; otherwise false .
True if item was removed from list; otherwise false if item was not present in the binding list.
If is true,
the item should only be removed from the binding list, and not any underlying collection.
Otherwise, the item should be removed from the binding list as well as any underlying collection.
Handle change to underlying collection.
The source of the event.
Event arguments that specify the type of modification and the associated item.
Object used to register or unregister individual item notifications.
ListChangedEventArgs that provides details of how the binding list was changed, or null if no change to binding list occurred. The ObjectView will fire a list changed event if this method returns a non-null value.
The listener.RegisterEntityEvent method should be called for items added to the binding list,
and the listener.UnregisterEntityEvents method should be called for items removed from the binding list.
Other methods of the ObjectViewListener should not be used.
Get the binding list maintained by an instance of IObjectViewData.
Get boolean that specifies whether newly-created items can be added to the binding list.
True if newly-created items can be added to the binding list; otherwise false .
Get boolean that specifies whether properties of elements in the binding list can be modified.
True if elements can be edited; otherwise false .
Get boolean that specifies whether elements can be removed from the binding list.
True if elements can be removed from the binding list; otherwise false .
Get boolean that specifies whether the IObjectViewData instance implicitly fires list changed events
when items are added to the binding list.
True if the IObjectViewData instance fires list changed events on add; otherwise false .
List changed events are fired by the ObjectContext if the IObjectViewData.OnCollectionChanged
method returns a non-null ListChangedEventArgs object.
Get boolean that specifies whether the IObjectViewData instance implicitly fires list changed events
when items are removed from the binding list.
True if the IObjectViewData instance fires list changed events on remove; otherwise false .
List changed events are fired by the ObjectContext if the IObjectViewData.OnCollectionChanged
method returns a non-null ListChangedEventArgs object.
Get boolean that specifies whether the IObjectViewData instance implicitly fires list changed events
when all items are cleared from the binding list.
True if the IObjectViewData instance fires list changed events on clear; otherwise false .
List changed events are fired by the ObjectContext if the IObjectViewData.OnCollectionChanged
method returns a non-null ListChangedEventArgs object.
The different ways that new objects loaded from the database can be merged with existing objects already in memory.
Will only append new (top level-unique) rows. This is the default behavior.
Same behavior as LoadOption.OverwriteChanges.
Same behavior as LoadOption.PreserveChanges.
Will not modify cache.
ObjectContext is the top-level object that encapsulates a connection between the CLR and the database,
serving as a gateway for Create, Read, Update, and Delete operations.
Initializes a new instance of the class with the given connection. During construction, the metadata workspace is extracted from the
object.
An that contains references to the model and to the data source connection.
The connection is null.
The connection is invalid or the metadata workspace is invalid.
Creates an ObjectContext with the given connection and metadata workspace.
connection to the store
If set to true the connection is disposed when the context is disposed, otherwise the caller must dispose the connection.
Initializes a new instance of the class with the given connection string and default entity container name.
The connection string, which also provides access to the metadata information.
The connectionString is null.
The connectionString is invalid or the metadata workspace is not valid.
Initializes a new instance of the class with a given connection string and entity container name.
The connection string, which also provides access to the metadata information.
The name of the default entity container. When the defaultContainerName is set through this method, the property becomes read-only.
The connectionString is null.
The connectionString , defaultContainerName , or metadata workspace is not valid.
Initializes a new instance of the class with a given connection and entity container name.
An that contains references to the model and to the data source connection.
The name of the default entity container. When the defaultContainerName is set through this method, the property becomes read-only.
The connection is null.
The connection , defaultContainerName , or metadata workspace is not valid.
For testing porpoises only.
A private helper function for the _savingChanges/SavingChanges event.
Accepts all changes made to objects in the object context.
Adds an object to the object context.
Represents the entity set name, which may optionally be qualified by the entity container name.
The to add.
The entity parameter is null or the entitySetName does not qualify.
Adds an object to the cache without adding its related
entities.
EntitySet for the Object to be added.
Object to be added.
Name of the argument passed to a public method, for use in exceptions.
Explicitly loads an object related to the supplied object by the specified navigation property and using the default merge option.
The entity for which related objects are to be loaded.
The name of the navigation property that returns the related objects to be loaded.
The entity is in a ,
or state or the entity is attached to another instance of
.
Explicitly loads an object that is related to the supplied object by the specified navigation property and using the specified merge option.
The entity for which related objects are to be loaded.
The name of the navigation property that returns the related objects to be loaded.
The value to use when you load the related objects.
The entity is in a ,
or state or the entity is attached to another instance of
.
Explicitly loads an object that is related to the supplied object by the specified LINQ query and by using the default merge option.
The source object for which related objects are to be loaded.
A LINQ expression that defines the related objects to be loaded.
selector does not supply a valid input parameter.
selector is null.
The entity is in a ,
or state or the entity is attached to another instance of
.
Explicitly loads an object that is related to the supplied object by the specified LINQ query and by using the specified merge option.
The source object for which related objects are to be loaded.
A LINQ expression that defines the related objects to be loaded.
The value to use when you load the related objects.
selector does not supply a valid input parameter.
selector is null.
The entity is in a ,
or state or the entity is attached to another instance of
.
Applies property changes from a detached object to an object already attached to the object context.
The name of the entity set to which the object belongs.
The detached object that has property updates to apply to the original object.
When entitySetName is null or an empty string or when changed is null.
When the from entitySetName does not match the
of the object’s
or Wwen the entity is in a state other than
or
or the original object is not attached to the context.
When the type of the changed object is not the same type as the original object.
Copies the scalar values from the supplied object into the object in the
that has the same key.
The updated object.
The name of the entity set to which the object belongs.
The detached object that has property updates to apply to the original object. The entity key of currentEntity must match the
property of an entry in the
.
The entity type of the object.
entitySetName or current is null.
The from entitySetName does not match the
of the object’s
or the object is not in the
or it is in a
state or the entity key of the supplied object is invalid.
entitySetName is an empty string.
Copies the scalar values from the supplied object into set of original values for the object in the
that has the same key.
The updated object.
The name of the entity set to which the object belongs.
The detached object that has original values to apply to the object. The entity key of originalEntity must match the
property of an entry in the
.
The type of the entity object.
entitySetName or original is null.
The from entitySetName does not match the
of the object’s
or an
for the object cannot be found in the
or the object is in an
or a
state or the entity key of the supplied object is invalid or has property changes.
entitySetName is an empty string.
Attaches an object or object graph to the object context in a specific entity set.
Represents the entity set name, which may optionally be qualified by the entity container name.
The to attach.
The entity is null.
Invalid entity set or the object has a temporary key or the object has an
and the
does not match with the entity set passed in as an argument of the method or the object does not have an
and no entity set is provided or any object from the object graph has a temporary
or any object from the object graph has an invalid
(for example, values in the key do not match values in the object) or the entity set could not be found from a given entitySetName name and entity container name or any object from the object graph already exists in another state manager.
Attaches an object or object graph to the object context when the object has an entity key.
The object to attach.
The entity is null.
Invalid entity key.
Attaches single object to the cache without adding its related entities.
Entity to be attached.
"Computed" entity set.
When attaching we need to check that the entity is not already attached to a different context
before we wipe away that context.
Creates the entity key for a specific object, or returns the entity key if it already exists.
The of the object.
The fully qualified name of the entity set to which the entity object belongs.
The object for which the entity key is being retrieved.
When either parameter is null.
When entitySetName is empty or when the type of the entity object does not exist in the entity set or when the entitySetName is not fully qualified.
When the entity key cannot be constructed successfully based on the supplied parameters.
Creates a new instance that is used to query, add, modify, and delete objects of the specified entity type.
The new instance.
Entity type of the requested .
The property is not set on the
or the specified type belongs to more than one entity set.
Creates a new instance that is used to query, add, modify, and delete objects of the specified type and with the specified entity set name.
The new instance.
Name of the entity set for the returned . The string must be qualified by the default container name if the
property is not set on the
.
Entity type of the requested .
The from entitySetName does not match the
of the object’s
or the
property is not set on the
and the name is not qualified as part of the entitySetName parameter or the specified type belongs to more than one entity set.
Find the EntitySet in the default EntityContainer for the specified CLR type.
Must be a valid mapped entity type and must be mapped to exactly one EntitySet across all of the EntityContainers in the metadata for this context.
CLR type to use for EntitySet lookup.
Finds an EntitySet with the specified name and verifies that its type matches the specified type.
Name of the EntitySet to find. Can be fully-qualified or unqualified if the DefaultContainerName is set
Expected CLR type of the EntitySet. Must exactly match the type for the EntitySet, base types are not valid.
Argument name to use if an exception occurs.
EntitySet that was found in metadata with the specified parameters
Ensures that the connection is opened for an operation that requires an open connection to the store.
Calls to EnsureConnection MUST be matched with a single call to ReleaseConnection.
If the instance has been disposed.
Ensures that the connection is opened for an operation that requires an open connection to the store.
Calls to EnsureConnection MUST be matched with a single call to ReleaseConnection.
If the instance has been disposed.
Resets the state of connection management when the connection becomes closed.
Releases the connection, potentially closing the connection if no active operations
require the connection to be open. There should be a single ReleaseConnection call
for each EnsureConnection call.
If the
instance has been disposed.
Creates an in the current object context by using the specified query string.
An of the specified type.
The query string to be executed.
Parameters to pass to the query.
The entity type of the returned .
The queryString or parameters parameter is null.
Creates an EntityConnection from the given connection string.
the connection string
the newly created connection
Given an entity connection, returns a copy of its MetadataWorkspace. Ensure we get
all of the metadata item collections by priming the entity connection.
If the
instance has been disposed.
Marks an object for deletion.
An object that specifies the entity to delete. The object can be in any state except
.
Common DeleteObject method that is used by both ObjectContext.DeleteObject and ObjectSet.DeleteObject.
Object to be deleted.
EntitySet that the specified object is expected to be in. Null if the caller doesn't want to validate against a particular EntitySet.
Removes the object from the object context.
Object to be detached. Only the entity is removed; if there are any related objects that are being tracked by the same
, those will not be detached automatically.
The entity is null.
The entity is not associated with this (for example, was newly created and not associated with any context yet, or was obtained through some other context, or was already detached).
Common Detach method that is used by both ObjectContext.Detach and ObjectSet.Detach.
Object to be detached.
EntitySet that the specified object is expected to be in. Null if the caller doesn't want to validate against a particular EntitySet.
Releases the resources used by the object context.
Releases the resources used by the object context.
true to release both managed and unmanaged resources; false to release only unmanaged resources.
Returns the EntitySet with the given name from given container.
Name of entity set.
Name of container.
The appropriate EntitySet.
The entity set could not be found for the given name.
The entity container could not be found for the given name.
Validate that an EntitySet is compatible with a given entity instance's CLR type.
an EntitySet
The CLR type of an entity instance
Returns an object that has the specified entity key.
An that is an instance of an entity type.
The key of the object to be found.
The key parameter is null.
The object is not found in either the or the data source.
Updates a collection of objects in the object context with data from the database.
A value that indicates whether
property changes in the object context are overwritten with property values from the database.
An collection of objects to refresh.
collection is null.
refreshMode is not valid.
collection is empty or an object is not attached to the context.
Updates an object in the object context with data from the database.
A value that indicates whether
property changes in the object context are overwritten with property values from the database.
The object to be refreshed.
entity is null.
refreshMode is not valid.
entity is not attached to the context.
Asynchronously updates a collection of objects in the object context with data from the database.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
A value that indicates whether
property changes in the object context are overwritten with property values from the database.
An collection of objects to refresh.
A task that represents the asynchronous operation.
collection is null.
refreshMode is not valid.
collection is empty or an object is not attached to the context.
Asynchronously updates a collection of objects in the object context with data from the database.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
A value that indicates whether
property changes in the object context are overwritten with property values from the database.
An collection of objects to refresh.
A to observe while waiting for the task to complete.
A task that represents the asynchronous operation.
collection is null.
refreshMode is not valid.
collection is empty or an object is not attached to the context.
Asynchronously updates an object in the object context with data from the database.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
A value that indicates whether
property changes in the object context are overwritten with property values from the database.
The object to be refreshed.
A task that represents the asynchronous operation.
entity is null.
refreshMode is not valid.
entity is not attached to the context.
Asynchronously updates an object in the object context with data from the database.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
A value that indicates whether
property changes in the object context are overwritten with property values from the database.
The object to be refreshed.
A to observe while waiting for the task to complete.
A task that represents the asynchronous operation.
entity is null.
refreshMode is not valid.
entity is not attached to the context.
Validates that the given entity/key pair has an ObjectStateEntry
and that entry is not in the added state.
The entity is added to the entities dictionary, and checked for duplicates.
on exit, entity is added to this dictionary.
Persists all updates to the database and resets change tracking in the object context.
The number of objects in an ,
,
or state when
was called.
An optimistic concurrency violation has occurred while saving changes.
Asynchronously persists all updates to the database and resets change tracking in the object context.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
A task that represents the asynchronous operation.
The task result contains the number of objects in an ,
,
or state when
was called.
An optimistic concurrency violation has occurred while saving changes.
Asynchronously persists all updates to the database and resets change tracking in the object context.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
A to observe while waiting for the task to complete.
A task that represents the asynchronous operation.
The task result contains the number of objects in an ,
,
or state when
was called.
An optimistic concurrency violation has occurred while saving changes.
Persists all updates to the database and optionally resets change tracking in the object context.
This parameter is needed for client-side transaction support. If true, the change tracking on all objects is reset after
finishes. If false, you must call the
method after .
The number of objects in an ,
,
or state when
was called.
An optimistic concurrency violation has occurred while saving changes.
Persists all updates to the database and optionally resets change tracking in the object context.
A value that determines the behavior of the operation.
The number of objects in an ,
,
or state when
was called.
An optimistic concurrency violation has occurred while saving changes.
Asynchronously persists all updates to the database and optionally resets change tracking in the object context.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
A value that determines the behavior of the operation.
A task that represents the asynchronous operation.
The task result contains the number of objects in an ,
,
or state when
was called.
An optimistic concurrency violation has occurred while saving changes.
Asynchronously persists all updates to the database and optionally resets change tracking in the object context.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
A value that determines the behavior of the operation.
A to observe while waiting for the task to complete.
A task that represents the asynchronous operation.
The task result contains the number of objects in an ,
,
or state when
was called.
An optimistic concurrency violation has occurred while saving changes.
Executes a function in a local transaction and returns the result.
A local transaction is created only if there are no existing local nor ambient transactions.
This method will ensure that the connection is opened and release it if an exception is thrown.
The caller is responsible of releasing the connection if no exception is thrown, unless
is set to true.
Type of the result.
The function to invoke.
The execution strategy used for this operation.
Whether should start a new local transaction when there's no existing one.
Whether the connection will also be released when no exceptions are thrown.
The result from invoking .
An asynchronous version of ExecuteStoreQuery, which
executes a function in a local transaction and returns the result.
A local transaction is created only if there are no existing local nor ambient transactions.
This method will ensure that the connection is opened and release it if an exception is thrown.
The caller is responsible of releasing the connection if no exception is thrown, unless
is set to true.
Type of the result.
The function to invoke.
The execution strategy used for this operation.
Whether should start a new local transaction when there's no existing one.
Whether the connection will also be released when no exceptions are thrown.
The token to monitor for cancellation requests.
A task containing the result from invoking .
Ensures that changes are synchronized with changes in all objects that are tracked by the
.
Returns an object that has the specified entity key.
true if the object was retrieved successfully. false if the key is temporary, the connection is null, or the value is null.
The key of the object to be found.
When this method returns, contains the object.
Incompatible metadata for key .
key is null.
Executes a stored procedure or function that is defined in the data source and mapped in the conceptual model, with the specified parameters. Returns a typed
.
An for the data that is returned by the stored procedure.
The name of the stored procedure or function. The name can include the container name, such as <Container Name>.<Function Name>. When the default container name is known, only the function name is required.
An array of objects.
The entity type of the returned when the function is executed against the data source. This type must implement
.
function is null or empty or function is not found.
The entity reader does not support this function or there is a type mismatch on the reader and the function .
Executes the given stored procedure or function that is defined in the data source and expressed in the conceptual model, with the specified parameters, and merge option. Returns a typed
.
An for the data that is returned by the stored procedure.
The name of the stored procedure or function. The name can include the container name, such as <Container Name>.<Function Name>. When the default container name is known, only the function name is required.
The to use when executing the query.
An array of objects.
The entity type of the returned when the function is executed against the data source. This type must implement
.
function is null or empty or function is not found.
The entity reader does not support this function or there is a type mismatch on the reader and the function .
Executes the given function on the default container.
Element type for function results.
Name of function. May include container (e.g. ContainerName.FunctionName) or just function name when DefaultContainerName is known.
The options for executing this function.
The parameter values to use for the function.
If function is null or empty
If function is invalid (syntax,
does not exist, refers to a function with return type incompatible with T)
Executes a stored procedure or function that is defined in the data source and expressed in the conceptual model; discards any results returned from the function; and returns the number of rows affected by the execution.
The number of rows affected.
The name of the stored procedure or function. The name can include the container name, such as <Container Name>.<Function Name>. When the default container name is known, only the function name is required.
An array of objects.
function is null or empty or function is not found.
The entity reader does not support this function or there is a type mismatch on the reader and the function .
Get the materializer for the resultSetIndexth result set of storeReader.
Generates an equivalent type that can be used with the Entity Framework for each type in the supplied enumeration.
An enumeration of objects that represent custom data classes that map to the conceptual model.
Returns all the existing proxy types.
An of all the existing proxy types.
Returns the entity type of the POCO entity associated with a proxy object of a specified type.
The of the associated POCO entity.
The of the proxy object.
Creates and returns an instance of the requested type .
An instance of the requested type T , or an instance of a derived type that enables T to be used with the Entity Framework. The returned object is either an instance of the requested type or an instance of a derived type that enables the requested type to be used with the Entity Framework.
Type of object to be returned.
Executes an arbitrary command directly against the data source using the existing connection.
The command is specified using the server's native query language, such as SQL.
As with any API that accepts SQL it is important to parameterize any user input to protect against a SQL injection attack. You can include parameter place holders in the SQL query string and then supply parameter values as additional arguments. Any parameter values you supply will automatically be converted to a DbParameter.
context.ExecuteStoreCommand("UPDATE dbo.Posts SET Rating = 5 WHERE Author = @p0", userSuppliedAuthor);
Alternatively, you can also construct a DbParameter and supply it to SqlQuery. This allows you to use named parameters in the SQL query string.
context.ExecuteStoreCommand("UPDATE dbo.Posts SET Rating = 5 WHERE Author = @author", new SqlParameter("@author", userSuppliedAuthor));
If there isn't an existing local transaction a new transaction will be used
to execute the command.
The command specified in the server's native query language.
The parameter values to use for the query.
The number of rows affected.
Executes an arbitrary command directly against the data source using the existing connection.
The command is specified using the server's native query language, such as SQL.
As with any API that accepts SQL it is important to parameterize any user input to protect against a SQL injection attack. You can include parameter place holders in the SQL query string and then supply parameter values as additional arguments. Any parameter values you supply will automatically be converted to a DbParameter.
context.ExecuteStoreCommand("UPDATE dbo.Posts SET Rating = 5 WHERE Author = @p0", userSuppliedAuthor);
Alternatively, you can also construct a DbParameter and supply it to SqlQuery. This allows you to use named parameters in the SQL query string.
context.ExecuteStoreCommand("UPDATE dbo.Posts SET Rating = 5 WHERE Author = @author", new SqlParameter("@author", userSuppliedAuthor));
Controls the creation of a transaction for this command.
The command specified in the server's native query language.
The parameter values to use for the query.
The number of rows affected.
Asynchronously executes an arbitrary command directly against the data source using the existing connection.
The command is specified using the server's native query language, such as SQL.
As with any API that accepts SQL it is important to parameterize any user input to protect against a SQL injection attack. You can include parameter place holders in the SQL query string and then supply parameter values as additional arguments. Any parameter values you supply will automatically be converted to a DbParameter.
context.ExecuteStoreCommandAsync("UPDATE dbo.Posts SET Rating = 5 WHERE Author = @p0", userSuppliedAuthor);
Alternatively, you can also construct a DbParameter and supply it to SqlQuery. This allows you to use named parameters in the SQL query string.
context.ExecuteStoreCommandAsync("UPDATE dbo.Posts SET Rating = 5 WHERE Author = @author", new SqlParameter("@author", userSuppliedAuthor));
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
If there isn't an existing local transaction a new transaction will be used
to execute the command.
The command specified in the server's native query language.
The parameter values to use for the query.
A task that represents the asynchronous operation.
The task result contains the number of rows affected.
Asynchronously executes an arbitrary command directly against the data source using the existing connection.
The command is specified using the server's native query language, such as SQL.
As with any API that accepts SQL it is important to parameterize any user input to protect against a SQL injection attack. You can include parameter place holders in the SQL query string and then supply parameter values as additional arguments. Any parameter values you supply will automatically be converted to a DbParameter.
context.ExecuteStoreCommandAsync("UPDATE dbo.Posts SET Rating = 5 WHERE Author = @p0", userSuppliedAuthor);
Alternatively, you can also construct a DbParameter and supply it to SqlQuery. This allows you to use named parameters in the SQL query string.
context.ExecuteStoreCommandAsync("UPDATE dbo.Posts SET Rating = 5 WHERE Author = @author", new SqlParameter("@author", userSuppliedAuthor));
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
Controls the creation of a transaction for this command.
The command specified in the server's native query language.
The parameter values to use for the query.
A task that represents the asynchronous operation.
The task result contains the number of rows affected.
Asynchronously executes an arbitrary command directly against the data source using the existing connection.
The command is specified using the server's native query language, such as SQL.
As with any API that accepts SQL it is important to parameterize any user input to protect against a SQL injection attack. You can include parameter place holders in the SQL query string and then supply parameter values as additional arguments. Any parameter values you supply will automatically be converted to a DbParameter.
context.ExecuteStoreCommandAsync("UPDATE dbo.Posts SET Rating = 5 WHERE Author = @p0", userSuppliedAuthor);
Alternatively, you can also construct a DbParameter and supply it to SqlQuery. This allows you to use named parameters in the SQL query string.
context.ExecuteStoreCommandAsync("UPDATE dbo.Posts SET Rating = 5 WHERE Author = @author", new SqlParameter("@author", userSuppliedAuthor));
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
If there isn't an existing local transaction a new transaction will be used
to execute the command.
The command specified in the server's native query language.
A to observe while waiting for the task to complete.
The parameter values to use for the query.
A task that represents the asynchronous operation.
The task result contains the number of rows affected.
Asynchronously executes an arbitrary command directly against the data source using the existing connection.
The command is specified using the server's native query language, such as SQL.
As with any API that accepts SQL it is important to parameterize any user input to protect against a SQL injection attack. You can include parameter place holders in the SQL query string and then supply parameter values as additional arguments. Any parameter values you supply will automatically be converted to a DbParameter.
context.ExecuteStoreCommandAsync("UPDATE dbo.Posts SET Rating = 5 WHERE Author = @p0", userSuppliedAuthor);
Alternatively, you can also construct a DbParameter and supply it to SqlQuery. This allows you to use named parameters in the SQL query string.
context.ExecuteStoreCommandAsync("UPDATE dbo.Posts SET Rating = 5 WHERE Author = @author", new SqlParameter("@author", userSuppliedAuthor));
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
Controls the creation of a transaction for this command.
The command specified in the server's native query language.
A to observe while waiting for the task to complete.
The parameter values to use for the query.
A task that represents the asynchronous operation.
The task result contains the number of rows affected.
Executes a query directly against the data source and returns a sequence of typed results.
The query is specified using the server's native query language, such as SQL.
Results are not tracked by the context, use the overload that specifies an entity set name to track results.
As with any API that accepts SQL it is important to parameterize any user input to protect against a SQL injection attack. You can include parameter place holders in the SQL query string and then supply parameter values as additional arguments. Any parameter values you supply will automatically be converted to a DbParameter.
context.ExecuteStoreQuery<Post>("SELECT * FROM dbo.Posts WHERE Author = @p0", userSuppliedAuthor);
Alternatively, you can also construct a DbParameter and supply it to SqlQuery. This allows you to use named parameters in the SQL query string.
context.ExecuteStoreQuery<Post>("SELECT * FROM dbo.Posts WHERE Author = @author", new SqlParameter("@author", userSuppliedAuthor));
The element type of the result sequence.
The query specified in the server's native query language.
The parameter values to use for the query.
An enumeration of objects of type .
Executes a query directly against the data source and returns a sequence of typed results.
The query is specified using the server's native query language, such as SQL.
Results are not tracked by the context, use the overload that specifies an entity set name to track results.
As with any API that accepts SQL it is important to parameterize any user input to protect against a SQL injection attack. You can include parameter place holders in the SQL query string and then supply parameter values as additional arguments. Any parameter values you supply will automatically be converted to a DbParameter.
context.ExecuteStoreQuery<Post>("SELECT * FROM dbo.Posts WHERE Author = @p0", userSuppliedAuthor);
Alternatively, you can also construct a DbParameter and supply it to SqlQuery. This allows you to use named parameters in the SQL query string.
context.ExecuteStoreQuery<Post>("SELECT * FROM dbo.Posts WHERE Author = @author", new SqlParameter("@author", userSuppliedAuthor));
The element type of the result sequence.
The query specified in the server's native query language.
The options for executing this query.
The parameter values to use for the query.
An enumeration of objects of type .
Executes a query directly against the data source and returns a sequence of typed results.
The query is specified using the server's native query language, such as SQL.
If an entity set name is specified, results are tracked by the context.
As with any API that accepts SQL it is important to parameterize any user input to protect against a SQL injection attack. You can include parameter place holders in the SQL query string and then supply parameter values as additional arguments. Any parameter values you supply will automatically be converted to a DbParameter.
context.ExecuteStoreQuery<Post>("SELECT * FROM dbo.Posts WHERE Author = @p0", userSuppliedAuthor);
Alternatively, you can also construct a DbParameter and supply it to SqlQuery. This allows you to use named parameters in the SQL query string.
context.ExecuteStoreQuery<Post>("SELECT * FROM dbo.Posts WHERE Author = @author", new SqlParameter("@author", userSuppliedAuthor));
The element type of the result sequence.
The query specified in the server's native query language.
The entity set of the TResult type. If an entity set name is not provided, the results are not going to be tracked.
The to use when executing the query. The default is
.
The parameter values to use for the query.
An enumeration of objects of type .
Executes a query directly against the data source and returns a sequence of typed results.
The query is specified using the server's native query language, such as SQL.
If an entity set name is specified, results are tracked by the context.
As with any API that accepts SQL it is important to parameterize any user input to protect against a SQL injection attack. You can include parameter place holders in the SQL query string and then supply parameter values as additional arguments. Any parameter values you supply will automatically be converted to a DbParameter.
context.ExecuteStoreQuery<Post>("SELECT * FROM dbo.Posts WHERE Author = @p0", userSuppliedAuthor);
Alternatively, you can also construct a DbParameter and supply it to SqlQuery. This allows you to use named parameters in the SQL query string.
context.ExecuteStoreQuery<Post>("SELECT * FROM dbo.Posts WHERE Author = @author", new SqlParameter("@author", userSuppliedAuthor));
The element type of the result sequence.
The query specified in the server's native query language.
The entity set of the TResult type. If an entity set name is not provided, the results are not going to be tracked.
The options for executing this query.
The parameter values to use for the query.
An enumeration of objects of type .
Asynchronously executes a query directly against the data source and returns a sequence of typed results.
The query is specified using the server's native query language, such as SQL.
Results are not tracked by the context, use the overload that specifies an entity set name to track results.
As with any API that accepts SQL it is important to parameterize any user input to protect against a SQL injection attack. You can include parameter place holders in the SQL query string and then supply parameter values as additional arguments. Any parameter values you supply will automatically be converted to a DbParameter.
context.ExecuteStoreQueryAsync<Post>("SELECT * FROM dbo.Posts WHERE Author = @p0", userSuppliedAuthor);
Alternatively, you can also construct a DbParameter and supply it to SqlQuery. This allows you to use named parameters in the SQL query string.
context.ExecuteStoreQueryAsync<Post>("SELECT * FROM dbo.Posts WHERE Author = @author", new SqlParameter("@author", userSuppliedAuthor));
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
The element type of the result sequence.
The query specified in the server's native query language.
The parameter values to use for the query.
A task that represents the asynchronous operation.
The task result contains an enumeration of objects of type .
Asynchronously executes a query directly against the data source and returns a sequence of typed results.
The query is specified using the server's native query language, such as SQL.
Results are not tracked by the context, use the overload that specifies an entity set name to track results.
As with any API that accepts SQL it is important to parameterize any user input to protect against a SQL injection attack. You can include parameter place holders in the SQL query string and then supply parameter values as additional arguments. Any parameter values you supply will automatically be converted to a DbParameter.
context.ExecuteStoreQueryAsync<Post>("SELECT * FROM dbo.Posts WHERE Author = @p0", userSuppliedAuthor);
Alternatively, you can also construct a DbParameter and supply it to SqlQuery. This allows you to use named parameters in the SQL query string.
context.ExecuteStoreQueryAsync<Post>("SELECT * FROM dbo.Posts WHERE Author = @author", new SqlParameter("@author", userSuppliedAuthor));
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
The element type of the result sequence.
The query specified in the server's native query language.
A to observe while waiting for the task to complete.
The parameter values to use for the query.
A task that represents the asynchronous operation.
The task result contains an enumeration of objects of type .
Asynchronously executes a query directly against the data source and returns a sequence of typed results.
The query is specified using the server's native query language, such as SQL.
Results are not tracked by the context, use the overload that specifies an entity set name to track results.
As with any API that accepts SQL it is important to parameterize any user input to protect against a SQL injection attack. You can include parameter place holders in the SQL query string and then supply parameter values as additional arguments. Any parameter values you supply will automatically be converted to a DbParameter.
context.ExecuteStoreQueryAsync<Post>("SELECT * FROM dbo.Posts WHERE Author = @p0", userSuppliedAuthor);
Alternatively, you can also construct a DbParameter and supply it to SqlQuery. This allows you to use named parameters in the SQL query string.
context.ExecuteStoreQueryAsync<Post>("SELECT * FROM dbo.Posts WHERE Author = @author", new SqlParameter("@author", userSuppliedAuthor));
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
The element type of the result sequence.
The query specified in the server's native query language.
The options for executing this query.
The parameter values to use for the query.
A task that represents the asynchronous operation.
The task result contains an enumeration of objects of type .
Asynchronously executes a query directly against the data source and returns a sequence of typed results.
The query is specified using the server's native query language, such as SQL.
Results are not tracked by the context, use the overload that specifies an entity set name to track results.
As with any API that accepts SQL it is important to parameterize any user input to protect against a SQL injection attack. You can include parameter place holders in the SQL query string and then supply parameter values as additional arguments. Any parameter values you supply will automatically be converted to a DbParameter.
context.ExecuteStoreQueryAsync<Post>("SELECT * FROM dbo.Posts WHERE Author = @p0", userSuppliedAuthor);
Alternatively, you can also construct a DbParameter and supply it to SqlQuery. This allows you to use named parameters in the SQL query string.
context.ExecuteStoreQueryAsync<Post>("SELECT * FROM dbo.Posts WHERE Author = @author", new SqlParameter("@author", userSuppliedAuthor));
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
The element type of the result sequence.
The query specified in the server's native query language.
The options for executing this query.
A to observe while waiting for the task to complete.
The parameter values to use for the query.
A task that represents the asynchronous operation.
The task result contains an enumeration of objects of type .
Asynchronously executes a query directly against the data source and returns a sequence of typed results.
The query is specified using the server's native query language, such as SQL.
If an entity set name is specified, results are tracked by the context.
As with any API that accepts SQL it is important to parameterize any user input to protect against a SQL injection attack. You can include parameter place holders in the SQL query string and then supply parameter values as additional arguments. Any parameter values you supply will automatically be converted to a DbParameter.
context.ExecuteStoreQueryAsync<Post>("SELECT * FROM dbo.Posts WHERE Author = @p0", userSuppliedAuthor);
Alternatively, you can also construct a DbParameter and supply it to SqlQuery. This allows you to use named parameters in the SQL query string.
context.ExecuteStoreQueryAsync<Post>("SELECT * FROM dbo.Posts WHERE Author = @author", new SqlParameter("@author", userSuppliedAuthor));
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
The element type of the result sequence.
The query specified in the server's native query language.
The entity set of the TResult type. If an entity set name is not provided, the results are not going to be tracked.
The options for executing this query.
The parameter values to use for the query.
A task that represents the asynchronous operation.
The task result contains an enumeration of objects of type .
Asynchronously executes a query directly against the data source and returns a sequence of typed results.
The query is specified using the server's native query language, such as SQL.
If an entity set name is specified, results are tracked by the context.
As with any API that accepts SQL it is important to parameterize any user input to protect against a SQL injection attack. You can include parameter place holders in the SQL query string and then supply parameter values as additional arguments. Any parameter values you supply will automatically be converted to a DbParameter.
context.ExecuteStoreQueryAsync<Post>("SELECT * FROM dbo.Posts WHERE Author = @p0", userSuppliedAuthor);
Alternatively, you can also construct a DbParameter and supply it to SqlQuery. This allows you to use named parameters in the SQL query string.
context.ExecuteStoreQueryAsync<Post>("SELECT * FROM dbo.Posts WHERE Author = @author", new SqlParameter("@author", userSuppliedAuthor));
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
The element type of the result sequence.
The query specified in the server's native query language.
The entity set of the TResult type. If an entity set name is not provided, the results are not going to be tracked.
The options for executing this query.
A to observe while waiting for the task to complete.
The parameter values to use for the query.
A task that represents the asynchronous operation.
The task result contains an enumeration of objects of type .
Translates a that contains rows of entity data to objects of the requested entity type.
An enumeration of objects of type TResult .
The that contains entity data to translate into entity objects.
When reader is null.
Translates a that contains rows of entity data to objects of the requested entity type, in a specific entity set, and with the specified merge option.
An enumeration of objects of type TResult .
The that contains entity data to translate into entity objects.
The entity set of the TResult type.
The to use when translated objects are added to the object context. The default is
.
When reader is null.
When the supplied mergeOption is not a valid value.
When the supplied entitySetName is not a valid entity set for the TResult type.
Creates the database by using the current data source connection and the metadata in the
.
Deletes the database that is specified as the database in the current data source connection.
Checks if the database that is specified as the database in the current store connection exists on the store. Most of the actual work
is done by the DbProviderServices implementation for the current store connection.
Generates a data definition language (DDL) script that creates schema objects (tables, primary keys, foreign keys) for the metadata in the
. The
loads metadata from store schema definition language (SSDL) files.
A DDL script that creates schema objects for the metadata in the
.
Attempts to retrieve an DbGeneratedViewCacheTypeAttribute specified at assembly level,
that associates the type of the context with an mapping view cache type. If one is found
this method initializes the mapping view cache factory for this context with a new
instance of DefaultDbMappingViewCacheFactory.
A DbContext that owns this ObjectContext.
Gets the connection used by the object context.
A object that is the connection.
When the instance has been disposed.
Gets or sets the default container name.
A that is the default container name.
Gets the metadata workspace used by the object context.
The object associated with this
.
Gets the object state manager used by the object context to track object changes.
The used by this
.
ClrPerspective based on the MetadataWorkspace.
Gets or sets the timeout value, in seconds, for all object context operations. A null value indicates that the default value of the underlying provider will be used.
An value that is the timeout value, in seconds.
The timeout value is less than 0.
Gets the LINQ query provider associated with this object context.
The instance used by this object context.
Whether or not we are in the middle of materialization
Used to suppress operations such as lazy loading that are not allowed during materialization
Indicates whether there is an asynchronous method currently running that uses this instance
Gets the instance that contains options that affect the behavior of the
.
The instance that contains options that affect the behavior of the
.
Returns itself. ObjectContext implements to provide a common
interface for and ObjectContext both of which will return the underlying
ObjectContext.
Occurs when changes are saved to the data source.
Occurs when a new entity object is created from data in the data source as part of a query or load operation.
Returns true if any handlers for the ObjectMaterialized event exist. This is
used for perf reasons to avoid collecting the information needed for the event
if there is no point in firing it.
Supports binding EntityClient parameters to Object Services parameters.
Defines options that affect the behavior of the ObjectContext.
Gets or sets a Boolean value that determines whether related objects are loaded automatically when a navigation property is accessed.
true if lazy loading is enabled; otherwise, false.
Gets or sets a Boolean value that determines whether proxy instances are created for custom data classes that are persistence ignorant.
true if proxies are created; otherwise, false. The default value is true.
Gets or sets a Boolean value that determines whether to use the legacy PreserveChanges behavior.
true if the legacy PreserveChanges behavior should be used; otherwise, false.
Gets or sets a Boolean value that determines whether to use the consistent NullReference behavior.
If this flag is set to false then setting the Value property of the for an
FK relationship to null when it is already null will have no effect. When this flag is set to true, then
setting the value to null will always cause the FK to be nulled and the relationship to be deleted
even if the value is currently null. The default value is false when using ObjectContext and true
when using DbContext.
true if the consistent NullReference behavior should be used; otherwise, false.
Gets or sets a Boolean value that determines whether to use the C# NullComparison behavior.
This flag determines whether C# behavior should be exhibited when comparing null values in LinqToEntities.
If this flag is set, then any equality comparison between two operands, both of which are potentially
nullable, will be rewritten to show C# null comparison semantics. As an example:
(operand1 = operand2) will be rewritten as
(((operand1 = operand2) AND NOT (operand1 IS NULL OR operand2 IS NULL)) || (operand1 IS NULL && operand2 IS NULL))
The default value is false when using .
true if the C# NullComparison behavior should be used; otherwise, false.
EventArgs for the ObjectMaterialized event.
The object that was materialized.
Constructs new arguments for the ObjectMaterialized event.
The object that has been materialized.
Gets the entity object that was created.
The entity object that was created.
Delegate for the ObjectMaterialized event.
The ObjectContext responsable for materializing the object.
EventArgs containing a reference to the materialized object.
This class represents a query parameter at the object layer, which consists
of a Name, a Type and a Value.
This internal method uses regular expression matching to ensure that the
specified parameter name is valid. Parameter names must start with a letter,
and may only contain letters (A-Z, a-z), numbers (0-9) and underscores (_).
Initializes a new instance of the class with the specified name and type.
The parameter name. This name should not include the "@" parameter marker that is used in the Entity SQL statements, only the actual name. The first character of the expression must be a letter. Any successive characters in the expression must be either letters, numbers, or an underscore (_) character.
The common language runtime (CLR) type of the parameter.
If the value of either argument is null.
If the value of the name argument is invalid. Parameter names must start with a letter and can only contain letters, numbers, and underscores.
Initializes a new instance of the class with the specified name and value.
The parameter name. This name should not include the "@" parameter marker that is used in Entity SQL statements, only the actual name. The first character of the expression must be a letter. Any successive characters in the expression must be either letters, numbers, or an underscore (_) character.
The initial value (and inherently, the type) of the parameter.
If the value of either argument is null.
If the value of the name argument is not valid. Parameter names must start with a letter and can only contain letters, numbers, and underscores.
This constructor is used by to create a new ObjectParameter
with field values taken from the field values of an existing ObjectParameter.
The existing ObjectParameter instance from which field values should be taken.
A new ObjectParameter instance with the same field values as the specified ObjectParameter
The name of the parameter. Cannot be null and is immutable.
The CLR type of the parameter. Cannot be null and is immutable.
The mappable CLR type of the parameter. Unless the parameter type is
Nullable, this type is equal to the parameter type. In the case of
Nullable parameters, this type is the underlying Nullable argument
type. Cannot be null and is immutable.
Used to specify the exact metadata type of this parameter.
Typically null, can only be set using the internal property.
The value of the parameter. Does not need to be bound until execution
time and can be modified at any time.
Creates a new ObjectParameter instance with identical field values to this instance.
The new ObjectParameter instance
This internal method ensures that the specified type is a scalar
type supported by the underlying provider by ensuring that scalar
metadata for this type is retrievable.
Gets the parameter name, which can only be set through a constructor.
The parameter name, which can only be set through a constructor.
Gets the parameter type.
The of the parameter.
Gets or sets the parameter value.
The parameter value.
Gets or sets a that specifies the exact
type of which the parameter value is considered an instance.
The mappable parameter type; this is primarily used to handle the case of
Nullable parameter types. For example, metadata knows nothing about 'int?',
only 'Int32'. For internal use only.
This class represents a collection of query parameters at the object layer.
This internal constructor creates a new query parameter collection and
initializes the internal parameter storage.
Can parameters be added or removed from this collection?
The internal storage for the query parameters in the collection.
A CLR perspective necessary to do type-checking on parameters as they
are added to the collection.
A string that can be used to represent the current state of this parameter collection in an ObjectQuery cache key.
Adds the specified to the collection.
The parameter to add to the collection.
The parameter argument is null.
The parameter argument already exists in the collection. This behavior differs from that of most collections that allow duplicate entries. -or-Another parameter with the same name as the parameter argument already exists in the collection. Note that the lookup is case-insensitive. This behavior differs from that of most collections, and is more like that of a
.
The type of the parameter is not valid.
Deletes all instances from the collection.
Checks for the existence of a specified in the collection by reference.
Returns true if the parameter object was found in the collection; otherwise, false.
The to find in the collection.
The parameter argument is null.
Determines whether an with the specified name is in the collection.
Returns true if a parameter with the specified name was found in the collection; otherwise, false.
The name of the parameter to look for in the collection. This name should not include the "@" parameter marker that is used in the Entity SQL statements, only the actual name.
The name parameter is null.
Allows the parameters in the collection to be copied into a supplied array, starting with the object at the specified index.
The array into which to copy the parameters.
The index in the array at which to start copying the parameters.
Removes an instance of an from the collection by reference if it exists in the collection.
Returns true if the parameter object was found and removed from the collection; otherwise, false.
An object to remove from the collection.
The parameter argument is null.
These methods return enumerator instances, which allow the collection to
be iterated through and traversed.
Returns an untyped enumerator over the collection.
An instance.
Retrieves a string that may be used to represent this parameter collection in an ObjectQuery cache key.
If this collection has not changed since the last call to this method, the same string instance is returned.
Note that this string is used by various ObjectQueryImplementations to version the parameter collection.
A string that may be used to represent this parameter collection in an ObjectQuery cache key.
Locks or unlocks this parameter collection, allowing its contents to be added to, removed from, or cleared.
Calling this method consecutively with the same value has no effect but does not throw an exception.
If true , this parameter collection is now locked; otherwise it is unlocked
Creates a new copy of the specified parameter collection containing copies of its element
s.
If the specified argument is null, then null is returned.
The parameter collection to copy
The new collection containing copies of parameters, if
is non-null; otherwise null .
This private method checks for the existence of a given parameter object
by name by iterating through the list and comparing each parameter name
to the specified name. This is a case-insensitive lookup.
This method successfully returns only if the parameter collection is not considered 'locked';
otherwise an is thrown.
Gets the number of parameters currently in the collection.
The number of objects that are currently in the collection.
This collection is read-write - parameters may be added, removed
and [somewhat] modified at will (value only) - provided that the
implementation the collection belongs to has not locked its parameters
because it's command definition has been prepared.
Provides an indexer that allows callers to retrieve parameters by name.
The instance.
The name of the parameter to find. This name should not include the "@" parameter marker that is used in the Entity SQL statements, only the actual name.
No parameter with the specified name is found in the collection.
This class implements untyped queries at the object-layer.
The underlying implementation of this ObjectQuery as provided by a concrete subclass
of ObjectQueryImplementation. Implementations currently exist for Entity-SQL- and Linq-to-Entities-based ObjectQueries.
The result type of the query - 'TResultType' expressed as an O-Space type usage. Cached here and
only instantiated if the method is called.
Every instance of ObjectQuery get a unique instance of the provider. This helps propagate state information
using the provider through LINQ operators.
The common constructor.
The underlying implementation of this ObjectQuery
A new ObjectQuery instance.
For testing.
Returns the commands to execute against the data source.
A string that represents the commands that the query executes against the data source.
Returns information about the result type of the query.
A value that contains information about the result type of the query.
Executes the untyped object query with the specified merge option.
The to use when executing the query.
The default is .
An that contains a collection of entity objects returned by the query.
Asynchronously executes the untyped object query with the specified merge option.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
The to use when executing the query.
The default is .
A task that represents the asynchronous operation.
The task result contains an an
that contains a collection of entity objects returned by the query.
Asynchronously executes the untyped object query with the specified merge option.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
The to use when executing the query.
The default is .
A to observe while waiting for the task to complete.
A task that represents the asynchronous operation.
The task result contains an an
that contains a collection of entity objects returned by the query.
Returns the collection as an used for data binding.
An of entity objects.
Returns an enumerator that iterates through a collection.
An that can be used to iterate through the collection.
Returns an which when enumerated will execute the given SQL query against the database.
The query results.
Gets an untyped instantiation of the underlying ObjectQueryState that implements this ObjectQuery.
Gets the associated with this query instance.
Returns the command text for the query.
A string value.
Gets the object context associated with this object query.
The associated with this
instance.
Gets or sets how objects returned from a query are added to the object context.
The query .
Whether the query is streaming or buffering
Gets the parameter collection for this object query.
The parameter collection for this .
Gets or sets a value that indicates whether the query plan should be cached.
A value that indicates whether the query plan should be cached.
Gets the result element type for this query instance.
Gets the expression describing this query. For queries built using
LINQ builder patterns, returns a full LINQ expression tree; otherwise,
returns a constant expression wrapping this query. Note that the
default expression is not cached. This allows us to differentiate
between LINQ and Entity-SQL queries.
Gets the associated with this query instance.
ObjectQuery implements strongly-typed queries at the object-layer.
Queries are specified using Entity-SQL strings and may be created by calling
the Entity-SQL-based query builder methods declared by ObjectQuery.
The result type of this ObjectQuery
The default query name, which is used in query-building to refer to an
element of the ObjectQuery; e.g., in a call to ObjectQuery.Where(), a predicate of
the form "it.Name = 'Foo'" can be specified, where "it" refers to a T.
Note that the query name may eventually become a parameter in the command
tree, so it must conform to the parameter name restrictions enforced by
ObjectParameter.ValidateParameterName(string).
The name of the current sequence, which defaults to "it". Used in query-
builder methods that process an Entity-SQL command text fragment to refer to an
instance of the return type of this query.
Creates a new instance using the specified Entity SQL command as the initial query.
The Entity SQL query.
The on which to execute the query.
Creates a new instance using the specified Entity SQL command as the initial query and the specified merge option.
The Entity SQL query.
The on which to execute the query.
Specifies how the entities that are retrieved through this query should be merged with the entities that have been returned from previous queries against the same
.
This method creates a new ObjectQuery instance that represents a scan over
the specified . This ObjectQuery carries the scan as
and as Entity SQL. This is needed to allow case-sensitive metadata access (provided by the by default).
The context specifies the connection on which to execute the query as well as the metadata and result cache.
The merge option specifies how the cache should be populated/updated.
The entity set this query scans.
The ObjectContext containing the metadata workspace the query will be built against, the connection
on which to execute the query, and the cache to store the results in.
The MergeOption to use when executing the query.
A new ObjectQuery instance.
For testing.
Executes the object query with the specified merge option.
The to use when executing the query.
The default is .
An that contains a collection of entity objects returned by the query.
Asynchronously executes the object query with the specified merge option.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
The to use when executing the query.
The default is .
A task that represents the asynchronous operation.
The task result contains an
that contains a collection of entity objects returned by the query.
Asynchronously executes the object query with the specified merge option.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
The to use when executing the query.
The default is .
A to observe while waiting for the task to complete.
A task that represents the asynchronous operation.
The task result contains an
that contains a collection of entity objects returned by the query.
Specifies the related objects to include in the query results.
A new with the defined query path.
Dot-separated list of related objects to return in the query results.
path is null.
path is empty.
Limits the query to unique results.
A new instance that is equivalent to the original instance with SELECT DISTINCT applied.
This query-builder method creates a new query whose results are all of
the results of this query, except those that are also part of the other
query specified.
A query representing the results to exclude.
a new ObjectQuery instance.
If the query parameter is null.
Groups the query results by the specified criteria.
A new instance of type
that is equivalent to the original instance with GROUP BY applied.
The key columns by which to group the results.
The list of selected properties that defines the projection.
Zero or more parameters that are used in this method.
The query parameter is null or an empty string
or the projection parameter is null or an empty string.
This query-builder method creates a new query whose results are those that
are both in this query and the other query specified.
A query representing the results to intersect with.
a new ObjectQuery instance.
If the query parameter is null.
Limits the query to only results of a specific type.
A new instance that is equivalent to the original instance with OFTYPE applied.
The type of the returned when the query is executed with the applied filter.
The type specified is not valid.
Orders the query results by the specified criteria.
A new instance that is equivalent to the original instance with ORDER BY applied.
The key columns by which to order the results.
Zero or more parameters that are used in this method.
The keys or parameters parameter is null.
The key is an empty string.
Limits the query results to only the properties that are defined in the specified projection.
A new instance of type
that is equivalent to the original instance with SELECT applied.
The list of selected properties that defines the projection.
Zero or more parameters that are used in this method.
projection is null or parameters is null.
The projection is an empty string.
Limits the query results to only the property specified in the projection.
A new instance of a type compatible with the specific projection. The returned
is equivalent to the original instance with SELECT VALUE applied.
The projection list.
An optional set of query parameters that should be in scope when parsing.
The type of the returned by the
method.
projection is null or parameters is null.
The projection is an empty string.
Orders the query results by the specified criteria and skips a specified number of results.
A new instance that is equivalent to the original instance with both ORDER BY and SKIP applied.
The key columns by which to order the results.
The number of results to skip. This must be either a constant or a parameter reference.
An optional set of query parameters that should be in scope when parsing.
Any argument is null.
keys is an empty string or count is an empty string.
Limits the query results to a specified number of items.
A new instance that is equivalent to the original instance with TOP applied.
The number of items in the results as a string.
An optional set of query parameters that should be in scope when parsing.
count is null.
count is an empty string.
This query-builder method creates a new query whose results are all of
the results of this query, plus all of the results of the other query,
without duplicates (i.e., results are unique).
A query representing the results to add.
a new ObjectQuery instance.
If the query parameter is null.
This query-builder method creates a new query whose results are all of
the results of this query, plus all of the results of the other query,
including any duplicates (i.e., results are not necessarily unique).
A query representing the results to add.
a new ObjectQuery instance.
If the query parameter is null.
Limits the query to results that match specified filtering criteria.
A new instance that is equivalent to the original instance with WHERE applied.
The filter predicate.
Zero or more parameters that are used in this method.
predicate is null or parameters is null.
The predicate is an empty string.
Returns an which when enumerated will execute the given SQL query against the database.
The query results.
Returns an which when enumerated will execute the given SQL query against the database.
The query results.
Retrieves the LINQ expression that backs this ObjectQuery for external consumption.
It is important that the work to wrap the expression in an appropriate MergeAs call
takes place in this method and NOT in ObjectQueryState.TryGetExpression which allows
the unmodified expression (that does not include the MergeOption-preserving MergeAs call)
to be retrieved and processed by the ELinq ExpressionConverter.
The LINQ expression for this ObjectQuery, wrapped in a MergeOption-preserving call to the MergeAs method if the ObjectQuery.MergeOption property has been set.
Gets or sets the name of this object query.
A string value that is the name of this .
The value specified on set is not valid.
This class implements IEnumerable and IDisposable. Instance of this class
is returned from ObjectQuery.Execute method.
Returns an enumerator that iterates through the query results.
An enumerator that iterates through the query results.
Returns the results in a format useful for data binding.
An of entity objects.
Performs tasks associated with freeing, releasing, or resetting resources.
Releases the resources used by the object result.
true to release both managed and unmanaged resources; false to release only unmanaged resources.
Gets the next result set of a stored procedure.
An ObjectResult that enumerates the values of the next result set. Null, if there are no more, or if the ObjectResult is not the result of a stored procedure call.
The type of the element.
IListSource.ContainsListCollection implementation. Always returns false.
When overridden in a derived class, gets the type of the generic
.
The type of the generic .
This class represents the result of the method.
Returns an enumerator that iterates through the query results.
An enumerator that iterates through the query results.
Releases the unmanaged resources used by the and optionally releases the managed resources.
true to release managed and unmanaged resources; false to release only unmanaged resources.
Gets the type of the .
A that is the type of the .
Represents a typed entity set that is used to perform create, read, update, and delete operations.
The type of the entity.
Creates a new ObjectSet that has a base ObjectQuery with the CommandText that represents
all of the entities in the specified EntitySet.
Sets the query's command text to the fully-qualified, quoted, EntitySet name, i.e. [EntityContainerName].[EntitySetName]
Explicitly set MergeOption to AppendOnly in order to mirror CreateQuery behavior
Metadata EntitySet on which to base the ObjectSet.
ObjectContext to be used for the query and data modification operations.
Adds an object to the object context in the current entity set.
The object to add.
Attaches an object or object graph to the object context in the current entity set.
The object to attach.
Marks an object for deletion.
An object that represents the entity to delete. The object can be in any state except
.
Removes the object from the object context.
Object to be detached. Only the entity is removed; if there are any related objects that are being tracked by the same
, those will not be detached automatically.
Copies the scalar values from the supplied object into the object in the
that has the same key.
The updated object.
The detached object that has property updates to apply to the original object. The entity key of currentEntity must match the
property of an entry in the
.
Sets the property of an
to match the property values of a supplied object.
The updated object.
The detached object that has property updates to apply to the original object. The entity key of originalEntity must match the
property of an entry in the
.
Creates a new entity type object.
The new entity type object, or an instance of a proxy type that corresponds to the entity type.
Creates an instance of the specified type.
An instance of the requested type T , or an instance of a proxy type that corresponds to the type T .
Type of object to be returned.
Gets the metadata of the entity set represented by this instance.
An object.
The original values of the properties of an entity when it was retrieved from the database.
Maintains object state and identity management for entity type instances and relationship instances.
Initializes a new instance of the class.
The , which supplies mapping and metadata information.
Adds an object stub to the cache.
the key of the object to add
the entity set of the given object
Validates that the proxy type being attached to the context matches the proxy type
that would be generated for the given CLR type for the currently loaded metadata.
This prevents a proxy for one set of metadata being incorrectly loaded into a context
which has different metadata.
Adds an object to the ObjectStateManager.
the object to add
the entity set of the given object
Name of the argument passed to a public method, for use in exceptions.
Indicates whether the entity is added or unchanged.
Adds an entry to the index of foreign keys that reference entities that we don't yet know about.
The foreign key found in the entry
The entry that contains the foreign key that was found
Removes an entry to the index of foreign keys that reference entities that we don't yet know about.
This is typically done when the entity is detached from the context.
The foreign key found in the entry
The entry that contains the foreign key that was found
Removes the foreign key from the index of those keys that have been found in entries
but for which it was not possible to do fixup because the entity that the foreign key
referenced was not in the state manager.
The key to lookup and remove
Gets all state entries that contain the given foreign key for which we have not performed
fixup because the state manager did not contain the entity to which the foreign key pointed.
The key to lookup
The state entries that contain the key
Adds to index of currently tracked entities that have FK values that are conceptually
null but not actually null because the FK properties are not nullable.
If this index is non-empty in AcceptAllChanges or SaveChanges, then we throw.
If AcceptChanges is called on an entity and that entity is in the index, then
we will throw.
Note that the index is keyed by EntityEntry reference because it's only ever used
when we have the EntityEntry and this makes it slightly faster than using key lookup.
Checks whether or not there is some entry in the context that has any conceptually but not
actually null FK values.
Checks whether the given entry has conceptually but not actually null FK values.
Stops keeping track of an entity with conceptual nulls because the FK values have been
really set or because the entity is leaving the context or becoming deleted.
Upgrades an entity key entry in the cache to a a regular entity
the key entry that exists in the state manager
the object to add
True if this promoted key entry is replacing an existing detached entry
Tells whether we should allow the IsLoaded flag to be set to true for RelatedEnds
Performs non-generic collection or reference fixup between two entities
This method should only be used in scenarios where we are automatically hooking up relationships for
the user, and not in cases where they are manually setting relationships.
The MergeOption to use to decide how to resolve EntityReference conflicts
The entity instance on the source side of the relationship
The AssociationEndMember that contains the metadata for the source entity
The entity instance on the source side of the relationship
The AssociationEndMember that contains the metadata for the target entity
Tells whether we should allow the IsLoaded flag to be set to true for RelatedEnds
Whether or not the relationship entry already exists in the cache for these entities
Whether this method is used in key entry promotion
Updates the relationships between a given source entity and a collection of target entities.
Used for full span and related end Load methods, where the following may be true:
(a) both sides of each relationship are always full entities and not stubs
(b) there could be multiple entities to process at once
(c) NoTracking queries are possible.
Not used for relationship span because although some of the logic is similar, the above are not true.
ObjectContext to use to look up existing relationships. Using the context here instead of ObjectStateManager because for NoTracking queries we shouldn't even touch the state manager at all, so we don't want to access it until we know we are not using NoTracking.
MergeOption to use when updating existing relationships
AssociationSet for the relationships
Role of sourceEntity in associationSet
Source entity in the relationship
Role of each targetEntity in associationSet
List of target entities to use to create relationships with sourceEntity
Tells whether we should allow the IsLoaded flag to be set to true for RelatedEnds
Removes relationships if necessary when a query determines that the source entity has no relationships on the server
MergeOption to use when updating existing relationships
AssociationSet for the incoming relationship
EntityKey of the source entity in the relationship
Role of the source entity in the relationship
Tries to updates one or more existing relationships for an entity, based on a given MergeOption and a target entity.
ObjectContext to use to look up existing relationships for sourceEntity
MergeOption to use when updating existing relationships
AssociationSet for the relationship we are looking for
AssociationEndMember for the source role of the relationship
EntityKey for the source entity in the relationship (passed here so we don't have to look it up again)
Source entity in the relationship
AssociationEndMember for the target role of the relationship
EntityKey for the target entity in the relationship
Tells whether we should allow the IsLoaded flag to be set to true for RelatedEnds
[out] EntityState to be used for in scenarios where we need to add a new relationship after this method has returned
true if an existing relationship is found and updated, and no further action is needed false if either no relationship was found, or if one was found and updated, but a new one still needs to be added
Attach entity in unchanged state (skip Added state, don't create temp key)
It is equal (but faster) to call AddEntry(); AcceptChanges().
Checks that the EntityKey attached to the given entity
appropriately matches the given entity.
The entity whose key must be verified
The entity set corresponding to the type of the given entity.
If true, then the exception message will reflect a bad key to attach, otherwise it will reflect a general inconsistency
Adds the given relationship cache entry to the mapping from each of its endpoint keys.
Adds the given relationship cache entry to the mapping from the given endpoint key.
Deletes the given relationship cache entry from the mapping from each of its endpoint keys.
Deletes the given relationship cache entry from the mapping from the given endpoint key.
DeleteRelationship
The deleted entry
DeleteKeyEntry
Finds all relationships with the given key at one end.
Finds all relationships with the given key at one end.
Do not use the list to add elements
Find the ObjectStateEntry from _keylessEntityStore for an entity that doesn't implement IEntityWithKey.
Returns a collection of objects for objects or relationships with the given state.
A collection of objects in the given
.
An used to filter the returned
objects.
When state is .
Returns all CacheEntries in the given state.
if EntityState.Detached flag is set in state
Performs key-fixup on the given entry, by creating a (permanent) EntityKey
based on the current key values within the associated entity and fixing up
all associated relationship entries.
Will promote EntityEntry.IsKeyEntry and leave in _unchangedStore
otherwise will move EntityEntry from _addedStore to _unchangedStore.
Replaces permanent EntityKey with a temporary key. Used in N-Tier API.
Resets the EntityKey for this entry. This method is called
as part of temporary key fixup and permanent key un-fixup. This method is necessary because it is the only
scenario where we allow a new value to be set on a non-null EntityKey. This
is the only place where we should be setting and clearing _inRelationshipFixup.
Changes state of the for a specific object to the specified entityState .
The for the supplied entity .
The object for which the state must be changed.
The new state of the object.
When entity is null.
When the object is not detached and does not have an entry in the state manager
or when you try to change the state to
from any other
or when state is not a valid value.
Changes the state of the relationship between two entity objects that is specified based on the two related objects and the name of the navigation property.
The for the relationship that was changed.
The object instance or of the source entity at one end of the relationship.
The object instance or of the target entity at the other end of the relationship.
The name of the navigation property on source that returns the specified target .
The requested of the specified relationship.
When source or target is null.
When trying to change the state of the relationship to a state other than
or
when either source or target is in a state
or when you try to change the state of the relationship to a state other than
or
when either source or target is in an state
or when state is not a valid value
Changes the state of the relationship between two entity objects that is specified based on the two related objects and a LINQ expression that defines the navigation property.
The for the relationship that was changed.
The object instance or of the source entity at one end of the relationship.
The object instance or of the target entity at the other end of the relationship.
A LINQ expression that selects the navigation property on source that returns the specified target .
The requested of the specified relationship.
The entity type of the source object.
When source , target , or selector is null.
selector is malformed or cannot return a navigation property.
When you try to change the state of the relationship to a state other than
or
when either source or target is in a
state
or when you try to change the state of the relationship to a state other than
or
when either source or target is in an state
or when state is not a valid value.
Changes the state of the relationship between two entity objects that is specified based on the two related objects and the properties of the relationship.
The for the relationship that was changed.
The object instance or of the source entity at one end of the relationship.
The object instance or of the target entity at the other end of the relationship.
The name of the relationship.
The role name at the target end of the relationship.
The requested of the specified relationship.
When source or target is null.
When you try to change the state of the relationship to a state other than
or
when either source or target is in a state
or when you try to change the state of the relationship to a state other than
or
when either source or target is in an
state
or when state is not a valid value.
Retrieve the corresponding IEntityStateEntry for the given EntityKey.
if key is null
if key is not found
Returns an for the object or relationship entry with the specified key.
The corresponding for the given
.
The .
When key is null.
When the specified key cannot be found in the state manager.
No entity with the specified exists in the
.
Returns an for the specified object.
The corresponding for the given
.
The to which the retrieved
belongs.
No entity for the specified exists in the
.
Tries to retrieve the corresponding for the specified
.
A Boolean value that is true if there is a corresponding
for the given object; otherwise, false.
The to which the retrieved
belongs.
When this method returns, contains the for the given
This parameter is passed uninitialized.
Retrieve the corresponding IEntityStateEntry for the given EntityKey.
true if the corresponding IEntityStateEntry was found
if key is null
Given a key that represents an entity on the dependent side of a FK, this method attempts to return the key of the
entity on the principal side of the FK. If the two entities both exist in the context, then the primary key of
the principal entity is found and returned. If the principal entity does not exist in the context, then a key
for it is built up from the foreign key values contained in the dependent entity.
The key of the dependent entity
The role indicating the FK to navigate
Set to the principal key or null on return
True if the principal key was found or built; false if it could not be found or built
Tries to retrieve the corresponding for the object or relationship with the specified
.
A Boolean value that is true if there is a corresponding
for the given
; otherwise, false.
The given .
When this method returns, contains an for the given
This parameter is passed uninitialized.
A null (Nothing in Visual Basic) value is provided for key .
Retrieve the corresponding EntityEntry for the given entity.
Returns null if key is unavailable or passed entity is null.
Returns the that is used by the specified object.
The for the specified object.
The object for which to return the .
The entity does not implement IEntityWithRelationships and is not tracked by this ObjectStateManager
Returns the that is used by the specified object.
true if a instance was returned for the supplied entity ; otherwise false.
The object for which to return the .
When this method returns, contains the
for the entity .
Removes the given cache entry from the appropriate dictionary, based on
the given state and whether or not the entry represents a relationship.
Removes the given cache entry from the appropriate dictionary, based on
the given state and whether or not the entry represents a relationship.
If a corresponding StateManagerTypeMetadata exists, it is returned.
Otherwise, a StateManagerTypeMetadata is created and cached.
If a corresponding StateManagerTypeMetadata exists, it is returned.
Otherwise, a StateManagerTypeMetadata is created and cached.
Creates an instance of StateManagerTypeMetadata from the given EdmType and ObjectMapping,
and stores it in the metadata cache. The new instance is returned.
Mark the ObjectStateManager as disposed
For every tracked entity which doesn't implement IEntityWithChangeTracker detect changes in the entity's property values
and marks appropriate ObjectStateEntry as Modified.
For every tracked entity which doesn't implement IEntityWithRelationships detect changes in its relationships.
The method is used internally by ObjectContext.SaveChanges() but can be also used if user wants to detect changes
and have ObjectStateEntries in appropriate state before the SaveChanges() method is called.
Gets the associated with this state manager.
The associated with this
.
Occurs when entities are added to or removed from the state manager.
Flag that is set when we are processing an FK setter for a full proxy.
This is used to determine whether or not we will attempt to call out into FK
setters and null references during fixup.
The value of this property is either null if the code is not executing an
FK setter, or points to the entity on which the FK setter has been called.
Manages a binding list constructed from an EntityCollection.
Type of the elements in the binding list.
Type of element in the underlying EntityCollection.
The binding list is initialized from the EntityCollection,
and is synchronized with changes made to the EntityCollection membership.
This class always allows additions and removals from the binding list.
True if item that was added to binding list but not underlying entity collection
is now being committed to the collection.
Otherwise false.
Used by CommitItemAt and OnCollectionChanged methods to coordinate addition
of new item to underlying entity collection.
Construct a new instance of the ObjectViewEntityCollectionData class using the supplied entityCollection.
EntityCollection used to populate the binding list.
Creates instances of ObjectView that provide a binding list for ObjectQuery results and EntityCollections.
The factory methods construct an ObjectView whose generic type parameter (and typed of elements in the binding list)
is of the same type or a more specific derived type of the generic type of the ObjectQuery or EntityCollection.
The EDM type of the query results or EntityType or the EntityCollection is examined to determine
the appropriate type to be used.
For example, if you have an ObjectQuery whose generic type is "object", but the EDM result type of the Query maps
to the CLR type "Customer", then the ObjectView returned will specify a generic type of "Customer", and not "object".
Return a list suitable for data binding using the supplied query results.
CLR type of query result elements declared by the caller.
The EDM type of the query results, used as the primary means of determining the CLR type of list returned by this method.
IEnumerable used to enumerate query results used to populate binding list. Must not be null.
associated with the query from which results were obtained. Must not be null.
True to prevent modifications to the binding list built from the query result; otherwise false . Note that other conditions may prevent the binding list from being modified, so a value of false supplied for this parameter doesn't necessarily mean that the list will be writable.
If the query results are composed of entities that only exist in a single
, the value of this parameter is the single EntitySet. Otherwise the value of this parameter should be null.
that is suitable for data binding.
Return a list suitable for data binding using the supplied EntityCollection
CLR type of the elements of the EntityCollection.
The EntityType of the elements in the collection. This should either be the same as the EntityType that corresponds to the CLR TElement type, or a EntityType derived from the declared EntityCollection element type.
The EntityCollection from which a binding list is created.
that is suitable for data binding.
Create an ObjectView using reflection.
Type to be used for the ObjectView's generic type parameter.
The type of class that implements the IObjectViewData to be used by the ObjectView.
The IObjectViewData to be used by the ObjectView to access the binding list.
Event source used by ObjectView for entity and membership changes.
Map the supplied TypeUsage to O-Space.
The TypeUsage to be mapped to O-Space. Should either be associated with C-Space or O-Space.
ObjectContext used to perform type mapping.
Determine CLR Type to be exposed for data binding using the supplied EDM item type.
CLR element type declared by the caller. There is no requirement that this method return the same type, or a type compatible with the declared type; it is merely a suggestion as to which type might be used.
The EDM O-Space type of the items in a particular query result.
instance that represents the CLR type that corresponds to the supplied EDM item type; or null if the EDM type does not map to a CLR type. Null is returned in the case where
is a , and no CLR type mapping is specified in the RowType metadata.
Manages a binding list constructed from query results.
Type of the elements in the binding list.
The binding list is initialized from query results.
If the binding list can be modified,
objects are added or removed from the ObjectStateManager (via the ObjectContext).
ObjectContext used to add or delete objects when the list can be modified.
If the TElement type is an Entity type of some kind,
this field specifies the entity set to add entity objects.
Construct a new instance of the ObjectViewQueryResultData class using the supplied query results.
Result of object query execution used to populate the binding list.
ObjectContext used to add or remove items. If the binding list can be modified, this parameter should not be null.
True if items should not be allowed to be added or removed from the binding list. Note that other conditions may prevent the binding list from being modified, so a value of false supplied for this parameter doesn't necessarily mean that the list will be writable.
If the TElement type is an Entity type of some kind, this field specifies the entity set to add entity objects.
Cannot be a DbDataRecord or a derivative of DbDataRecord
Throw an exception is an entity set was not specified for this instance.
A DataContractResolver that knows how to resolve proxy types created for persistent
ignorant classes to their base types. This is used with the DataContractSerializer.
During deserialization, maps any xsi:type information to the actual type of the persistence-ignorant object.
Returns the type that the xsi:type is mapped to. Returns null if no known type was found that matches the xsi:type.
The xsi:type information to map.
The namespace of the xsi:type.
The declared type.
An instance of .
During serialization, maps actual types to xsi:type information.
true if the type was resolved; otherwise, false.
The actual type of the persistence-ignorant object.
The declared type.
An instance of .
When this method returns, contains a list of xsi:type declarations.
When this method returns, contains a list of namespaces used.
Defines the different ways to handle modified properties when refreshing in-memory data from the database.
For unmodified client objects, same behavior as StoreWins. For modified client
objects, Refresh original values with store value, keeping all values on client
object. The next time an update happens, all the client change units will be
considered modified and require updating.
Discard all changes on the client and refresh values with store values.
Client original values is updated to match the store.
Marks specified property as modified.
This API recognizes the names in terms of OSpace
If State is not Modified or Unchanged
Throws since the method has no meaning for relationship entries.
Throws since the method has no meaning for relationship entries.
Reuse or create a new (Entity)DataRecordInfo.
Used to report that a scalar entity property is about to change
The current value of the specified property is cached when this method is called.
The name of the entity property that is changing
Used to report that a scalar entity property has been changed
The property value that was cached during EntityMemberChanging is now
added to OriginalValues
The name of the entity property that has changing
Used to report that a complex property is about to change
The current value of the specified property is cached when this method is called.
The name of the top-level entity property that is changing
The complex object that contains the property that is changing
The name of the property that is changing on complexObject
Used to report that a complex property has been changed
The property value that was cached during EntityMemberChanging is now added to OriginalValues
The name of the top-level entity property that has changed
The complex object that contains the property that changed
The name of the property that changed on complexObject
Update one of the ends of the relationship
API to accept the current values as original values and mark the entity as Unchanged.
Original values
DbDataRecord
Current values
DbUpdatableDataRecord
Use when EntityEntry.EntityKey == this.Wrapper.Key0
Use when EntityEntry.EntityKey == this.Wrapper.Key1
Flags used to modify behavior of ObjectContext.SaveChanges()
Changes are saved without the DetectChanges or the AcceptAllChangesAfterSave methods being called.
After changes are saved, the AcceptAllChangesAfterSave method is called, which resets change tracking in the ObjectStateManager.
Before changes are saved, the DetectChanges method is called to synchronize the property values of objects that are attached to the object context with data in the ObjectStateManager.
A collection of paths to determine which entities are spanned into a query.
Checks whether relationship span needs to be performed. Currently this is only when the query is
not using MergeOption.NoTracking.
True if the query needs a relationship span rewrite
Includes the specified span path in the specified span instance and returns the updated span instance.
If is null, a new span instance is constructed and returned that contains
the specified include path.
The span instance to which the include path should be added. May be null
The include path to add
A non-null span instance that contains the specified include path in addition to any paths ut already contained
Returns a span instance that is the union of the two specified span instances.
If and are both null,
then null is returned.
If or is null, but the remaining argument is non-null,
then the non-null argument is returned.
If neither nor are null, a new span instance is returned
that contains the merged span paths from both.
The first span instance from which to include span paths; may be null
The second span instance from which to include span paths; may be null
A span instance representing the union of the two arguments; may be null if both arguments are null
Adds a path to span into the query.
The path to span
Creates a new Span with the same SpanPaths as this Span
Adds the path if it does not already exist
Returns true if the path can be added
The list of paths that should be spanned into the query
Storage for a span path
Currently this includes the list of navigation properties
An index containing information about how the query was spanned
This helps to determine how to materialize the query result
Helper class to compare two RowTypes using EdmEquals instead of reference equality.
This exception is thrown when a update operation violates the concurrency constraint.
Exception during save changes to store
Initializes a new instance of .
Initializes a new instance of with a specialized error message.
The message that describes the error.
Initializes a new instance of the class that uses a specified error message and a reference to the inner exception that is the cause of this exception.
The error message that explains the reason for the exception.
The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified.
Initializes a new instance of the class that uses a specified error message, a reference to the inner exception, and an enumerable collection of
objects.
The error message that explains the reason for the exception.
The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified.
The collection of objects.
Initializes a new instance of with serialized data.
The that holds the serialized object data about the exception being thrown.
The that contains contextual information about the source or destination.
Gets the objects for this
.
A collection of objects comprised of either a single entity and 0 or more relationships, or 0 entities and 1 or more relationships.
Initializes a new instance of .
Initializes a new instance of with a specialized error message.
The message that describes the error.
Initializes a new instance of that uses a specified error message and a reference to the inner exception.
The message that describes the error.
The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified.
Initializes a new instance of that uses a specified error message, a reference to the inner exception, and an enumerable collection of
objects.
The message that describes the error.
The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified.
The enumerable collection of objects.
Initializes a new instance of OptimisticConcurrencyException
Property constraint exception class. Note that this class has state - so if you change even
its internals, it can be a breaking change
Initializes a new instance of the class with default message.
Initializes a new instance of the class with supplied message.
A localized error message.
Initializes a new instance of the class with supplied message and inner exception.
A localized error message.
The inner exception.
Initializes a new instance of the class.
A localized error message.
The name of the property.
Initializes a new instance of the class.
A localized error message.
The name of the property.
The inner exception.
Gets the name of the property that violated the constraint.
The name of the property that violated the constraint.
This exception is thrown when the store provider exhibits a behavior incompatible with the entity client provider
Initializes a new instance of .
Initializes a new instance of with a specialized error message.
The message that describes the error.
Initializes a new instance of that uses a specified error message.
The message that describes the error.
The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified.
Initializes a new instance of ProviderIncompatibleException
Basic Aggregates
All scalars fall into this category
Represents an operator
Represents an unknown arity. Usually for Ops that can have a varying number of Args
Basic constructor
Is the other Op equivalent?
the other Op to compare
true, if the Ops are equivalent
Visitor pattern method
The BasicOpVisitor that is visiting this Op
The Node that references this Op
Visitor pattern method for visitors with a return value
The visitor
The node in question
An instance of TResultType
Kind of Op
The Arity of this Op (ie) how many arguments can it have.
Returns -1 if the arity is not known a priori
Is this a ScalarOp
Is this a RulePatternOp
Is this a RelOp
Is this an AncillaryOp
Is this a PhysicalOp
Simple mechanism to get the type for an Op. Applies only to scalar and ancillaryOps
Default constructor
kind of Op
type of value produced by this Op
Two scalarOps are equivalent (usually) if their OpTypes and types are the
same. Obviously, their arguments need to be equivalent as well - but that's
checked elsewhere
The other Op to compare against
true, if the Ops are indeed equivalent
ScalarOp
Datatype of result
Is this an Aggregate
Pattern for transformation rules
Visitor pattern method
The BasicOpVisitor that is visiting this Op
The Node that references this Op
Visitor pattern method for visitors with a return value
The visitor
The node in question
An instance of TResultType
The Aggregate function's metadata
Is this a "distinct" aggregate
Yes; this is an aggregate
AncillaryOp
Default constructor
kind of Op
AncillaryOp
Base class for all Apply Ops
All relational operators - filter, project, join etc.
Basic constructor.
kind of Op
RelOp
2 children - left, right
Represents arithmetic operators - Plus,Minus,Multiply,Divide,Modulo,UnaryMinus
Visitor pattern method
The BasicOpVisitor that is visiting this Op
The Node that references this Op
Visitor pattern method for visitors with a return value
The visitor
The node in question
An instance of TResultType
Simple implemenation of the BasicOpVisitor interface.
Visit the children of this Node
The Node that references the Op
Visit the children of this Node. but in reverse order
The current node
Visit this node
Default node visitor
Default handler for all constantOps
the constant op
the node
Default handler for all TableOps
Default handler for all JoinOps
join op
Default handler for all ApplyOps
apply op
Default handler for all SetOps
set op
Default handler for all SortOps
sort op
Default handler for all GroupBy ops
Trap method for unrecognized Op types
The Op being visited
The Node that references the Op
Visitor pattern method for ConstantOp
The ConstantOp being visited
The Node that references the Op
Visitor pattern method for NullOp
The NullOp being visited
The Node that references the Op
Visitor pattern method for NullSentinelOp
The NullSentinelOp being visited
The Node that references the Op
Visitor pattern method for InternalConstantOp
The InternalConstantOp being visited
The Node that references the Op
Visitor pattern method for ConstantPredicateOp
The ConstantPredicateOp being visited
The Node that references the Op
Visitor pattern method for FunctionOp
The FunctionOp being visited
The Node that references the Op
Visitor pattern method for PropertyOp
The PropertyOp being visited
The Node that references the Op
Visitor pattern method for RelPropertyOp
The RelPropertyOp being visited
The Node that references the Op
Visitor pattern method for CaseOp
The CaseOp being visited
The Node that references the Op
Visitor pattern method for ComparisonOp
The ComparisonOp being visited
The Node that references the Op
Visitor pattern method for LikeOp
The LikeOp being visited
The Node that references the Op
Visitor pattern method for AggregateOp
The AggregateOp being visited
The Node that references the Op
Visitor pattern method for NewInstanceOp
The NewInstanceOp being visited
The Node that references the Op
Visitor pattern method for NewEntityOp
The NewEntityOp being visited
The Node that references the Op
Visitor pattern method for DiscriminatedNewInstanceOp
The DiscriminatedNewInstanceOp being visited
The Node that references the Op
Visitor pattern method for NewMultisetOp
The NewMultisetOp being visited
The Node that references the Op
Visitor pattern method for NewRecordOp
The NewRecordOp being visited
The Node that references the Op
Visitor pattern method for RefOp
The RefOp being visited
The Node that references the Op
Visitor pattern method for VarRefOp
The VarRefOp being visited
The Node that references the Op
Visitor pattern method for ConditionalOp
The ConditionalOp being visited
The Node that references the Op
Visitor pattern method for ArithmeticOp
The ArithmeticOp being visited
The Node that references the Op
Visitor pattern method for TreatOp
The TreatOp being visited
The Node that references the Op
Visitor pattern method for CastOp
The CastOp being visited
The Node that references the Op
Visitor pattern method for SoftCastOp
The SoftCastOp being visited
The Node that references the Op
Visitor pattern method for IsOp
The IsOp being visited
The Node that references the Op
Visitor pattern method for ExistsOp
The ExistsOp being visited
The Node that references the Op
Visitor pattern method for ElementOp
The ElementOp being visited
The Node that references the Op
Visitor pattern method for GetEntityRefOp
The GetEntityRefOp being visited
The Node that references the Op
Visitor pattern method for GetRefKeyOp
The GetRefKeyOp being visited
The Node that references the Op
Visitor pattern method for NestOp
The NestOp being visited
The Node that references the Op
Visitor pattern method for VarDefOp
The VarDefOp being visited
The Node that references the Op
Visitor pattern method for VarDefListOp
The VarDefListOp being visited
The Node that references the Op
Visitor pattern method for ScanTableOp
The ScanTableOp being visited
The Node that references the Op
Visitor pattern method for ScanViewOp
The ScanViewOp being visited
The Node that references the Op
Visitor pattern method for UnnestOp
The UnnestOp being visited
The Node that references the Op
Visitor pattern method for ProjectOp
The ProjectOp being visited
The Node that references the Op
Visitor pattern method for FilterOp
The FilterOp being visited
The Node that references the Op
Visitor pattern method for SortOp
The SortOp being visited
The Node that references the Op
Visitor pattern method for ConstrainedSortOp
The ConstrainedSortOp being visited
The Node that references the Op
Visitor pattern method for GroupByOp
The GroupByOp being visited
The Node that references the Op
Visitor pattern method for GroupByIntoOp
The GroupByIntoOp being visited
The Node that references the Op
Visitor pattern method for CrossJoinOp
The CrossJoinOp being visited
The Node that references the Op
Visitor pattern method for InnerJoinOp
The InnerJoinOp being visited
The Node that references the Op
Visitor pattern method for LeftOuterJoinOp
The LeftOuterJoinOp being visited
The Node that references the Op
Visitor pattern method for FullOuterJoinOp
The FullOuterJoinOp being visited
The Node that references the Op
Visitor pattern method for CrossApplyOp
The CrossApplyOp being visited
The Node that references the Op
Visitor pattern method for OuterApplyOp
The OuterApplyOp being visited
The Node that references the Op
Visitor pattern method for UnionAllOp
The UnionAllOp being visited
The Node that references the Op
Visitor pattern method for IntersectOp
The IntersectOp being visited
The Node that references the Op
Visitor pattern method for ExceptOp
The ExceptOp being visited
The Node that references the Op
Visitor pattern method for DistinctOp
The DistinctOp being visited
The Node that references the Op
Visitor pattern method for SingleRowOp
The SingleRowOp being visited
The Node that references the Op
Visitor pattern method for SingleRowTableOp
The SingleRowTableOp being visited
The Node that references the Op
Visitor pattern method for PhysicalProjectOp
The op being visited
The Node that references the Op
Common handling for all nestOps
nest op
Visitor pattern method for SingleStreamNestOp
The op being visited
The Node that references the Op
Visitor pattern method for MultistreamNestOp
The op being visited
The Node that references the Op
ANSI switched Case expression.
Pattern for use in transformation rules
Visitor pattern method
The BasicOpVisitor that is visiting this Op
The Node that references this Op
Visitor pattern method for visitors with a return value
The visitor
The node in question
An instance of TResultType
Cast operation. Convert a type instance into an instance of another type
Pattern for transformation rules
Visitor pattern method
The BasicOpVisitor that is visiting this Op
The Node that references this Op
Visitor pattern method for visitors with a return value
The visitor
The node in question
An instance of TResultType
1 child - instance
Represents a column map for a collection column.
The "element" represents the element of the collection - usually a Structured
type, but occasionally a collection/simple type as well.
The "ForeignKeys" property is optional (but usually necessary) to determine the
elements of the collection.
Represents a column
A ColumnMap is a data structure that maps columns from the C space to
the corresponding columns from one or more underlying readers.
ColumnMaps are used by the ResultAssembly phase to assemble results in the
desired shape (as requested by the caller) from a set of underlying
(usually) flat readers. ColumnMaps are produced as part of the PlanCompiler
module of the bridge, and are consumed by the Execution phase of the bridge.
* Simple (scalar) columns (and UDTs) are represented by a SimpleColumnMap
* Record type columns are represented by a RecordColumnMap
* A nominal type instance (that supports inheritance) is usually represented
by a PolymorphicColumnMap - this polymorphicColumnMap contains information
about the type discriminator (assumed to be a simple column), and a mapping
from type-discriminator value to the column map for the specific type
* The specific type for nominal types is represented by ComplexTypeColumnMap
for complextype columns, and EntityColumnMap for entity type columns.
EntityColumnMaps additionally have an EntityIdentity that describes
the entity identity. The entity identity is logically just a set of keys
(and the column maps), plus a column map that helps to identify the
the appropriate entity set for the entity instance
* Refs are represented by a RefColumnMap. The RefColumnMap simply contains an
EntityIdentity
* Collections are represented by either a SimpleCollectionColumnMap or a
DiscriminatedCollectionColumnMap. Both of these contain a column map for the
element type, and an optional list of simple columns (the keys) that help
demarcate the elements of a specific collection instance.
The DiscriminatedCollectionColumnMap is used in scenarios when the containing
row has multiple collections, and the different collection properties must be
differentiated. This differentiation is achieved via a Discriminator column
(a simple column), and a Discriminator value. The value of the Discriminator
column is read and compared with the DiscriminatorValue stored in this map
to determine if we're dealing with the current collection.
NOTE:
* Key columns are assumed to be SimpleColumns. There may be more than one key
column (applies to EntityColumnMap and *CollectionColumnMap)
* TypeDiscriminator and Discriminator columns are also considered to be
SimpleColumns. There are singleton columns.
It is the responsibility of the PlanCompiler phase to produce the right column
maps.
The result of a query is always assumed to be a collection. The ColumnMap that we
return as part of plan compilation refers to the element type of this collection
- the element type is usually a structured type, but may also be a simple type
or another collection type. How does the DbRecord framework handle these cases?
Default Column Name; should not be set until CodeGen once we're done
with all our transformations that might give us a good name, but put
here for ease of finding it.
Simple constructor - just needs the name and type of the column
column type
column name
Visitor Design Pattern
Visitor Design Pattern
Get the column's datatype
Get the column name
Returns whether the column already has a name;
Constructor
datatype of column
column name
column map for collection element
List of keys
List of foreign keys
Get the list of columns that may comprise the foreign key
Get the list of columns that may comprise the key
Get the column map describing the collection element
Represents information about one collection being managed by the NestOps.
The CollectionVar is a Var that represents the entire collection.
The collection-var
the column map for the collection element
list of vars describing the collection element; flattened to remove
nested collections
list of keys specific to this collection
list of sort keys specific to this collection
Discriminator Value for this collection (for a given NestOp).
Should we break this out into a subtype of CollectionInfo
Represents an arbitrary nest operation - can be used anywhere
Pattern for use in transformation rules
Visitor pattern method
The BasicOpVisitor that is visiting this Op
The Node that references this Op
Visitor pattern method for visitors with a return value
The visitor
The node in question
An instance of TResultType
1 child - instance
Describes information about each column
Default constructor
Column name
Datatype of the column
More useful default constructor
property describing this column
debugging help
Column Name
Datatype of the column
Is this column nullable ?
Describes a column of a table
Same as a ValRef in SqlServer.
Try to get the name of this Var.
Debugging support
Id of this var
Kind of Var
Datatype of this Var
Constructor
Get the name of this column var
The table instance containing this column reference
The column metadata for this column
Represents a comparision operation (LT, GT etc.)
Patterns for use in transformation rules
Visitor pattern method
The BasicOpVisitor that is visiting this Op
The Node that references this Op
Visitor pattern method for visitors with a return value
The visitor
The node in question
An instance of TResultType
2 children - left, right
Represents a column map for a specific complextype
Column map for a "typed" column
- either an entity type or a complex type
Represents a column map for a structured column
Structured columnmap constructor
datatype for this column
column name
list of properties
Debugging support
Get the null sentinel column, if any. Virtual so only derived column map
types that can have NullSentinel have to provide storage, etc.
Get the list of properties that constitute this structured type
Typed columnMap constructor
Datatype of column
column name
List of column maps - one for each property
Constructor
column Datatype
column name
list of properties
Visitor Design Pattern
Visitor Design Pattern
Debugging support
Get the type Nullability column
A computed expression. Defined by a VarDefOp
Represents a conditional operation - and, or, in, not, is null
Patterns for use in transformation rules
Visitor pattern method
The BasicOpVisitor that is visiting this Op
The Node that references this Op
Visitor pattern method for visitors with a return value
The visitor
The node in question
An instance of TResultType
Base class for all constant Ops
Constructor overload for rules
Two CostantBaseOps are equivalent if they are of the same
derived type and have the same type and value.
the other Op
true, if these are equivalent (not a strict equality test)
Get the constant value
0 children
Represents an external constant
Pattern for transformation rules
Visitor pattern method
The BasicOpVisitor that is visiting this Op
The Node that references this Op
Visitor pattern method for visitors with a return value
The visitor
The node in question
An instance of TResultType
Represents a constant predicate (with a value of either true or false)
Pattern for transformation rules
Visitor pattern method
The BasicOpVisitor that is visiting this Op
The Node that references this Op
Visitor pattern method for visitors with a return value
The visitor
The node in question
An instance of TResultType
Value of the constant predicate
Is this the true predicate
Is this the 'false' predicate
A Constrained SortOp. Used to represent physical paging (skip, limit, skip + limit) operations.
Base type for SortOp and ConstrainedSortOp
Sort keys
Visitor pattern method
The BasicOpVisitor that is visiting this Op
The Node that references this Op
Visitor pattern method for visitors with a return value
The visitor
The node in question
An instance of TResultType
3 children - the input, a possibly NullOp limit and a possibly NullOp skip count.
CrossApply
Visitor pattern method
The BasicOpVisitor that is visiting this Op
The Node that references this Op
Visitor pattern method for visitors with a return value
The visitor
The node in question
An instance of TResultType
A CrossJoin (n-way)
Base class for all Join operations
3 children - left, right, pred
Singleton instance
Visitor pattern method
The BasicOpVisitor that is visiting this Op
The Node that references this Op
Visitor pattern method for visitors with a return value
The visitor
The node in question
An instance of TResultType
varying number of children (but usually greater than 1)
Gets the target entity pointed at by a reference
Pattern for transformation rules
Visitor pattern method
The BasicOpVisitor that is visiting this Op
The Node that references this Op
Visitor pattern method for visitors with a return value
The visitor
The node in question
An instance of TResultType
1 child - entity instance
Represents a "discriminated" collection column.
This represents a scenario when multiple collections are represented
at the same level of the container row, and there is a need to distinguish
between these collections
Internal constructor
Column datatype
column name
column map for collection element
Keys for the collection
Foreign keys for the collection
Discriminator column map
Discriminator value
Visitor Design Pattern
Visitor Design Pattern
Debugging support
Get the column that describes the discriminator
Get the discriminator value
This class also represents entity identity. However, this class addresses
those scenarios where the entityset for the entity is not uniquely known
a priori. Instead, the query is annotated with information, and based on
the resulting information, the appropriate entityset is identified.
Specifically, the specific entityset is represented as a SimpleColumnMap
in the query. The value of that column is used to look up a dictionary,
and then identify the appropriate entity set.
It is entirely possible that no entityset may be located for the entity
instance - this represents a transient entity instance
Abstract base class representing entity identity. Used by both
EntityColumnMap and RefColumnMap.
An EntityIdentity captures two pieces of information - the list of keys
that uniquely identify an entity within an entityset, and the the entityset
itself.
Simple constructor - gets a list of key columns
Get the key columns
Simple constructor
column map representing the entityset
Map from value -> the appropriate entityset
list of key columns
Debugging support
Get the column map representing the entityset
Return the entityset map
Polymorphic new instance creation (takes all properties of all types in the hierarchy + discriminator)
Base class for DiscriminatedNewEntityOp and NewEntityOp
True if the entity constructor is scoped to a particular entity set or null (scoped as "unscoped").
False if the scope is not yet known. Scope is determined in PreProcessor.
Get the entityset (if any) associated with this constructor
get the list of relationship properties (if any) specified for this constructor
Gets discriminator and type information used in construction of type.
DistinctOp
Visitor pattern method
The BasicOpVisitor that is visiting this Op
The Node that references this Op
Visitor pattern method for visitors with a return value
The visitor
The node in question
An instance of TResultType
1 child - input
Get "key" vars for the distinct
Represents an Element() op - extracts the scalar value from a collection
Pattern for transformation rules
Visitor pattern method
The BasicOpVisitor that is visiting this Op
The Node that references this Op
Visitor pattern method for visitors with a return value
The visitor
The node in question
An instance of TResultType
1 child - collection instance
Represents a column map for a specific entity type
constructor
column datatype
column name
list of properties
entity identity information
Visitor Design Pattern
Visitor Design Pattern
Debugging support
Get the entity identity information
ExceptOp (Minus)
Base class for set operations - union, intersect, except
2 children - left, right
Map of result vars to the vars of each branch of the setOp
Get the set of output vars produced
Visitor pattern method
The BasicOpVisitor that is visiting this Op
The Node that references this Op
Visitor pattern method for visitors with a return value
The visitor
The node in question
An instance of TResultType
Represents an EXISTS subquery?
Pattern for transformation rules
Visitor pattern method
The BasicOpVisitor that is visiting this Op
The Node that references this Op
Visitor pattern method for visitors with a return value
The visitor
The node in question
An instance of TResultType
1 child - collection input
An ExtendedNodeInfo class adds additional information to a standard NodeInfo.
This class is usually applicable only to RelOps and PhysicalOps.
The ExtendedNodeInfo class has in addition to the information maintained by NodeInfo
the following
- a set of local definitions
- a set of definitions
- a set of keys
- a set of non-nullable definitions
- a set of non-nullable definitions that are visible at this node
NOTE: When adding a new member to track inforation, make sure to update the Clear method
in this class to set that member to the default value.
The NodeInfo class represents additional information about a node in the tree.
By default, this includes a set of external references for each node (ie) references
to Vars that are not defined in the same subtree
The NodeInfo class also includes a "hashValue" that is a hash value for the entire
subtree rooted at this node
NOTE: When adding a new member to track inforation, make sure to update the Clear method
in this class to set that member to the default value.
Clear out all information - usually used by a Recompute
Compute the hash value for a Vec
Computes the hash value for this node. The hash value is simply the
local hash value for this node info added with the hash values of the child
nodes
current command
current node
All external references from this node
Get the hash value for this nodeInfo
Compute the hash value for this node
Set the rowcount for this node
min rows produced by this node
max rows produced by this node
Initialize the rowcounts for this node from the source node
nodeinfo of source
Definitions made specifically by this node
All definitions visible as outputs of this node
The keys for this node
The definitions of vars that are guaranteed to be non-nullable when output from this node
The definitions that come from the rel-op inputs of this node that are guaranteed to be non-nullable
Min number of rows returned from this node
Max rows returned from this node
FilterOp
Visitor pattern method
The BasicOpVisitor that is visiting this Op
The Node that references this Op
Visitor pattern method for visitors with a return value
The visitor
The node in question
An instance of TResultType
2 children - input, pred
A FullOuterJoin
Visitor pattern method
The BasicOpVisitor that is visiting this Op
The Node that references this Op
Visitor pattern method for visitors with a return value
The visitor
The node in question
An instance of TResultType
Represents an arbitrary function call
Singleton instance used for patterns in transformation rules
Two FunctionOps are equivalent if they reference the same EdmFunction
the other Op
true, if these are equivalent
Visitor pattern method
The BasicOpVisitor that is visiting this Op
The Node that references this Op
Visitor pattern method for visitors with a return value
The visitor
The node in question
An instance of TResultType
The function that's being invoked
Extracts the ref from an entity instance
Pattern for transformation rules
Visitor pattern method
The BasicOpVisitor that is visiting this Op
The Node that references this Op
Visitor pattern method for visitors with a return value
The visitor
The node in question
An instance of TResultType
1 child - entity instance
extracts the key from a ref
Pattern for transformation rules
Visitor pattern method
The BasicOpVisitor that is visiting this Op
The Node that references this Op
Visitor pattern method for visitors with a return value
The visitor
The node in question
An instance of TResultType
1 child - ref instance
GroupByBaseOp
Visitor pattern method
The BasicOpVisitor that is visiting this Op
The Node that references this Op
Visitor pattern method for visitors with a return value
The visitor
The node in question
An instance of TResultType
GroupBy keys
All outputs of this Op - includes keys and aggregates
GroupByIntoOp
Visitor pattern method
The BasicOpVisitor that is visiting this Op
The Node that references this Op
Visitor pattern method for visitors with a return value
The visitor
The node in question
An instance of TResultType
GroupBy keys
4 children - input, keys (vardeflist), aggregates (vardeflist), groupaggregates (vardeflist)
GroupByOp
Visitor pattern method
The BasicOpVisitor that is visiting this Op
The Node that references this Op
Visitor pattern method for visitors with a return value
The visitor
The node in question
An instance of TResultType
3 children - input, keys (vardeflist), aggregates (vardeflist)
An InnerJoin
Visitor pattern method
The BasicOpVisitor that is visiting this Op
The Node that references this Op
Visitor pattern method for visitors with a return value
The visitor
The node in question
An instance of TResultType
Represents internally generated constants
Pattern for transformation rules
Visitor pattern method
The BasicOpVisitor that is visiting this Op
The Node that references this Op
Visitor pattern method for visitors with a return value
The visitor
The node in question
An instance of TResultType
An IntersectOp
Visitor pattern method
The BasicOpVisitor that is visiting this Op
The Node that references this Op
Visitor pattern method for visitors with a return value
The visitor
The node in question
An instance of TResultType
An IS OF operation
Pattern used for transformation rules
Visitor pattern method
The BasicOpVisitor that is visiting this Op
The Node that references this Op
Visitor pattern method for visitors with a return value
The visitor
The node in question
An instance of TResultType
1 child - instance
The type being checked for
The KeySet class encapsulates all information about the keys of a RelOp node in
the query tree.
A KeyVec is logically a set of vars that uniquely identify the row of the current
RelOp. Some RelOps may have no unique keys - such a state is identified by the
"NoKeys" property
A LeftOuterJoin
Visitor pattern method
The BasicOpVisitor that is visiting this Op
The Node that references this Op
Visitor pattern method for visitors with a return value
The visitor
The node in question
An instance of TResultType
Represents a string comparison operation
Pattern for use in transformation rules
Visitor pattern method
The BasicOpVisitor that is visiting this Op
The Node that references this Op
Visitor pattern method for visitors with a return value
The visitor
The node in question
An instance of TResultType
3 children - string, pattern , escape
Represents a function import column map.
Internal constructor
Visitor Design Pattern
Visitor Design Pattern
Debugging support
Get the type discriminator column
Get the type mapping
Gets discriminator delegate
Base class for Nest operations
Represents all physical operators
Default constructor
the op type
This is a physical Op
(Ordered) list of prefix sort keys (defines ordering of results)
Outputs of the NestOp. Includes the Keys obviously, and one Var for each of
the collections produced. In addition, this may also include non-key vars
from the outer row
Information about each collection managed by the NestOp
A new entity instance constructor
Pattern for transformation rules
Visitor pattern method
The BasicOpVisitor that is visiting this Op
The Node that references this Op
Visitor pattern method for visitors with a return value
The visitor
The node in question
An instance of TResultType
A new instance creation
Pattern for transformation rules
Visitor pattern method
The BasicOpVisitor that is visiting this Op
The Node that references this Op
Visitor pattern method for visitors with a return value
The visitor
The node in question
An instance of TResultType
Pattern for transformation rules
Visitor pattern method
The BasicOpVisitor that is visiting this Op
The Node that references this Op
Visitor pattern method for visitors with a return value
The visitor
The node in question
An instance of TResultType
Represents a new record constructor
Basic constructor. All fields have a value specified
Alternate form of the constructor. Only some fields have a value specified
The arguments to the corresponding Node are exactly 1-1 with the fields
described here.
The missing fields are considered to be "null"
Pattern for transformation rules
Determine if a value has been provided for the specified field.
Returns the position of this field (ie) the specific argument in the Node's
children. If no value has been provided for this field, then simply
return false
Visitor pattern method
The BasicOpVisitor that is visiting this Op
The Node that references this Op
Visitor pattern method for visitors with a return value
The visitor
The node in question
An instance of TResultType
List of all properties that have values specified
The NodeInfoVisitor is a simple class (ab)using the Visitor pattern to define
NodeInfo semantics for various nodes in the tree
The only public method. Recomputes the nodeInfo for a node in the tree,
but only if the node info has already been computed.
Assumes that the NodeInfo for each child (if computed already) is valid
Node to get NodeInfo for
Basic constructor
Default implementation for scalarOps. Simply adds up external references
from each child
The given definition is non nullable if it is a non-null constant
or a reference to non-nullable input
The only special case among all scalar and ancillaryOps. Simply adds
its var to the list of unreferenced Ops
The VarRefOp
Current node
Definitions = Local Definitions = referenced table columns
External References = none
Keys = keys of entity type
RowCount (default): MinRows = 0, MaxRows = *
NonNullableDefinitions : non nullable table columns that are definitions
NonNullableInputDefinitions : default(empty) because cannot be used
ScanTable/ScanView op
current subtree
nodeinfo for this subtree
Computes a NodeInfo for an UnnestOp.
Definitions = columns of the table produced by this Op
Keys = none
External References = the unnestVar + any external references of the
computed Var (if any)
RowCount (default): MinRows = 0; MaxRows = *
NonNullableDefinitions: default(empty)
NonNullableInputDefinitions : default(empty) because cannot be used
Walk through the computed vars defined by a VarDefListNode, and look for
"simple" Var renames. Build up a mapping from original Vars to the renamed Vars
the varDefListNode subtree
A dictionary of Var->Var renames
Computes a NodeInfo for a ProjectOp.
Definitions = the Vars property of this Op
LocalDefinitions = list of computed Vars produced by this node
Keys = Keys of the input Relop (if they are all preserved)
External References = any external references from the computed Vars
RowCount = Input's RowCount
NonNullabeDefinitions = Outputs that are either among the NonNullableDefinitions of the child or
are constants defined on this node
NonNullableInputDefinitions = NonNullableDefinitions of the child
The ProjectOp
corresponding Node
Computes a NodeInfo for a FilterOp.
Definitions = Definitions of the input Relop
LocalDefinitions = None
Keys = Keys of the input Relop
External References = any external references from the input + any external
references from the predicate
MaxOneRow = Input's RowCount
If the predicate is a "false" predicate, then max RowCount is zero
If we can infer additional info from the key-selector, we may be
able to get better estimates
NonNullabeDefinitions = NonNullabeDefinitions of the input RelOp
NonNullableInputDefinitions = NonNullabeDefinitions of the input RelOp
The FilterOp
corresponding Node
Computes a NodeInfo for a GroupByOp.
Definitions = Keys + aggregates
LocalDefinitions = Keys + Aggregates
Keys = GroupBy Keys
External References = any external references from the input + any external
references from the local computed Vars
RowCount =
(1,1) if no group-by keys;
otherwise if input MinRows is 1 then (1, input MaxRows);
otherwise (0, input MaxRows)
NonNullableDefinitions: non-nullable keys
NonNullableInputDefinitions : default(empty)
The GroupByOp
corresponding Node
Computes a NodeInfo for a CrossJoinOp.
Definitions = Definitions of my children
LocalDefinitions = None
Keys = Concatenation of the keys of my children (if every one of them has keys; otherwise, null)
External References = any external references from the inputs
RowCount: MinRows: min(min-rows of each child)
MaxRows: max(max-rows of each child)
NonNullableDefinitions : The NonNullableDefinitions of the children
NonNullableInputDefinitions : default(empty) because cannot be used
The CrossJoinOp
corresponding Node
Computes a NodeInfo for an Inner/LeftOuter/FullOuter JoinOp.
Definitions = Definitions of my children
LocalDefinitions = None
Keys = Concatenation of the keys of my children (if every one of them has keys; otherwise, null)
External References = any external references from the inputs + any external
references from the join predicates
RowCount:
FullOuterJoin: MinRows = 0, MaxRows = N
InnerJoin: MinRows = 0;
MaxRows = N; if both inputs have RowCount lesser than (or equal to) 1, then maxCard = 1
OuterJoin: MinRows = leftInput.MinRows
MaxRows = N; if both inputs have RowCount lesser than (or equal to) 1, then maxCard = 1
NonNullableDefinitions:
FullOuterJoin: None.
InnerJoin: NonNullableDefinitions of both children
LeftOuterJoin: NonNullableDefinitions of the left child
NonNullableInputDefinitions : NonNullabeDefinitions of both children
The JoinOp
corresponding Node
Computes a NodeInfo for a CrossApply/OuterApply op.
Definitions = Definitions of my children
LocalDefinitions = None
Keys = Concatenation of the keys of my children (if every one of them has keys; otherwise, null)
External References = any external references from the inputs
RowCount:
CrossApply: minRows=0; MaxRows=Unbounded
(MaxRows = 1, if both inputs have MaxRow less than or equal to 1)
OuterApply: minRows=leftInput.MinRows; MaxRows=Unbounded
(MaxRows = 1, if both inputs have MaxRow less than or equal to 1)
NonNullableDefinitions =
CrossApply: NonNullableDefinitions of both children
OuterApply: NonNullableDefinitions of the left child
NonNullableInputDefinitions = NonNullabeDefinitions of both children
The ApplyOp
corresponding Node
Computes a NodeInfo for SetOps (UnionAll, Intersect, Except).
Definitions = OutputVars
LocalDefinitions = OutputVars
Keys = Output Vars for Intersect, Except. For UnionAll ??
External References = any external references from the inputs
RowCount: Min = 0, Max = unbounded.
For UnionAlls, MinRows = max(MinRows of left and right inputs)
NonNullable definitions =
UnionAll - Columns that are NonNullableDefinitions on both (children) sides
Except - Columns that are NonNullableDefinitions on the left child side
Intersect - Columns that are NonNullableDefinitions on either side
NonNullableInputDefinitions = default(empty) because cannot be used
The SetOp
corresponding Node
Computes a NodeInfo for a ConstrainedSortOp/SortOp.
Definitions = Definitions of the input Relop
LocalDefinitions = not allowed
Keys = Keys of the input Relop
External References = any external references from the input + any external
references from the keys
RowCount = Input's RowCount
NonNullabeDefinitions = NonNullabeDefinitions of the input RelOp
NonNullableInputDefinitions = NonNullabeDefinitions of the input RelOp
The SortOp
corresponding Node
Computes a NodeInfo for Distinct.
Definitions = OutputVars that are not external references
LocalDefinitions = None
Keys = Output Vars
External References = any external references from the inputs
RowCount = Input's RowCount
NonNullabeDefinitions : NonNullabeDefinitions of the input RelOp that are outputs
NonNullableInputDefinitions : default(empty) because cannot be used
The DistinctOp
corresponding Node
Compute NodeInfo for a SingleRowOp.
Definitions = child's definitions
Keys = child's keys
Local Definitions = none
External references = child's external references
RowCount=(0,1)
NonNullabeDefinitions = NonNullabeDefinitions of the input RelOp
NonNullableInputDefinitions : default(empty) because cannot be used
The SingleRowOp
current subtree
NodeInfo for this node
SingleRowTableOp
No definitions, external references, non-nullable definitions
Keys = empty list (not the same as "no keys")
RowCount = (1,1)
the SingleRowTableOp
current subtree
nodeInfo for this subtree
Computes a NodeInfo for a PhysicalProjectOp.
Definitions = OutputVars
LocalDefinitions = None
Keys = None
External References = any external references from the inputs
RowCount=default
NonNullabeDefinitions = NonNullabeDefinitions of the input RelOp that are among the definitions
NonNullableInputDefinitions = NonNullabeDefinitions of the input RelOp
The PhysicalProjectOp
corresponding Node
Computes a NodeInfo for a NestOp (SingleStream/MultiStream).
Definitions = OutputVars
LocalDefinitions = Collection Vars
Keys = Keys of my child
External References = any external references from the inputs
RowCount=default
The NestOp
corresponding Node
Represents null constants
Pattern for transformation rules
Visitor pattern method
The BasicOpVisitor that is visiting this Op
The Node that references this Op
Visitor pattern method for visitors with a return value
The visitor
The node in question
An instance of TResultType
Represents an internally generated constant that is used to serve as a null sentinel,
i.e. to be checked whether it is null.
Pattern for transformation rules
Visitor pattern method
The BasicOpVisitor that is visiting this Op
The Node that references this Op
Visitor pattern method for visitors with a return value
The visitor
The node in question
An instance of TResultType
Delegate that describes the processing
RuleProcessing context
Node to process
The operator types. Includes both scalar and relational operators,
and physical and logical operators, and rule operators
Constants
An internally generated constant
An internally generated constant used as a null sentinel
A null constant
ConstantPredicate
A Var reference
GreaterThan
>=
Lessthan or equals
Less than
Equals
Not equals
String comparison
Addition
Subtraction
Multiplication
Division
Modulus
Unary Minus
And
Or
In
Not
is null
switched case expression
treat-as
is-of
Cast
Internal cast
a basic aggregate
function call
Reference to a "relationship" property
property reference
entity constructor
new instance constructor for a named type(other than multiset, record)
new instance constructor for a named type and sub-types
Multiset constructor
record constructor
Get the key from a Ref
Get the ref from an entity instance
create a reference
exists
get the singleton element from a collection
Builds up a collection
gets the target entity pointed at by a reference
Traverse a relationship and get the references of the other end
A table scan
A view scan
Filter
Project
InnerJoin
LeftOuterJoin
FullOuter join
Cross join
cross apply
outer apply
Unnest
Sort
Constrained Sort (physical paging - Limit and Skip)
GroupBy
GroupByInto (projects the group as well)
UnionAll
Intersect
Except
Distinct
Select a single row from a subquery
A table with exactly one row
Variable definition
List of variable definitions
Leaf
Physical Project
single-stream nest aggregation
multi-stream nest aggregation
NotValid
OuterApply
Visitor pattern method
The BasicOpVisitor that is visiting this Op
The Node that references this Op
Visitor pattern method for visitors with a return value
The visitor
The node in question
An instance of TResultType
Describes a query parameter
Get the name of this Var
Name of the parameter
A PatternMatchRule allows for a pattern to be specified to identify interesting
subtrees, rather than just an OpType
A Rule - more specifically, a transformation rule - describes an action that is to
be taken when a specific kind of subtree is found in the tree
Basic constructor
The OpType we're interested in processing
The callback to invoke
Does the rule match the current node?
the node in question
true, if a match was found
We need to invoke the specified callback on the subtree in question - but only
if the match succeeds
Current rule processing context
The node (subtree) to process
the (possibly) modified subtree
true, if the subtree was modified
The OpType we're interested in transforming
The "callback" function for each rule.
Every callback function must return true if the subtree has
been modified (or a new subtree has been returned); and must return false
otherwise. If the root of the subtree has not changed, but some internal details
of the subtree have changed, it is the responsibility of the rule to update any
local bookkeeping information.
The rule processing context
the subtree to operate on
possibly transformed subtree
transformation status - true, if there was some change; false otherwise
Basic constructor
The pattern to look for
The callback to invoke when such a pattern is identified
A PhysicalProjectOp is a physical Op capping the entire command tree (and the
subtrees of CollectOps).
Instance for pattern matching in rules
Visitor pattern method
The BasicOpVisitor that is visiting this Op
The Node that references this Op
Visitor pattern method for visitors with a return value
The visitor
The node in question
An instance of TResultType
basic constructor
List of outputs from this Op
column map that describes the result to be shaped
Get the column map that describes how the result should be reshaped
Get the (ordered) list of output vars that this node produces
ProjectOp
Visitor pattern method
The BasicOpVisitor that is visiting this Op
The Node that references this Op
Visitor pattern method for visitors with a return value
The visitor
The node in question
An instance of TResultType
2 children - input, projections (VarDefList)
The Vars projected by this Op
Represents a property access
Used for patterns in transformation rules
Visitor pattern method
The BasicOpVisitor that is visiting this Op
The Node that references this Op
Visitor pattern method for visitors with a return value
The visitor
The node in question
An instance of TResultType
1 child - the instance
The property metadata
Represents a record (an untyped structured column)
Constructor for a record column map
Datatype of this column
column name
List of ColumnMaps - one for each property
Visitor Design Pattern
Visitor Design Pattern
Get the type Nullability column
A column map that represents a ref column.
Constructor for a ref column
column datatype
column name
identity information for this entity
Visitor Design Pattern
Visitor Design Pattern
Get the entity identity information for this ref
Pattern for transformation rules
Visitor pattern method
The BasicOpVisitor that is visiting this Op
The Node that references this Op
Visitor pattern method for visitors with a return value
The visitor
The node in question
An instance of TResultType
1 child - key
The EntitySet to which the reference refers
A "Rel" property is best thought of as a collocated reference (aka foreign key).
Any entity may have zero or more rel-properties carried along with it (purely
as a means to optimize for common relationship traversal scenarios)
Although the definition is lax here, we only deal with RelProperties that
are one-ended (ie) the target multiplicity is at most One.
Consider for example, an Order entity with a (N:1) Order-Customer relationship. The Customer ref
will be treated as a rel property for the Order entity.
Similarly, the OrderLine entity may have an Order ref rel property (assuming that there was
a N:1 relationship between OrderLine and Order)
Our definition of equality
our hash code
String form
The relationship
The source end of the relationship
the target end of the relationship
Almost identical to a PropertyOp - the only difference being that we're dealing with an
"extended" property (a rel property) this time
Pattern for transformation rules
Visitor pattern method
The BasicOpVisitor that is visiting this Op
The Node that references this Op
Visitor pattern method for visitors with a return value
The visitor
The node in question
An instance of TResultType
1 child - the entity instance
Get the property metadata
Enum describing row counts
Zero rows
One row
Unbounded (unknown number of rows)
A RuleProcessingContext encapsulates information needed by various rules to process
the query tree.
Callback function to be applied to a node before any rules are applied
the node
Callback function to be applied to the subtree rooted at the given
node before any rules are applied
the node that is the root of the subtree
Callback function to be applied on a node after a rule has been applied
that has modified the node
current node
the rule that modified the node
Callback function to be applied to the subtree rooted at the given
node after any rules are applied
the node that is the root of the subtree
Get the hashcode for this node - to ensure that we don't loop forever
current node
int hashcode
Column map for a scalar column - maps 1-1 with a column from a
row of the underlying reader
Base class for simple column maps; can be either a VarRefColumnMap or
ScalarColumnMap; the former is used pretty much throughout the PlanCompiler,
while the latter will only be used once we generate the final Plan.
Basic constructor
datatype for this column
column name
Basic constructor
datatype for this column
column name
Underlying command to locate this column
Position in underlying reader
Visitor Design Pattern
Visitor Design Pattern
Debugging support
The command (reader, really) to get this column value from
Column position within the reader of the command
Get the table instance produced by this Op
Scans a table
Scan constructor
Only to be used for pattern matches
Visitor pattern method
The BasicOpVisitor that is visiting this Op
The Node that references this Op
Visitor pattern method for visitors with a return value
The visitor
The node in question
An instance of TResultType
No children
Scans a view - very similar to a ScanTable
Scan constructor
Only to be used for pattern matches
Visitor pattern method
The BasicOpVisitor that is visiting this Op
The Node that references this Op
Visitor pattern method for visitors with a return value
The visitor
The node in question
An instance of TResultType
Exactly 1 child
A SetOp Var - used as the output var for set operations (Union, Intersect, Except)
Represents a "simple" collection map.
Basic constructor
Column datatype
column name
column map for the element of the collection
list of key columns
list of foreign key columns
Visitor Design Pattern
Visitor Design Pattern
This class is a "simple" representation of the entity identity, where the
entityset containing the entity is known a priori. This may be because
there is exactly one entityset for the entity; or because it is inferrable
from the query that only one entityset is relevant here
Basic constructor.
Note: the entitySet may be null - in which case, we are referring to
a transient entity
The entityset
key columns of the entity
Debugging support
The entityset containing the entity
Represents a polymorphic typed column - either an entity or
a complex type.
Internal constructor
datatype of the column
column name
base list of fields common to all types
column map for type discriminator column
map from type discriminator value->columnMap
Visitor Design Pattern
Visitor Design Pattern
Debugging support
Get the type discriminator column
Get the type mapping
A SimpleRule is a rule that specifies a specific OpType to look for, and an
appropriate action to take when such an Op is identified
Basic constructor.
The OpType we're interested in
The callback to invoke when we see such an Op
Selects out a single row from a underlying subquery. Two flavors of this Op exist.
The first flavor enforces the single-row-ness (ie) an error is raised if the
underlying subquery produces more than one row.
The other flavor simply choses any row from the input
Singleton instance
Pattern for transformation rules
Visitor pattern method
The BasicOpVisitor that is visiting this Op
The Node that references this Op
Visitor pattern method for visitors with a return value
The visitor
The node in question
An instance of TResultType
1 child - input
Single-stream nest aggregation Op.
(Somewhat similar to a group-by op - should we merge these?)
Visitor pattern method
The BasicOpVisitor that is visiting this Op
The Node that references this Op
Visitor pattern method for visitors with a return value
The visitor
The node in question
An instance of TResultType
1 child - the input
The discriminator Var (when there are multiple collections)
List of postfix sort keys (mostly to deal with multi-level nested collections)
Set of keys for this nest operation
An internal cast operation. (Softly) Convert a type instance into an instance of another type
This Op is intended to capture "promotion" semantics. (ie) int16 promotes to an int32; Customer promotes to Person
etc. This Op is intended to shield the PlanCompiler from having to reason about
the promotion semantics; and is intended to make the query tree very
explicit
Pattern for transformation rules
Visitor pattern method
The BasicOpVisitor that is visiting this Op
The Node that references this Op
Visitor pattern method for visitors with a return value
The visitor
The node in question
An instance of TResultType
1 child - input expression
A Sortkey
The Var being sorted
Is this a sort asc, or a sort desc
An optional collation (only for string types)
A SortOp
Visitor pattern method
The BasicOpVisitor that is visiting this Op
The Node that references this Op
Visitor pattern method for visitors with a return value
The visitor
The node in question
An instance of TResultType
1 child - the input, SortOp must not contain local VarDefs
Describes metadata about a table
private initializer
the entity set corresponding to this table (if any)
Create a typed-table definition corresponding to an entityset (if specified)
The table has exactly one column - the type of the column is specified by
the "type" parameter. This table is considered to be un-"flattened"
type of each element (row) of the table
entityset corresponding to the table (if any)
Creates a "flattened" table definition.
The table has one column for each specified property in the "properties" parameter.
The name and datatype of each table column are taken from the corresponding property.
The keys of the table (if any) are those specified in the "keyProperties" parameter
The table may correspond to an entity set (if the entityset parameter was non-null)
prperties corresponding to columns of the table
entityset corresponding to the table (if any)
String form - for debugging
The extent metadata (if any)
List of columns of this table
Keys for this table
Is this table a "flat" table?
Represents a TREAT AS operation
Used as patterns in transformation rules
Visitor pattern method
The BasicOpVisitor that is visiting this Op
The Node that references this Op
Visitor pattern method for visitors with a return value
The visitor
The node in question
An instance of TResultType
1 child - instance
Is this a "fake" treat?
UnionAll (ie) no duplicate elimination
Visitor pattern method
The BasicOpVisitor that is visiting this Op
The Node that references this Op
Visitor pattern method for visitors with a return value
The visitor
The node in question
An instance of TResultType
Returns the branch discriminator var for this op. It may be null, if
we haven't been through key pullup yet.
Scans a virtual extent (ie) a transient collection
Visitor pattern method
The BasicOpVisitor that is visiting this Op
The Node that references this Op
Visitor pattern method for visitors with a return value
The visitor
The node in question
An instance of TResultType
The (collection-typed) Var that's being unnested
The table instance produced by this Op
Exactly 1 child
Helps define a list of VarDefOp
singleton instance
Visitor pattern method
The BasicOpVisitor that is visiting this Op
The Node that references this Op
Visitor pattern method for visitors with a return value
The visitor
The node in question
An instance of TResultType
The ColumnMapCopier clones an entire ColumnMap hierarchy; this is different
than the ColumnMapTranslator, which only copies things that need to be copied.
Note that this is a stateless visitor; it uses the visitor's argument for its
state management.
The Visitor's argument is a VarMap; anytime a Var is found in the ColumnMap
hierarchy, it is replaced with the replacement from the VarMap.
Note also that previous implementations of this class attempted to avoid re-
processing ColumnMaps by caching the results for each input and returning it.
I wasn't convinced that we were buying much with all that caching, since the
only ColumnMaps that should be repeated in the hierarchy are simple ones; there
is about as much object creation either way. The only reason I see that we
want to cache these is if we really cared to have only one VarRefColumnMap
instance for a given Var and be able to use reference equality instead of
comparing the Vars themselves. I don't believe we're making that guarantee
anywhere else, so I've removed that for now because I don't want the added
complexity that the caching adds. If performance analysis indicates there is
a problem, we can considier addding the cache back in.
Singleton instance for the "public" methods to use;
Constructor; no one should use this.
Return a copy of the column map, replacing all vars with the replacements
found in the replacementVarMap
Returns the var to use in the copy, either the original or the
replacement. Note that we will follow the chain of replacements, in
case the replacement was also replaced.
Copies the List of ColumnMaps or SimpleColumnMaps
Copies the DiscriminatedEntityIdentity
Copies the SimpleEntityIdentity
ComplexTypeColumnMap
DiscriminatedCollectionColumnMap
EntityColumnMap
SimplePolymorphicColumnMap
MultipleDiscriminatorPolymorphicColumnMap
RecordColumnMap
RefColumnMap
ScalarColumnMap
SimpleCollectionColumnMap
VarRefColumnMap
Factory methods for prescriptive column map patterns (includes default
column maps for materializer services and function mappings).
Creates a column map for the given reader and function mapping.
Build the collectionColumnMap from a store datareader, a type and an entitySet.
Requires: a public type with a public, default constructor. Returns a column map initializing the type
and all properties of the type with a public setter taking a primitive type and having a corresponding
column in the reader.
Build the entityColumnMap from a store datareader, a type and an entitySet and
a list ofproperties.
For a given edmType, build an array of scalarColumnMaps that map to the columns
in the store datareader provided. Note that we're hooking things up by name, not
by ordinal position.
Given a store datareader and a member of an edmType, find the column ordinal
in the datareader with the name of the member.
Given a store datareader, a column name, find the column ordinal
in the datareader with the name of the column.
We only have the functionImport provided to include it in the exception
message.
Given a store datareader and a column name, try to find the column ordinal
in the datareader with the name of the column.
true if found, false otherwise.
The Command object encapsulates all information relating to a single command.
It includes the expression tree in question, as well as the parameters to the
command.
Additionally, the Command class serves as a factory for building up different
nodes and Ops. Every node in the tree has a unique id, and this is enforced by
the node factory methods
Creates a new command
For mocking.
Get the primitive type by primitive type kind
EdmMetadata.PrimitiveTypeKind of the primitive type
A TypeUsage that represents the specified primitive type
True if the specified primitive type could be retrieved; otherwise false .
VarVec constructor
A new, empty, VarVec
Create a VarVec with a single Var
Create a VarVec with the set of specified vars
Create a new VarVec from the input VarVec
Release a VarVec to the freelist
Create a new enumerator for a VarVec; use a free one if its
available; otherwise, create a new one
Release an enumerator; keep it in a local stack for future use
Create an ordered list of Vars - initially empty
Create an ordered list of Vars
Create a table whose element type is "elementType"
type of each element (row) of the table
a table definition object
Creates a new table definition based on an extent. The element type
of the extent manifests as the single column of the table
the metadata extent
A new TableMD instance based on the extent
Create a "flat" table definition object (ie) the table has one column
for each property of the specified row type
the shape of each row of the table
the table definition
Create a "flat" table defintion. The table has one column for each property
specified, and the key columns of the table are those specified in the
keyMembers parameter
list of columns for the table
the key columns (if any)
(OPTIONAL) entityset corresponding to this table
Creates a new table instance
table metadata
A new Table instance with columns as defined in the specified metadata
Access an existing variable in the query (by its id)
The ID of the variable to retrieve
The variable with the specified ID
Gets the ParameterVar that corresponds to a given named parameter
The name of the parameter for which to retrieve the ParameterVar
The ParameterVar that corresponds to the specified parameter
Creates a variable for a parameter in the query
The name of the parameter for which to create the var
The type of the parameter, and therefore the new var
A new ParameterVar instance with the specified name and type
Creates a variable for the given parameter variable and replaces it in parameter map.
Parameter variable that needs to replaced.
Delegate that generates the replacement parameter's type.
A new ParameterVar instance created of .
This method should be used only to replace external enum or strong spatial parameters with a counterpart whose
type is the underlying type of the enum type, or the union type contating the strong spatial type of the
.
The operation invalidates the . After the operation has completed
the ) is invalidated internally and should no longer be used.
Creates a variable for the given enum parameter variable and replaces it in parameter map.
Enum parameter variable that needs to replaced.
A new ParameterVar instance created of .
This method should be used only to replace external enum parameter with a counterpart whose
type is the underlying type of the enum type of the .
The operation invalidates the . After the operation has completed
the ) is invalidated internally and should no longer be used.
Creates a variable for the given spatial parameter variable and replaces it in parameter map.
Spatial parameter variable that needs to replaced.
A new ParameterVar instance created of .
This method should be used only to replace external strong spatial parameter with a counterpart whose
type is the appropriate union type for .
The operation invalidates the . After the operation has completed
the ) is invalidated internally and should no longer be used.
Creates a new var for a table column
The table instance that produces the column
column metadata
A new ColumnVar instance that references the specified column in the given table
Creates a computed var (ie) a variable that is computed by an expression
The type of the result produced by the expression that defines the variable
A new ComputedVar instance with the specified result type
Creates a SetOp Var of
Datatype of the Var
A new SetOp Var with the specified result type
Creates a Node with zero children
The operator that the Node should reference
A new Node with zero children that references the specified Op
Creates a node with a single child Node
The operator that the Node should reference
The single child Node
A new Node with the specified child Node, that references the specified Op
Creates a node with two child Nodes
The operator that the Node should reference
The first child Node
the second child Node
A new Node with the specified child Nodes, that references the specified Op
Creates a node with 3 child Nodes
The operator that the Node should reference
The first child Node
The second child Node
The third child Node
A new Node with the specified child Nodes, that references the specified Op
Create a Node with the specified list of child Nodes
The operator that the Node should reference
The list of child Nodes
A new Node with the specified child nodes, that references the specified Op
Create a Node with the specified list of child Nodes
The operator that the Node should reference
The list of child Nodes
A new Node with the specified child nodes, that references the specified Op
Creates a new ConstantOp
The type of the constant value
The constant value (may be null)
A new ConstantOp with the specified type and value
Create an "internal" constantOp - only for use by the plan compiler to
represent internally generated constants.
User constants in the query should never get into this function
datatype of the constant
constant value
a new "internal" constant op that represents the constant
An internal constant that serves as a null sentinel, i.e. it is only ever used
to be checked whether it is null
An "internal" null constant
datatype of the null constant
a new "internal" null constant op
Create a constant predicateOp
value of the constant predicate
Create a constant predicate with value=true
Create a constant predicateOp with the value false
Creates a new FunctionOp
EdmFunction metadata that represents the function that is invoked by the Op
A new FunctionOp that references the specified function metadata
Creates a new TreatOp
Type metadata that specifies the type that the child of the treat node should be treated as
A new TreatOp that references the specified type metadata
Create a "dummy" treatOp (i.e.) we can actually ignore the treatOp.
Creates a new IsOfOp, which tests if the argument is of the specified type or a promotable type
Type metadata that specifies the type with which the type of the argument should be compared
A new IsOfOp that references the specified type metadata
Creates a new IsOfOp, which tests if the argument is of the specified type (and only the specified type)
Type metadata that specifies the type with which the type of the argument should be compared
A new IsOfOp that references the specified type metadata
Creates a new CastOp
Type metadata that represents the type to which the argument should be cast
A new CastOp that references the specified type metadata
Creates a new SoftCastOp and casts the input to the desired type.
The caller is expected to determine if the cast is necessary or not
Type metadata that represents the type to which the argument should be cast
A new CastOp that references the specified type metadata
Creates a new ComparisonOp of the specified type
An OpType that specifies one of the valid comparison OpTypes: EQ, GT, GE, NE, LT, LE
A new ComparisonOp of the specified comparison OpType
Creates a new LikeOp
The new LikeOp
Creates a new ConditionalOp of the specified type
An OpType that specifies one of the valid condition operations: And, Or, Not, IsNull
A new ConditionalOp with the specified conditional OpType
Creates a new CaseOp
The result type of the CaseOp
A new CaseOp with the specified result type
Creates a new AggregateOp
EdmFunction metadata that specifies the aggregate function
Indicates whether or not the aggregate is a distinct aggregate
A new AggregateOp with the specified function metadata and distinct property
Creates a named type constructor
Type metadata that specifies the type of the instance to construct
A new NewInstanceOp with the specified result type
Build out a new NewEntityOp constructing the entity scoped to the
.
Build out a new NewEntityOp constructing the uscoped entity .
Create a discriminated named type constructor
Type metadata that specifies the type of the instance to construct
Mapping information including discriminator values
the entityset that this instance belongs to
list of rel properties that have corresponding values
A new DiscriminatedNewInstanceOp with the specified result type and discrimination behavior
Creates a multiset constructor
Type metadata that specifies the type of the multiset to construct
A new NewMultiSetOp with the specified result type
Creates a record constructor
Type metadata that specifies that record type to construct
A new NewRecordOp with the specified result type
Creates a record constructor
Type metadata that specifies that record type to construct
A new NewRecordOp with the specified result type
A variant of the above method to create a NewRecordOp. An additional
argument - fields - is supplied, and the semantics is that only these fields
have any values specified as part of the Node. All other fields are
considered to be null.
Creates a new VarRefOp
The variable to reference
A new VarRefOp that references the specified variable
Creates a new ArithmeticOp of the specified type
An OpType that specifies one of the valid arithmetic operations: Plus, Minus, Multiply, Divide, Modulo, UnaryMinus
Type metadata that specifies the result type of the arithmetic operation
A new ArithmeticOp of the specified arithmetic OpType
Creates a new PropertyOp
EdmProperty metadata that specifies the property
A new PropertyOp that references the specified property metadata
Create a "relationship" propertyOp
the relationship property
a RelPropertyOp
Creates a new RefOp
The EntitySet to which the ref refers
The result type of the RefOp
A new RefOp that references the specified EntitySet and has the specified result type
Creates a new ExistsOp
A new ExistsOp
Creates a new ElementOp
Type metadata that specifies the result (element) type
A new ElementOp with the specified result type
Creates a new GetEntityRefOp: a ref-extractor (from an entity instance) Op
Type metadata that specifies the result type
A new GetEntityKeyOp with the specified result type
Creates a new GetRefKeyOp: a key-extractor (from a ref instance) Op
Type metadata that specifies the result type
A new GetRefKeyOp with the specified result type
Creates a new CollectOp
Type metadata that specifies the result type of the Nest operation
A new NestOp with the specified result type
Create a DerefOp
Entity type of the target entity
a DerefOp
Create a new NavigateOp node
the output type of the navigateOp
the relationship property
the navigateOp
Creates a VarDefListOp
A new VarDefListOp
Creates a VarDefOp (for a computed var)
The computed var
A new VarDefOp that references the computed var
Create a VarDefOp and the associated node for an expression.
We create a computedVar first - of the same type as the expression, and
then create a VarDefOp for the computed Var. Finally, we create a Node for
the VarDefOp
new Var produced
Creates a VarDefListOp with a single child - a VarDefOp created as in the function
above.
the computed Var produced
Creates a new ScanTableOp
A Table metadata instance that specifies the table that should be scanned
A new ScanTableOp that references a new Table instance based on the specified table metadata
A variant of the above
The table instance
a new ScanTableOp
Creates an instance of a ScanViewOp
the table instance
a new ScanViewOp
Creates an instance of a ScanViewOp
the table metadata
a new ScanViewOp
Creates a new UnnestOp, which creates a streaming result from a scalar (non-RelOp) value
The Var that indicates the value to unnest
A new UnnestOp that targets the specified Var
Creates a new UnnestOp - a variant of the above with the Table supplied
the unnest Var
the table instance
a new UnnestOp
Creates a new FilterOp
A new FilterOp
Creates a new ProjectOp
A VarSet that specifies the Vars produced by the projection
A new ProjectOp with the specified output VarSet
A variant of the above where the ProjectOp produces exactly one var
Creates a new InnerJoinOp
A new InnerJoinOp
Creates a new LeftOuterJoinOp
A new LeftOuterJoinOp
Creates a new FullOuterJoinOp
A new FullOuterJoinOp
Creates a new CrossJoinOp
A new CrossJoinOp
Creates a new CrossApplyOp
A new CrossApplyOp
Creates a new OuterApplyOp
A new OuterApplyOp
Creates a new SortKey with the specified var, order and collation
The variable to sort on
The sort order (true for ascending, false for descending)
The sort collation
A new SortKey with the specified var, order and collation
Creates a new SortKey with the specified var and order
The variable to sort on
The sort order (true for ascending, false for descending)
A new SortKey with the specified var and order
Creates a new SortKey with the specified var
The variable to sort on
A new SortKey with the specified var
Creates a new SortOp
The list of SortKeys that define the sort var, order and collation for each sort key
A new SortOp with the specified sort keys
Creates a new ConstrainedSortOp
The list of SortKeys that define the sort var, order and collation for each sort key
A new ConstrainedSortOp with the specified sort keys and a default WithTies value of false
Creates a new ConstrainedSortOp
The list of SortKeys that define the sort var, order and collation for each sort key
The value to use for the WithTies property of the new ConstrainedSortOp
A new ConstrainedSortOp with the specified sort keys and WithTies value
Creates a new GroupByOp
A VarSet that specifies the Key variables produced by the GroupByOp
A VarSet that specifies all (Key and Aggregate) variables produced by the GroupByOp
A new GroupByOp with the specified key and output VarSets
Creates a new GroupByIntoOp
A VarSet that specifies the Key variables produced by the GroupByOp
A VarSet that specifies all (Key and Aggregate) variables produced by the GroupByOp
A VarSet that specifies the vars from the input that represent the real grouping input
A new GroupByOp with the specified key and output VarSets
Creates a new DistinctOp
list of key vars
A new DistinctOp
An overload of the above - where the distinct has exactly one key
Creates a new UnionAllOp
Mappings from the Output Vars to the Vars produced by the left argument
Mappings from the Output Vars to the Vars produced by the right argument
A UnionAllOp that references the specified left and right Vars
Creates a new UnionAllOp, with a branch descriminator.
Mappings from the Output Vars to the Vars produced by the left argument
Mappings from the Output Vars to the Vars produced by the right argument
Var that contains the branch discrimination value (may be null until key pullup occurs)
A UnionAllOp that references the specified left and right Vars
Creates a new IntersectOp
Mappings from the Output Vars to the Vars produced by the left argument
Mappings from the Output Vars to the Vars produced by the right argument
An IntersectOp that references the specified left and right Vars
Creates a new ExceptOp
Mappings from the Output Vars to the Vars produced by the left argument
Mappings from the Output Vars to the Vars produced by the right argument
An ExceptOp that references the specified left and right Vars
Create a single-row-op (the relop analog of Element)
Create a SingleRowTableOp - a table with exactly one row (and no columns)
Create a PhysicalProjectOp - with a columnMap describing the output
list of output vars
columnmap describing the output element
Create a physicalProjectOp - with a single column output
the output element
Another overload - with an additional discriminatorValue.
Should this be a subtype instead?
the collectionVar
column map for the collection element
elementVars with any nested collections pulled up
keys specific to this collection
sort keys specific to this collecion
discriminator value for this collection (under the current nestOp)
a new CollectionInfo instance
Create a singleStreamNestOp
keys for the nest operation
list of prefix sort keys
list of postfix sort keys
List of outputVars
CollectionInfo for each collection
Var describing the discriminator
Create a MultiStreamNestOp
list of prefix sort keys
List of outputVars
CollectionInfo for each collection element
Get auxilliary information for a Node
the node
node info for this node
Get extended node information for a RelOpNode
the node
extended node info for this node
Recompute the nodeinfo for a node, but only if has already been computed
Node in question
Pulls up keys if necessary and gets the key information for a Node
node
key information
Check to see if two types are considered "equal" for the purposes
of the plan compiler.
Two types are considered to be equal if their "identities" are equal.
true, if the types are "equal"
Check to see if two types are considered "equal" for the purposes
of the plan compiler
true, if the types are "equal"
Builds out a UNION-ALL ladder from a sequence of node,var pairs.
Assumption: Each node produces exactly one Var
If the input sequence has zero elements, we return null
If the input sequence has one element, we return that single element
Otherwise, we build out a UnionAll ladder from each of the inputs. If the input sequence was {A,B,C,D},
we build up a union-all ladder that looks like
(((A UA B) UA C) UA D)
list of input nodes - one for each branch
list of input vars - N for each branch
the resulting union-all subtree
the output vars from the union-all subtree
A simplified version of the method above - each branch can produce only one var
Build a projectOp tree over the input.
This function builds a projectOp tree over the input. The Outputs (vars) of the project are the
list of vars from the input (inputVars), plus one computed Var for each of the computed expressions
(computedExpressions)
the input relop to the project
List of vars from the input that need to be projected
list (possibly empty) of any computed expressions
A "simpler" builder method for ProjectOp. The assumption is that the only output is the
(var corresponding to) the computedExpression. None of the Vars of the "input" are projected out
The single output Var is returned in the "outputVar" parameter
the input relop
the computed expression
(output) the computed var corresponding to the computed expression
the new project subtree node
Build the equivalent of an OfTypeExpression over the input (ie) produce the set of values from the
input that are of the desired type (exactly of the desired type, if the "includeSubtypes" parameter is false).
Further more, "update" the result element type to be the desired type.
We accomplish this by first building a FilterOp with an IsOf (or an IsOfOnly) predicate for the desired
type. We then build out a ProjectOp over the FilterOp, where we introduce a "Fake" TreatOp over the input
element to cast it to the right type. The "Fake" TreatOp is only there for "compile-time" typing reasons,
and will be ignored in the rest of the plan compiler
the input collection
the single Var produced by the input collection
the desired element type
do we include subtypes of the desired element type
the result subtree
the single Var produced by the result subtree
Builds out a ProjectOp over the input that introduces a "Fake" TreatOp over the input Var to cast it to the desired type
The "Fake" TreatOp is only there for "compile-time" typing reasons, and will be ignored in the rest of the plan compiler.
the input collection
the single Var produced by the input collection
the desired element type
the single Var produced by the result subtree
the result subtree
Build a comparisonOp over the input arguments. Build SoftCasts over the inputs, if we need
to.
the comparison optype
Arg 0
Arg 1
the resulting comparison tree
Build up a CollectOp over a relop tree
the relop tree
the single output var from the relop tree
Mark this rel-property as "referenced" in the current query, if the target
end has multiplicity of one (or zero_or_one)
the rel-property
Is this rel-property referenced in the query so far
the rel-property
true, if the rel property was referenced in the query
Gets the metadata workspace associated with this command
Gets/sets the root node of the query
Returns the next value for a UnionAll BranchDiscriminator.
Returns the next value for a node id, without incrementing it.
Helper routine to get the metadata representation for the bool type
Helper routine to get the metadata representation of the int type
Helper routine to get the metadata representation of the string type
All vars in the query
The set of referenced rel properties in the current query
A dump module for the Iqt
Driver method to dump the entire tree
Driver method to dump the a subtree of a tree
Private constructor
Common CollectionColumnMap code
Common code to produce an the attributes for the dumper's XML node
ComplexTypeColumnMap
DiscriminatedCollectionColumnMap
EntityColumnMap
PolymorphicColumnMap
MultipleDiscriminatorPolymorphicColumnMap
RecordColumnMap
RefColumnMap
SimpleCollectionColumnMap
SimpleColumnMap
SimpleColumnMap
DiscriminatedEntityIdentity
SimpleEntityIdentity
Describes user-defined discriminator metadata (e.g. for a basic TPH mapping). Encapsulates
relevant data from System.Data.Entity.Core.Mapping.ViewGenerabetion.DiscriminatorMap (that is to say,
data relevant to the PlanCompiler). This separate class accomplishes two things:
1. Maintain separation of ViewGen and PlanCompiler
2. Avoid holding references to CQT expressions in ITree ops (which the ViewGen.DiscriminatorMap
holds a few CQT references)
Returns the type id for the given entity type, or null if non exists.
Maps from discriminator value to type.
Gets property containing discriminator value.
All properties for the type hierarchy.
Represents one instance of a table. Contains the table metadata
String form - for debugging
Metadata for the table instance
List of column references
Get the list of all referenced columns.
List of keys
(internal) id for this table instance
Counts the number of nodes in a tree
Public entry point - Calculates the nubmer of nodes in the given subTree
Common processing for all node types
Count = 1 (self) + count of children
A Node describes a node in a query tree. Each node has an operator, and
a list of zero or more children of that operator.
Basic constructor.
NEVER call this routine directly - you should always use the Command.CreateNode
factory methods.
id for the node
The operator
List of child nodes
This routine is only used for building up rule patterns.
NEVER use this routine for building up nodes in a user command tree.
Is this subtree equivalent to another subtree
Get the nodeInfo for a node. Initializes it, if it has not yet been initialized
Current command object
NodeInfo for this node
Gets the "extended" nodeinfo for a node; if it has not yet been initialized, then it will be
current command object
extended nodeinfo for this node
Get the list of children
Gets or sets the node's operator
Simpler (?) getter/setter routines
Do I have a zeroth child?
Get/set first child
Do I have a child1?
get/set second child
get/set second child
Do I have a child2 (third child really)
Do I have a child3 (fourth child really)
Has the node info been initialized, i.e. previously computed
All rule pattern operators - Leaf, Tree
Default constructor
kind of Op
RulePatternOp
Represents a multi-stream nest operation. The first input represents the
container row, while all the other inputs represent collections
Visitor pattern method
The BasicOpVisitor that is visiting this Op
The Node that references this Op
Visitor pattern method for visitors with a return value
The visitor
The node in question
An instance of TResultType
Represents a table with a single row
Singleton instance
Pattern for transformation rules
Visitor pattern method
The BasicOpVisitor that is visiting this Op
The Node that references this Op
Visitor pattern method for visitors with a return value
The visitor
The node in question
An instance of TResultType
0 children
A helper class for all rel-properties
Add the rel property induced by the specified relationship, (if the target
end has a multiplicity of one)
We only keep track of rel-properties that are "interesting"
the association relationship
source end of the relationship traversal
target end of the traversal
Add any rel properties that are induced by the supplied relationship
the relationship
Get the rel properties declared by this type (and *not* by any of its subtypes)
the entity type
set of rel properties declared for this type
Get the rel-properties of this entity and its supertypes (starting from the root)
the entity type
set of rel-properties for this entity type (and its supertypes)
LeafOp - matches any subtree
The singleton instance of this class
Niladic constructor
0 children
The RuleProcessor helps apply a set of rules to a query tree
A lookup table for rules.
The lookup table is an array indexed by OpType and each entry has a list of rules.
Initializes a new RuleProcessor
Apply rules to the current subtree in a bottom-up fashion.
Current rule processing context
The look-up table with the rules to be applied
Current subtree
Parent node
Index of this child within the parent
the result of the transformation
Apply a set of rules to the subtree
Rule processing context
current subtree
transformed subtree
Navigate a relationship, and get the reference(s) of the target end
Pattern for transformation rules
Visitor pattern method
The BasicOpVisitor that is visiting this Op
The Node that references this Op
Visitor pattern method for visitors with a return value
The visitor
The node in question
An instance of TResultType
1 child - entity instance
The rel property that describes this nvaigation
The relationship we're traversing
The starting point of the traversal
The end-point of the traversal
A definition of a variable
Visitor pattern method
The BasicOpVisitor that is visiting this Op
The Node that references this Op
Visitor pattern method for visitors with a return value
The visitor
The node in question
An instance of TResultType
1 child - the defining expression
The Var being defined
An ordered list of Vars. Use this when you need an ordering.
Trivial constructor
Not so trivial constructor
Debugging support
provide a string representation for debugging.
A VarRefColumnMap is our intermediate representation of a ColumnMap.
Eventually, this gets translated into a regular ColumnMap - during the CodeGen phase
Simple constructor
datatype of this Var
the name of the column
the var producing the value for this column
Visitor Design Pattern
Visitor Design Pattern
Debugging support
Get the Var that produces this column's value
A reference to an existing variable
Singleton used for pattern matching
Two VarRefOps are equivalent, if they reference the same Var
the other Op
true, if these are equivalent
Visitor pattern method
The BasicOpVisitor that is visiting this Op
The Node that references this Op
Visitor pattern method for visitors with a return value
The visitor
The node in question
An instance of TResultType
0 children
The Var that this Op is referencing
Helps map one variable to the next.
Types of variable
a parameter
Column of a table
A Computed var
Var for SetOps (Union, Intersect, Except)
NotValid
A VarVec is a compressed representation of a set of variables - with no duplicates
and no ordering
A VarVec should be used in many places where we expect a number of vars to be
passed around; and we don't care particularly about the ordering of the vars
This is obviously not suitable for representing sort keys, but is still
reasonable for representing group by keys, and a variety of others.
Computes (this Minus other) by performing (this And (Not(other)))
A temp VarVec is used and released at the end of the operation
Does this have a non-zero overlap with the other vec
Does this Vec include every var in the other vec?
Written this way deliberately under the assumption that "other"
is a relatively small vec
The enumerator pattern
Walk through the input varVec, replace any vars that have been "renamed" based
on the input varMap, and return the new VarVec
dictionary of renamed vars
a new VarVec
Debugging support
provide a string representation for debugging.
Create a clone of this vec
Number of vars in this set
Is this Vec empty?
Get me the first var that is set
A VarVec enumerator is a specialized enumerator for a VarVec.
Constructs a new enumerator for the specified Vec
Initialize the enumerator to enumerate over the supplied Vec
Move to the next position
Reset enumerator to start off again
Dispose of the current enumerator - return it to the Command
Get the Var at the current position
The Aggregate Pushdown feature tries to identify function aggregates defined over a
group aggregate and push their definitions in the group by into node corresponding to
the group aggregate.
Apply Aggregate Pushdown over the tree in the given plan complier state.
The main driver
Try to push the given function aggregate candidate to the corresponding group into node.
The candidate can be pushed if all ancestors of the group into node up to the least common
ancestor between the group into node and the function aggregate have one of the following node op types:
Project
Filter
ConstraintSortOp
Check whether all nodes in the given list of nodes are of types
that we know how to propagate an aggregate through
Finds the paths from each of node1 and node2 to their least common ancestor
Finds all ancestors of the given node.
An ordered list of the all the ancestors of the given node starting from the immediate parent to the root of the tree
Utility class to gather helper methods used by more than one class in the Aggregate Pushdown feature.
Determines whether the given node is a VarRef over the given var
A reference to "all" properties of a type
A PropertyRef class encapsulates a reference to one or more properties of
a complex instance - a record type, a complex type or an entity type.
A PropertyRef may be of the following kinds.
- a simple property reference (just a reference to a simple property)
- a typeid reference - applies only to entitytype and complextypes
- an entitysetid reference - applies only to ref and entity types
- a nested property reference (a reference to a nested property - a.b)
- an "all" property reference (all properties)
Create a nested property ref, with "p" as the prefix.
The best way to think of this function as follows.
Consider a type T where "this" describes a property X on T. Now
consider a new type S, where "p" is a property of S and is of type T.
This function creates a PropertyRef that describes the same property X
from S.p instead
the property to prefix with
the nested property reference
Create a nested property ref for a simple property. Delegates to the function
above
the simple property
a nestedPropertyRef
Creates a nested property ref for a rel-property. Delegates to the function above
the rel-property
a nested property ref
The tostring method for easy debuggability
Get the singleton instance
Create a nested property ref, with "p" as the prefix
the property to prefix with
the nested property reference
Transformation rules for ApplyOps - CrossApply, OuterApply
Convert CrossApply(X, Filter(Y, p)) => InnerJoin(X, Y, p)
OuterApply(X, Filter(Y, p)) => LeftOuterJoin(X, Y, p)
if "Y" has no external references to X
Rule processing context
Current ApplyOp
transformed subtree
Transformation status
Convert OuterApply(X, Project(Filter(Y, p), constant)) =>
LeftOuterJoin(X, Project(Y, constant), p)
if "Y" has no external references to X
In an ideal world, we would be able to push the Project below the Filter,
and then have the normal ApplyOverFilter rule handle this - but that causes us
problems because we always try to pull up ProjectOp's as high as possible. Hence,
the special case for this rule
Rule processing context
Current ApplyOp
transformed subtree
Transformation status
Converts a CrossApply(X, Project(Y, ...)) => Project(CrossApply(X, Y), ...)
where the projectVars are simply pulled up
RuleProcessing context
The ApplyOp subtree
transformed subtree
Transfomation status
Converts a
OuterApply(X, Project(Y, ...))
=>
Project(OuterApply(X, Project(Y, ...)), ...) or
Project(OuterApply(X, Y), ...)
The second (simpler) form is used if a "sentinel" var can be located (ie)
some Var of Y that is guaranteed to be non-null. Otherwise, we create a
dummy ProjectNode as the right child of the Apply - which
simply projects out all the vars of the Y, and adds on a constant (say "1"). This
constant is now treated as the sentinel var
Then the existing ProjectOp is pulled up above the the outer-apply, but all the locally defined
Vars have their defining expressions now expressed as
case when sentinelVar is null then null else oldDefiningExpr end
where oldDefiningExpr represents the original defining expression
This allows us to get nulls for the appropriate columns when necessary.
Special cases.
* If the oldDefiningExpr is itself an internal constant equivalent to the null sentinel ("1"),
we simply project a ref to the null sentinel, no need for cast
* If the ProjectOp contained exactly one locally defined Var, and it was a constant, then
we simply return - we will be looping endlessly otherwise
* If the ProjectOp contained no local definitions, then we don't need to create the
dummy projectOp - we can simply pull up the Project
* If any of the defining expressions of the local definitions was simply a VarRefOp
referencing a Var that was defined by Y, then there is no need to add the case
expression for that.
RuleProcessing context
The ApplyOp subtree
transformed subtree
Transfomation status
Converts a CrossApply(X,Y) => CrossJoin(X,Y)
OuterApply(X,Y) => LeftOuterJoin(X, Y, true)
only if Y has no external references to X
Rule processing context
The ApplyOp subtree
transformed subtree
the transformation status
Converts a Apply(X,Y) => Project(X, Y1), where Y1 is a scalar subquery version of Y
The transformation is valid only if all of the following conditions hold:
1. Y produces only one output
2. Y produces at most one row
3. Y produces at least one row, or the Apply operator in question is an OuterApply
Rule processing context
The ApplyOp subtree
transformed subtree
the transformation status
Determines whether an applyNode can be rewritten into a projection with a scalar subquery.
It can be done if all of the following conditions hold:
1. The right child or the apply has only one output
2. The right child of the apply produces at most one row
3. The right child of the apply produces at least one row, or the Apply operator in question is an OuterApply
Convert a CrossApply(X, LeftOuterJoin(SingleRowTable, Y, on true))
into just OuterApply(X, Y)
rule processing context
the apply node
transformed subtree
transformation status
A visitor that calculates the number of output columns for a subree
with a given root
Calculates the number of output columns for the subree
rooted at the given node
Visitor for children. Simply visit all children,
and sum the number of their outputs.
Current node
A default processor for any node.
Returns the sum of the children outputs
The number of outputs is same as for any of the inputs
Distinct
FilterOp
GroupByOp
ProjectOp
ScanTableOp
SingleRowTableOp
Same as the input
A utility class that remaps a given var at its definition and also remaps all its references.
The given var is remapped to an arbitrary new var.
If the var is defined by a ScanTable, all the vars defined by that table and all their references
are remapped as well.
The VarRemapper is a utility class that can be used to "remap" Var references
in a node, or a subtree.
Internal constructor
Current iqt command
Internal constructor
Current iqt command
Var map to be used
Add a mapping for "oldVar" - when the replace methods are invoked, they
will replace all references to "oldVar" by "newVar"
var to replace
the replacement var
Update vars in just this node (and not the entire subtree)
Does *not* recompute the nodeinfo - there are at least some consumers of this
function that do not want the recomputation - transformation rules, for example
current node
Update vars in this subtree. Recompute the nodeinfo along the way
subtree to "remap"
Produce a a new remapped varList
remapped varList
Remap the given varList using the given varMap
Get the mapping for a Var - returns the var itself, mapping was found
Default visitor for a node - does not visit the children
The reason we have this method is because the default VisitDefault
actually visits the children, and we don't want to do that
Public entry point.
Remaps the subree rooted at the given tree
Update vars in this subtree. Recompute the nodeinfo along the way
Unlike the base implementation, we want to visit the childrent, even if no vars are in the
remapping dictionary.
If the node defines the node that needs to be remapped,
it remaps it to a new var.
If the columnVars defined by the table contain the var that needs to be remapped
all the column vars produces by the table are remaped to new vars.
The var that needs to be remapped may be produced by a set op,
in which case the varmaps need to be updated too.
Replaces the entry in the varMap in which m_oldVar is a key
with an entry in which newVAr is the key and the value remains the same.
Additional information for a JoinNode
AugmentedJoinNode - represents all joins (cross-joins, leftouter, fullouter
and innerjoins). This class represents a number of column equijoin conditions
via the LeftVars and RightVars properties, and also keeps track of additional
(non-equijoin column) join predicates
Additional information for a node.
AugmentedNode - this is the base class for all annotations. This class
wraps a Node, an id for the node (where the "id" is assigned in DFS order),
and a list of children. All Nodes that are neither joins, nor scanTables
are represented by this class
basic constructor
Id for this node
current node
Yet another constructor
Id for this node
current node
list of children
Id of this node
The node
Parent node
List of children
List of directed edges in which:
- If this is an AugmentedTableNode, it is the "left" table
- If it is an AugumentedJoinNode, it is the join on which the edge is based
basic constructor
current node id
the join node
left side of the join (innerJoin, LOJ and FOJ only)
right side of the join
left-side equijoin vars
right-side equijoin vars
any remaining predicate
Yet another constructor - used for crossjoins
node id
current node
list of children
Non-equijoin predicate
Equijoin columns of the left side
Equijoin columns of the right side
Additional information for a "Table" node
AugmentedTableNode - the augmentedTableNode is a subclass of AugmentedNode,
and represents a ScanTable node. In addition to the information above, this
class keeps track of all join edges that this node participates in,
whether this table has been eliminated, and finally, how high in the tree
this node is visible
Basic constructor
node id
scan table node
The Table
The highest node (id) at which this table is visible
Has this table been eliminated
The replacement table (if any) for this table
New location for this table
Has this table "moved" ?
Get the list of nullable columns (that require special handling)
This involves
* Converting the ITree into a set of ProviderCommandInfo objects
* Creating a column map to enable result assembly
Currently, we only produce a single ITree, and correspondingly, the
following steps are trivial
current compiler state
CQTs for each store command
column map to help in result assembly
The real driver. This routine walks the tree, converts each subcommand
into a CTree, and converts the columnmap into a real column map.
Finally, it produces a "real" plan that can be used by the bridge execution, and
returns this plan
The root of the tree must be a PhysicalProjectOp. Each child of this Op
represents a command to be executed, and the ColumnMap of this Op represents
the eventual columnMap to be used for result assembly
CQTs for store commands
column map for result assembly
For each subcommand, build up a "location-map" for each top-level var that
is projected out. This location map will ultimately be used to convert VarRefColumnMap
into SimpleColumnMap
Represents information about a collection typed Var.
Each such Var is replaced by a Var with a new "mapped" type - the "mapped" type
is simply a collection type where the element type has been "mapped"
Information about a Var and its replacement
Gets for this .
Get the list of new Vars introduced by this VarInfo
Create a CollectionVarInfo
Get the newVar
Gets for this . Always .
Get the list of all NewVars - just one really
Creates a column map for a column
column datatype
column name
Create a column map for a complextype column
Type information for the type
column name
Supertype info if any
Dictionary of typeidvalue->column map
List of all maps
Create a column map for an entitytype column.
Currently, the key columns are not duplicated (ie) they point into the
same locations as in the properties list.
Note: we also don't handle keys that are properties of nested fields
Type information for the type
column name
supertype information if any
Dictionary of typeid->column map information
List of all column maps (including those without typeid)
should we handle rel-properties?
Build up the list of columnmaps for the relproperties.
Assumption: rel-properties follow after ALL the regular properties of the
types in the type hierarchy.
For now, we're simply going to ignore the rel-property columnmaps - we're
just going to use this function to "drain" the corresponding vars
typeinfo for the entity type
should we get rel-properties from our supertype instances
Create a column map for the entitysetid column
Creates a column map for a polymorphic type. This method first
creates column maps for each type that is a subtype of the input type,
and then creates a dictionary of typeid value -> column
Finally, a PolymorphicColumnMap is created with these pieces of information
Info about the type
column name
Create a column map for a record type. Simply iterates through the
list of fields, and produces a column map for each field
Type information for the record type
column name
Create a column map for a ref type
Type information for the ref type
Name of the column
Column map for the ref type
Create a simple columnmap - applies only to scalar properties
(Temporarily, also for collections)
Simply picks up the next available column in the reader
Column type
column name
Column map for this column
Create a column map for the typeid column
Create a column map for a structural column - ref/complextype/entity/record
Type info for the type
column name
Build out an EntityIdentity structure - for use by EntityColumnMap and RefColumnMap
the entity type in question
column map for the entitysetid column
column maps for the keys
Delegate pattern that the ColumnMapTranslator uses to find its replacement
columnMaps. Given a columnMap, return it's replacement.
ColumnMapTranslator visits the ColumnMap hiearchy and runs the translation delegate
you specify; There are some static methods to perform common translations, but you
can bring your own translation if you desire.
This visitor only creates new ColumnMap objects when necessary; it attempts to
replace-in-place, except when that is not possible because the field is not
writable.
NOTE: over time, we should be able to modify the ColumnMaps to have more writable
fields;
Singleton instance for the "public" methods to use;
Constructor; no one should use this.
Returns the var to use in the copy, either the original or the
replacement. Note that we will follow the chain of replacements, in
case the replacement was also replaced.
Bring-Your-Own-Replacement-Delegate method.
Replace VarRefColumnMaps with the specified ColumnMap replacement
Replace VarRefColumnMaps with new VarRefColumnMaps with the specified Var
Replace VarRefColumnMaps with ScalarColumnMaps referring to the command and column
List(ColumnMap)
DiscriminatedEntityIdentity
SimpleEntityIdentity
ComplexTypeColumnMap
DiscriminatedCollectionColumnMap
EntityColumnMap
SimplePolymorphicColumnMap
MultipleDiscriminatorPolymorphicColumnMap
RecordColumnMap
RefColumnMap
ScalarColumnMap
SimpleCollectionColumnMap
VarRefColumnMap
Captures information about a single provider command
Internal constructor for a ProviderCommandInfo object
command tree for the provider command
Internal methods to get the command tree
Transformation Rules for ConstrainedSortOp
If the ConstrainedSortOp's input is guaranteed to produce no rows, remove the ConstrainedSortOp completly:
CSort(EmptySet) => EmptySet
Rule processing context
current subtree
transformed subtree
transformation status
Keeps track of all foreign key relationships
Is there a parent child relationship between table1 and table2 ?
parent table ?
child table ?
list of constraints ?
true if there is at least one constraint
Load all relationships in this entity container
Is this relationship a binary relationship (ie) does it have exactly 2 end points?
This should ideally be a method supported by RelationType itself
true, if this is a binary relationship
Asserts that the specified DbExpression is a 'RelOp' DbExpression, i.e. it is considered the publisher of one or more (IQT) RelVars.
The DbExpression on which to Assert
Update the DbExpression to RelOpInfo map to indicate that the specified DbExpression logically publishes the Vars
tracked in VarInfoList and that they should be bound under the specified name.
The name under which the Vars tracked in VarInfoList are initially considered bound. This will be a unique name based on what kind of RelOp the specified DbExpression (the publisher) corresponds to
The DbExpression that is considered the logical publisher of the Vars tracked in publishedVars
A VarInfoList that contains VarInfo instances that track the IQT Vars that are logically published by the specified DbExpression
A new RelOpInfo instance that associates the given binding name and published Vars with the specified DbExpression. This RelOpInfo is also added to the DbExpression to RelOpInfo map
Removes an entry in the DbExpression to RelOpInfo map, 'consuming' it so that it is not visible higher in the converted CQT.
The DbExpression for which the corresponding RelOpEntry should be removed
The RelOpInfo that was removed from the DbExpression to RelOpInfo map
Visit a Node that will be used as the basis of a DbExpressionBinding, optionally pushing the
Vars that are logically published by the DbExpression produced from the Node's Op onto the expression binding scopes stack.
The Node to Visit
Indicates whether or not the Vars published by the converted form of the Node's Op should be brought into scope before this method returns
The RelOpInfo that corresponds to the given Node, which details the DbExpression it was converted to, the Vars that are logically published by that DbExpression, and the unique name under which those Vars should be bound
Converts a list of VarDefOp Nodes into Expressions, builds a map of Var to DbExpression for each
defined Var, and pushes a new VarDefScope containing the map onto the stack of 'in scope' Vars.
A list of Nodes. Each Node in the list must reference a VarDefOp
A convenience method to create a new VarDefScope from the specified VarDefListOp Node
The Node that references the VarDefListOp. Its children will be used as the basis of the new VarDefScope
Asserts that the top of the scope stack is actually a VarDefScope, and then pops it to remove the locally defined Vars from scope.
Resolves an IQT Var to a CQT DbExpression.
There are 3 possible ways for an IQT Var to resolve to a valid reference expressed as a CQT DbExpression:
1. The specified Var is a valid ParameterVar in the IQT Command being converted:
This resolves simply to ParameterRefExpression. A Parameter that corresponds to the ParameterVar
is declared on the CQT DbCommandTree is this has not already been done.
2. The specified Var is a ComputedVar that is defined locally to the Op being visited. In this case
The DbExpression produced by converting the VarDefOp that defines the Var is returned.
3. Otherwise, the Var must have been brought into scope because the DbExpression that logically produces it is
being used in a DbExpressionBinding which is currently in scope. Each RelOpInfo on the ExpressionBindingScopes stack
is asked to resolve the Var, if one of the RelOpInfo scopes is tracking the Var it will construct an appropriate combination
of DbVariableReferenceExpression and PropertyRefExpressions that are sufficient to logically reference the Var.
If none of the 3 above conditions are satisfied then the Var is unresolvable in the CQT being constructed and
the original IQT Command must be considered invalid for the purposes of this conversion.
The IQT Var to resolve
The CQT DbExpression to which the specified Var resolves
Asserts that the specified Node has exactly 2 child Nodes
The Node on which to Assert
A SoftCastOp is intended to be used only for promotion (and/or equivalence)
and should be ignored in the CTree
the softcast Op
the node
Generates a name for the specified Var.
If the Var has a name (TryGetName), then we use the name to look up
the right alias generator, and get a column name from the alias generator
Otherwise, we simply get a name from the default alias generator
the var in question
map to identify the appropriate alias generator
the default alias generator
list of already used names
Called by both Visit(ProjectOp) and VisitSetOpArgument to create a DbProjectExpression
based on the RelOpInfo of the projection input and the set of projected Vars.
Note:
The projected Vars must have already been brought into scope (by one of the
methods such as EnterExpressionBinding, EnterVarDefScope, etc) before this method
is called, or the projected Vars will not be successfully resolved.
Both Visit(ProjectOp) and VisitSetOpArgument do this"
1. Visit(ProjectOp) takes both DbExpressionBinding and VarDef based Vars into account
2. The Vars produced by a SetOpArgument projection are only allowed to be DbExpressionBinding
based and are brought into scope when the original SetOp argument Node is visited.
Called by both ScanTableOp and UnnestOp Visitor pattern methods to determine
the shape of the output of the converted form of those Ops, in terms of the
IQT Vars that are published by the resulting DbExpression and how those Vars should
be reached.
The table that is logically produced by the Op. For non-record sourceTypes, this should consist of a single column that logically constitutes the entire 'table'
A VarInfoList containing VarInfo instances that correctly track the Var or Vars produced by the targetTable, in accordance with the shape of the sourceType
Translate UnnestOp which is assumed (at this stage) to wrap a native ScalarOp
that returns a collection (e.g. a table-valued function node).
Builds up an "empty" projection over the input node. Well, in reality, we build
up a dummy projection node - which simply selects out some constant (which
is never used). This is useful in scenarios where the outputs are
uninteresting, but the input row count is
the relOp node
Build up a Project Op with exactly the Vars that we want. If the input is
a Project already, piggyback on it, and get the Vars we want. Otherwise,
create a new ProjectOp, and define the specified Vars
Note that the ProjectOp's output (element) type will be a record with the fields
in exactly the order specified by the projectionVars argument
the input relOpNode to cap with a Project
List of vars we are interested in
A ProjectOp that produces the right set of Vars
Massages the input to a join node.
If the input is a Filter(ScanTable), we throw in a dummy project over
this input. This projectOp simply looks at the "referenced" columns of
the table, and uses those as the projection Vars
Otherwise, sqlgen does not really know which columns are referenced, and
ends up adding a projection with all columns of the table.
NOTE: We may want to do this for Apply as well
one of the inputs to the join node
RelopInfo for the transformed input
Called by all Visitor pattern method that handle binary JoinOps (Inner, FullOuter, LeftOuter)
The IQT Node that references the JoinOp
The CQT DbExpressionKind that represents the type of join to create
Called by both CrossApply and OuterApply visitor pattern methods - command handling of both types of Apply operation
The Node that references the ApplyOp
The CQT DbExpressionKind that corresponds to the ApplyOp (DbExpressionKind.CrossApply for CrossApplyOp, DbExpressionKind.OuterApply for OuterApplyOp)
A new CqtResult containing a DbApplyExpression with the correct ApplyType
Called by VisitSetOp to convert each argument.
Determines whether a column-reordering projection should be applied to
the argument, and applies that projection if necessary during conversion
to a DbExpression. A different projection is applied if no Nodes higher in
the IQT consume the vars produced by the SetOp argument.
A Node that provides one of the arguments to the SetOp
Defines the expected order of the Output Vars of the SetOp
The VarMap for the SetOp argument represented by the node. This specifies the Output (SetOp-produced) Var to Input (Argument-produced) Var mappings for the Vars in the outputVars enumerable.
A DbExpression that is the converted form of the argument (with an appropriate column-reording projection applied if necessary)
Called by UnionAll, Intersect and Except (SetOp) visitor pattern methods
The visited SetOp
The Node that references the SetOp
Alias to use when publishing the SetOp's Vars
Callback to construct the SetOp DbExpression from the left and right arguments
The DbExpression equivalent of the SetOp
Convert SRO(e) => NewMultiset(Element(e'))
where e' is the CTree version of e
Add a Project over e, if it does not already have a ProjectOp
Convert SingleRowTableOp into NewMultisetOp(1) - a single element
collection. The element type of the collection doesn't really matter
SingleRowTableOp
current subtree
CQT expression
Translates the PhysicalProjectOp. Handles two cases. If the child is a ProjectOp,
then we simply piggyback on the ProjectOp method, but with our list of Vars.
Otherwise, we visit the child, and then create a DbProjectExpression above it.
The reason we special case the first scenario is because we do not want to add
an extra Project over a Project-over-Sort expression tree. This causes bad
problems later down the line
the PhysicalProjectOp
current subtree
the CQT expression corresponding to this subtree
The VarInfo class tracks how a single IQT Var should be referenced in terms of CQT Expressions.
The tracked Var must have been introduced by an IQT RelOp that was converted to a DbExpression that
is subsequently used in a DbExpressionBinding, otherwise the Var is either a ParameterVar or a locally
defined Var, which are tracked by the parameters collection of the Command and the VarDefScope
class, respectively.
An IQT Var that is tracked by a VarInfo instance is reachable in the following way:
1. By a DbVariableReferenceExpression that references the Variable of the DbExpressionBinding that contains the DbExpression that logically publishes the IQT Var.
This is tracked by the PublisherName property of the RelOpInfo class, which is used to track Vars brought into scope by a DbExpressionBinding.
Without an enclosing RelOpInfo, the VarInfo is unbound and cannot be used to instantiate a CQT expression tree that is the equivalent of a VarRef of the IQT Var)
2. By zero or more PropertyRefExpressions starting with a property of the DbVariableReferenceExpression created in step 1.
These PropertyRefExpressions are introduced on top of the DbVariableReferenceExpression because of Join or ApplyExpressions that
occur in the CQT between the expression that publishes the Var and the expression higher in the tree that contains a VarRefOp
to the IQT Var that must be resolved to a CQT DbExpression. In such cases the DbExpression that logically publishes
the IQT Var will have a record return Type.
The required property names are tracked, in order, in the PropertyPath property of this class.
The PrependProperty method is used to update the DbPropertyExpression path required to reach
the DbVariableReferenceExpression when the referenced Variable becomes part of such a record-typed output.
Constructs a new VarInfo instance that tracks the specified Var.
The IQT Var that this VarInfo instance should track.
Adds a property name to the beginning of the property path for this VarInfo instance.
Each time a new record structure is constructed on top of the expression that logically
publishes this var, another DbPropertyExpression is required around the DbVariableReferenceExpression used
to reach the Var in the CQT. Each new DbPropertyExpression must be added immediately around the
DbVariableReferenceExpression, with previous PropertyExpressions now referring to the new DbPropertyExpression.
Therefore the new property name added by this method is inserted at the start of the property path.
See the Visit methods for the Join/ApplyOps for examples of using this method to adjust the property path.
The new property name to insert at the start of the property path for the Var tracked by this VarInfo instance
Gets the Var tracked by this VarInfo instance
Gets the names, in order of use, that should be used to build DbPropertyExpression around an initial DbVariableReferenceExpression in order to build a DbExpression subtree that correctly references the tracked IQT Var
Groups a set of VarInfo instances together and allows certain operations (Bind/Unbind/PrependProperty)
to be performed on all instances in the VarInfoList with a single call.
Constructs a new, empty VarInfoList.
Constructs a new VarInfoList that contains the specified VarInfo instances.
Prepends the specified property name to the property path of all VarInfo instances in this list.
Attempts to retrieve the VarInfo instance that tracks the specified IQT Var, if it is contained by this VarInfoList.
The required IQT Var
Contains the VarInfo instance that tracks the specified Var if this method returns true
True if this list contains a VarInfo instance that tracks the specified Var; otherwise false
IqtVarScope is used to represent one or more IQT Vars that are currently in scope and can be mapped to a corresponding CQT DbExpression subtree.
Attempts to resolve the specified IQT Var by building or mapping to a CQT DbExpression subtree. Overridden in derived classes.
The IQT Var to resolve
If the methods returns true, the DbExpression to which the Var was resolved; otherwise null
True if the specified Var was successfully resolved; otherwise false
Implements the abstract IqtVarScope.TryResolveVar method. If the specified Var was published by this scope's DbExpression, it is mapped to a CQT DbExpression by calling CreateExpression on the VarInfo used to track it.
The Var to resolve
If the method returns true, the DbExpression to which the Var was resolved; otherwise null
True if the specified Var was successfully resolved; otherwise false
Information (current binding name, property path) about the Vars logically published by the Publisher expression
Represents a collection of IQT Vars that were brought into scope by a DbExpression used in a DbExpressionBinding. This class is also used to associate those Vars with that DbExpression, which is considered the logical 'publisher' of the Vars.
Creates a new DbExpressionBinding that binds the publisher DbExpression under the binding name
The new DbExpressionBinding
The unique name assigned to the CQT DbExpression that logically publishes the PublishedVars. Used primarily in ExpressionBindings that contain that DbExpression
The CQT DbExpression that logically publishes the PublishedVars
Represents a collection of IQT Vars that were brought into scope by a DbExpression used in a DbGroupExpressionBinding.
Returns the DbGroupExpressionBinding that backs this group-by scope
The new DbExpressionBinding
Represents a collection of IQT Vars that are in scope because they are defined locally (by VarDefOps) to an IQT Op that is being visited.
Implements the abstract IqtVarScope.TryResolveVar method. If the specified Var exists in this scope, it is resolved by mapping it to the DbExpression that was produced by converting the IQT child Node of the VarDefOp that defines it to a CQT DbExpression subtree.
The Var to resolve
If the method returns true, the DbExpression to which the Var was resolved; otherwise null
True if the specified Var was successfully resolved; otherwise false
Merge the discriminatorMap info we just found with what we've already found.
In practice, if either the current or the new map is from an OfTypeOnly view, we
have to avoid the optimizations.
If we have a new map that is a superset of the current map, then we can just swap
the new map for the current one.
If the current map is tha super set of the new one ther's nothing to do.
(Of course, if neither has changed, then we really don't need to look)
Transformation Rules for DistinctOp
If the DistinctOp includes all all the keys of the input, than it is unnecessary.
Distinct (X, distinct_keys) -> Project( X, distinct_keys) where distinct_keys includes all keys of X.
Rule processing context
current subtree
transformed subtree
transformation status
An EntitySetId propertyref represents the EntitySetId property for
an entity type or a ref type.
As with TypeId, this class is a singleton instance
Gets the singleton instance
A simple class that represents a pair of extents
Equals
Hashcode
Return the left component of the pair
Return the right component of the pair
Transformation rules for FilterOps
Split up a predicate into 2 parts - the pushdown and the non-pushdown predicate.
If the filter node has no external references *and* the "columns" parameter is null,
then the entire predicate can be pushed down
We then compute the set of valid column references - if the "columns" parameter
is non-null, this set is used. Otherwise, we get the definitions of the
input relop node of the filterOp, and use that.
We use this list of valid column references to identify which parts of the filter
predicate can be pushed down - only those parts of the predicate that do not
reference anything beyond these columns are considered for pushdown. The rest are
stuffed into the nonPushdownPredicate output parameter
Command object
the FilterOp subtree
(Optional) List of columns to consider for "pushdown"
(output) Part of the predicate that cannot be pushed down
part of the predicate that can be pushed down
Convert Filter(Filter(X, p1), p2) => Filter(X, (p1 and p2))
rule processing context
FilterOp node
modified subtree
transformed subtree
Convert Filter(Project(X, ...), p) => Project(Filter(X, p'), ...)
Rule processing context
FilterOp subtree
modified subtree
transformed subtree
Transform Filter(UnionAll(X1, X2), p) => UnionAll(Filter(X1, p1), Filter(X, p2))
Filter(Intersect(X1, X2), p) => Intersect(Filter(X1, p1), Filter(X2, p2))
Filter(Except(X1, X2), p) => Except(Filter(X1, p1), X2)
where p1 and p2 are the "mapped" versions of the predicate "p" for each branch
Rule processing context
FilterOp subtree
modified subtree
true, if successful transformation
Transforms Filter(Distinct(x), p) => Filter(Distinct(Filter(X, p1), p2)
where p2 is the part of the filter that can be pushed down, while p1 represents
any external references
Rule processing context
FilterOp subtree
modified subtree
Transformation status
Transforms Filter(GroupBy(X, k1.., a1...), p) =>
Filter(GroupBy(Filter(X, p1'), k1..., a1...), p2)
p1 and p2 represent the parts of p that can and cannot be pushed down
respectively - specifically, p1 must only reference the key columns from
the GroupByOp.
"p1'" is the mapped version of "p1",
Rule processing context
Current FilterOp subtree
modified subtree
Transformation status
Transform Filter()
Rule Processing context
Current FilterOp subtree
Modified subtree
Transformation status
Convert Filter(OuterApply(X,Y), p) into
Filter(CrossApply(X,Y), p)
if "p" is not null-preserving for Y (ie) "p" does not preserve null values from Y
Rule processing context
Filter node
modified subtree
transformation status
Convert
Filter(X, true) => X
Filter(X, false) => Project(Filter(SingleRowTableOp, ...), false)
where ... represent variables that are equivalent to the table columns
Rule processing context
Current subtree
modified subtree
transformation status
Information about a foreign-key constraint
Get the corresponding parent (key) property, for a specific child (foreign key) property
child (foreign key) property name
corresponding parent property name
true, if the parent property was found
Build up an equivalence map of primary keys and foreign keys (ie) for each
foreign key column, identify the corresponding primary key property
Parent key properties
Child key properties
Get the parent-child pair
Return the child rowcount
A visitor that collects all group aggregates and the corresponding function aggregates
that are defined over them, referred to as 'candidate aggregates'. The candidate aggregates are aggregates
that have an argument that has the corresponding group aggregate as the only external reference
Produces a list of all GroupAggregateVarInfos, each of which represents a single group aggregate
and it candidate function aggregates. It also produces a delegate that given a child node returns the parent node
Private constructor
Determines whether the var or a property of the var (if the var is defined as a NewRecord)
is defined exclusively over a single group aggregate. If so, it registers it as such with the
group aggregate var info manager.
Registers the group aggregate var with the group aggregate var info manager
If the unnestOp's var is defined as a reference of a group aggregate var,
then the columns it produces should be registered too, but as 'unnested' references
the unnestOp
current subtree
If the op is a collection aggregate function it checks whether its arguement can be translated over
a single group aggregate var. If so, it is tracked as a candidate to be pushed into that
group by into node.
Default visitor for nodes.
It tracks the child-parent relationship.
Utility class that tries to produce an equivalent tree to the input tree over
a single group aggregate variable and no other external references
Private constructor
Try to produce an equivalent tree to the input subtree, over a single group aggregate variable.
Such translation can only be produced if all external references of the input subtree are to a
single group aggregate var, or to vars that are can be translated over that single group
aggregate var
The input subtree
The groupAggregateVarInfo over which the input subtree can be translated
A tree that is equvalent to the input tree, but over the group aggregate variable represented by the groupAggregetVarInfo
True, if the translation can be done, false otherwise
See
If the child is VarRef check if the subtree PropertyOp(VarRef) is reference to a
group aggregate var.
Otherwise do default processing
If the Subtree rooted at the collect is of the following structure:
PhysicalProject(outputVar)
|
Project(s)
|
Unnest
where the unnest is over the group aggregate var and the output var
is either a reference to the group aggregate var or to a constant, it returns the
translation of the ouput var.
Determines whether the given Node is a constant subtree
It only recognizes any of the constant base ops
and possibly casts over these nodes.
(1) If the given var or the given property of the given var are defined over a group aggregate var,
(2) and if that group aggregate var matches the var represented by represented by _targetGroupAggregateVarInfo
if any
it returns the corresponding translation over the group aggregate var. Also, if _targetGroupAggregateVarInfo
is not set, it sets it to the group aggregate var representing the referenced var.
Default processing for nodes.
Visits the children and if any child has changed it creates a new node
for the parent.
If the reference of the child node did not change, the child node did not change either,
this is because a node can only be reused "as is" when building a template.
Helper class to track the aggregate nodes that are candidates to be
pushed into the definingGroupByNode.
Public constructor
The GroupIntoOp node
Each key value pair represents a candidate aggregate.
The key is the function aggregate subtree and the value is a 'template' of translation of the
function aggregate's argument over the var representing the group aggregate.
A valid candidate has an argument that does not have any external references
except for the group aggregate corresponding to the DefiningGroupNode.
Are there are agregates that are candidates to be pushed into the DefiningGroupNode
The GroupIntoOp node that this GroupAggregateVarInfo represents
Manages refereces to groupAggregate variables.
Add an entry that var is a computation represented by the computationTemplate
over the var represented by the given groupAggregateVarInfo
Add an entry that the given property of the given var is a computation represented
by the computationTemplate over the var represented by the given groupAggregateVarInfo
Gets the groupAggregateVarRefInfo representing the definition of the given var over
a group aggregate var if any.
Gets the groupAggregateVarRefInfo representing the definition of the given property of the given
var over a group aggregate var if any.
Get all the groupAggregateVarInfos
Helper class to track usage of GroupAggregateVarInfo
It represents the usage of a single GroupAggregateVar.
The usage is defined by the computation, it should be a subree whose only
external reference is the group var represented by the GroupAggregateVarInfo.
Public constructor
Subtree whose only external reference is
the group var represented by the GroupAggregateVarInfo
The GroupAggregateVarInfo (possibly) referenced by the computation
Is the computation over unnested group aggregate var
Transformation Rules for GroupByOps
If the GroupByOp defines some computedVars as part of its keys, but those computedVars are simply
redefinitions of other Vars, then eliminate the computedVars.
GroupBy(X, VarDefList(VarDef(cv1, VarRef(v1)), ...), VarDefList(...))
can be transformed into
GroupBy(X, VarDefList(...))
where cv1 has now been replaced by v1
Rule processing context
current subtree
transformed subtree
transformation status
Converts a GroupBy(Project(X, c1,..ck), agg1, agg2, .. aggm) =>
GroupBy(X, agg1', agg2', .. aggm')
where agg1', agg2', .. aggm' are the "mapped" versions
of agg1, agg2, .. aggm, such that the references to c1, ... ck are
replaced by their definitions.
We only do this if each c1, ..ck is refereneced (in aggregates) at most once or it is a constant.
Rule processing context
Current ProjectOp node
modified subtree
Transformation status
If the GroupByOp has no aggregates:
(1) and if it includes all all the keys of the input, than it is unnecessary
GroupBy (X, keys) -> Project(X, keys) where keys includes all keys of X.
(2) else it can be turned into a Distinct:
GroupBy (X, keys) -> Distinct(X, keys)
Rule processing context
current subtree
transformed subtree
transformation status
Replaces each occurance of the given vars with their definitions.
"Public" entry point. In the subtree rooted at the given root,
replace each occurance of the given vars with their definitions,
where each key-value pair in the dictionary is a var-definition pair.
Recomputes node info post regular processing.
Used to determine whether any of the given vars occurs more than once
in a given subtree.
Public entry point. Returns true if at least one of the given vars occurs more than
once in the subree rooted at the given root.
Maintained for lambda and model-defined function applications (DbLambdaExpression and DbFunctionExpression).
Initialize the DbExpressionKind --> OpType mappings for DbComparisonExpression and DbArithmeticExpression
Generate an IQT given a query command tree and discriminator metadata (available for certain query mapping views)
Is the current expression a predicate?
expr to check
true, if the expression is a predicate
Convert this expression into a "scalar value" ITree expression. There are two main
Convert an Itree node into a scalar op tree
the subtree
the original CQT expression
the converted subtree
Convert a rel op Itree node into a scalar op tree
Scalarize the predicate (x = y) by converting it into a "case when x = y then 'true' else 'false' end" expression.
Convert an expression into an iqt predicate
the expression to process
Process a list of expressions, and apply the delegate to each of the expressions
list of cqt expressions to process
the callback to apply
a list of IQT expressions
Process a set of cqt expressions - and convert them into scalar iqt expressions
list of cqt expressions
list of iqt expressions
Ensures that an input op is a RelOp. If the specified Node's Op is not a RelOp then it is wrapped in an Unnest to create a synthetic RelOp. This is only possible if the input Op produces a collection.
The input Node/Op pair
A Node with an Op that is guaranteed to be a RelOp (this may be the original Node or a new Node created to perform the Unnest)
Cap a RelOp with a ProjectOp. The output var of the Project is the
output var from the input
the input relop tree
the relop tree with a projectNode at the root
Cap a relop tree with a PhysicalProjectOp. The Vars of the PhysicalProjectOp
are the vars from the RelOp tree
the input relop tree
relop tree capped by a PhysicalProjectOp
Creates a new variable scope that is based on a CQT DbExpressionBinding and pushes it onto the variable scope stack. The scope defines a single variable based on the DbExpressionBinding's VarName and DbExpression.
The DbExpressionBinding that defines the scope
The Node produced by converting the binding's DbExpression
Creates a new variable scope that is based on a CQT DbGroupExpressionBinding and pushes it onto the variable scope stack. The scope defines a single variable based on the DbExpressionBinding's VarName and DbExpression.
This method does not bring the GroupVarName into scope. Note that ExitExpressionBinding and NOT ExitGroupExpressionBinding should be used to remove this scope from the stack.
The DbGroupExpressionBinding that defines the scope
The Node produced by converting the binding's DbExpression
Common implementation method called by both EnterExpressionBinding and EnterGroupExpressionBinding
The DbExpression that defines the binding
The name of the binding variable
Common implementation method called by both VisitBoundExpressionPushBindingScope and VisitJoin
The DbExpression that defines the binding
Var representing the RelOp produced for the
Common implementation method called by both VisitBoundExpressionPushBindingScope and VisitJoin
The Var produced by the RelOp from DbExpression that defines the binding
The name of the binding variable
Removes a variable scope created based on a DbExpressionBinding from the top of the variable scope stack, verifying that it is in fact an ExpressionBindingScope.
The removed ExpressionBindingScope
Removes a variable scope created based on a DbGroupExpressionBinding from the top of the variable scope stack, verifying that it is in fact an ExpressionBindingScope.
Should only be called after visiting the Aggregates of a DbGroupByExpression in Visit(DbGroupByExpression).
The sequence (in Visit(GroupExpression e) is:
1. EnterGroupExpressionBinding
2. Visit e.Keys
3. ExitExpressionBinding
4. (Push new scope with GroupVarName instead of VarName)
5. Visit e.Aggregates
6. ExitGroupExpressionBinding
Creates a new variable scope that is based on a CQT DbLambda and pushes it onto the variable scope stack.
The DbLambda that defines the scope
A list of Nodes and IsPredicate bits produced by converting the CQT Expressions that provide the arguments to the Lambda function
an edm function for which the current lambda represents the generated body, otherwise null
Removes a variable scope created based on a Lambda function from the top of the variable scope stack, verifying that it is in fact a LambdaScope.
an edm function for which the current lambda represents the generated body, otherwise null
Constructs a NewRecordOp on top of a multi-Var-producing Op, resulting in a RelOp that produces a single Var.
The Node that references the multi-Var-producing Op. This Node will become the first child node of the new ProjectOp's Node
Type metadata that describes the output record type
A list of Vars that provide the output columns of the projection
A new ProjectOp that projects a new record of the specified type from the specified Vars over the original input Op/Node
This method builds a "soft"Cast operator over the input node (if necessary) to (soft)
cast it to the desired type (targetType)
If the input is a scalarOp, then we simply add on the SoftCastOp
directly (if it is needed, of course). If the input is a RelOp, we create a
new ProjectOp above the input, add a SoftCast above the Var of the
input, and then return the new ProjectOp
The "need to cast" is determined by the Command.EqualTypes function. All type
equivalence in the plan compiler is determined by this function
the expression to soft-cast
the desired type to cast to
A variant of the function above. Works with an EdmType instead
of a TypeUsage, but leverages all the work above
the node to "cast"
the desired type
the transformed expression
We simplify the property instance where the user is accessing a key member of
a reference navigation. The instance becomes simply the reference key in such
cases.
For instance, product.Category.CategoryID becomes Ref(product.Category).CategoryID,
which gives us a chance of optimizing the query (using foreign keys rather than joins)
The original property expression that specifies the member and instance
'Simplified' instance. If the member is a key and the instance is a navigation the rewritten expression's instance is a reference navigation rather than the full entity.
true if the property expression was rewritten, in which case will be non-null, otherwise false , in which case
will be null.
Encapsulates the logic required to convert a SetOp (Except, Intersect, UnionAll) expression
into an IQT Node/Op pair.
The DbExceptExpression, DbIntersectExpression or DbUnionAllExpression to convert, as an instance of DbBinaryExpression
A new IQT Node that references the ExceptOp, IntersectOp or UnionAllOp created based on the expression
Build the equivalent of an OfTypeExpression over the input (ie) produce the set of values from the
input that are of the desired type (exactly of the desired type, if the "includeSubtypes" parameter is false).
Further more, "update" the result element type to be the desired type.
We accomplish this by first building a FilterOp with an IsOf (or an IsOfOnly) predicate for the desired
type. We then build out a ProjectOp over the FilterOp, where we introduce a "Fake" TreatOp over the input
element to cast it to the right type. The "Fake" TreatOp is only there for "compile-time" typing reasons,
and will be ignored in the rest of the plan compiler
Translation for GroupAggregate
Create the translation as :
Collect
|
PhysicalProject
|
GroupNodeDefinition
Here, GroupNodeDefinition is:
1. If there are no keys: copyOfInput;
2. If there are keys:
Filter (keyDef1 = copyOfKeyDef1 or keyDef1 is null and copyOfKeyDef1 is null) and ... and (keyDefn = copyOfKeyDefn or keyDefn is null and copyOfKeyDefn is null)
|
Project (copyOfInput, copyOfKeyDef1, copyOfKeyDef1, ... copyOfKeyDefn)
|
copyOfInput
If the return type of the input node is a RowType it flattens its individual non-row properties.
The produced nodes are added to the given flattenedProperties list
Common processing for the identical input and sort order arguments to the unrelated
DbSkipExpression and DbSortExpression types.
The input DbExpressionBinding from the DbSkipExpression or DbSortExpression
The list of SortClauses from the DbSkipExpression or DbSortExpression
A list to contain the converted SortKeys produced from the SortClauses
The Var produced by the input to the DbSkipExpression or DbSortExpression
The converted form of the input to the DbSkipExpression or DbSortExpression, capped by a ProjectOp that defines and Vars referenced by the SortKeys.
Abstract base class for both DbExpressionBinding and LambdaFunction scopes
Returns true if it is a lambda variable representing a predicate expression.
Represents a variable scope introduced by a CQT DbExpressionBinding, and therefore contains a single variable.
Represents a variable scope introduced by a LambdaFunction.
varName : [node, IsPredicate]
Callback to process an expression
The expression to convert
Represents one or more type filters that should be AND'd together to produce an aggregate IsOf filter expression
The type that elements of the filtered input set must be to satisfy this IsOf filter
Indicates whether elements of the filtered input set may be of a subtype (IsOf) of the required type
and still satisfy the IsOfFilter, or must be exactly of the required type (IsOfOnly) to do so.
The next IsOfFilter in the AND chain.
Represents an "edge" in the join graph.
A JoinEdge is a directed equijoin between the left and the right table. The equijoin
columns are represented by the LeftVars and the RightVars properties
Internal constructor
the left table
the right table
the owner join node
the Join Kind
list of equijoin columns of the left table
equijoin columns of the right table
Factory method
left table
right table
the owner join node
equijoin column of the left table
equijoin column of the right table
the new join edge
Creates a transitively generated join edge
the left table
the right table
the join kind
left equijoin vars
right equijoin vars
the join edge
Add a new "equi-join" condition to this edge
join node producing this condition
the left-side column
the right-side column
true, if this condition can be added
The left table
The right table of the join
The underlying join node, may be null
The join kind
Equijoin columns of the left table
Equijoin columns of the right table
Is this join edge useless?
Gets a flag that indicates whether elimination is restricted for this join edge.
Returns true if this is not a transitive join edge and one or both participating
tables are not visible at the join node, otherwise false.
The JoinElimination module is intended to do just that - eliminate unnecessary joins.
This module deals with the following kinds of joins
* Self-joins: The join can be eliminated, and either of the table instances can be
used instead
* Implied self-joins: Same as above
* PK-FK joins: (More generally, UniqueKey-FK joins): Eliminate the join, and use just the FK table, if no
column of the PK table is used (other than the join condition)
* PK-PK joins: Eliminate the right side table, if we have a left-outer join
Invokes the visitor
Do we need to build a join graph for this node - returns false, if we've already
processed this
Do the real processing of the join graph.
current join node
modified join node
Default handler for a node. Simply visits the children, then handles any var
remapping, and then recomputes the node info
Invokes default handling for a node and adds the child-parent tracking info to the VarRefManager.
Build a join graph for this node for this node if necessary, and process it
current join op
current join node
Represents a join graph. The uber-class for join elimination
The basic constructor. Builds up the annotated node tree, and the set of
join edges
Current IQT command
current constraint manager
the var ref manager for the tree
current join node
Perform all kinds of join elimination. The output is the transformed join tree.
The varMap output is a dictionary that maintains var renames - this will be used
by the consumer of this module to fix up references to columns of tables
that have been eliminated
The processedNodes dictionary is simply a set of all nodes that have been processed
in this module - and need no further "join graph" processing
remapped vars
list of nodes that need no further processing
Get the subset of vars that are Columns
a varVec
a subsetted VarVec that only contains the columnVars from the input vec
Generate a list of column Vars from the input vec
the list of vars to fill in
the var set
Split up the join predicate into equijoin columns and other predicates.
For example, if I have a predicate of the form T1.C1 = T2.D1 and T1.C2 > T2.D2
we would generate
LeftVars = T1.C1
RightVars = T2.C1
OtherPredicate = T1.C2 > T2.D2
Special Cases:
For fullouter joins, we don't do any splitting - the "OtherPredicate" captures the
entire join condition.
the current join node
equijoin columns of the left side
equijoin columns of the right side
any other predicates
Build up the annotated node tree for the input subtree.
If the current node is
a ScanTableOp - we build an AugmentedTableNode
a join (Inner, LOJ, FOJ, CrossJoin) - we build an AugmentedJoinNode,
after first building annotated node trees for the inputs.
anything else - we build an AugmentedNode
We also mark the node as "processed" - so that the caller will not need
to build join graphs for this again
input node tree
the annotated node tree
Add a new join edge if possible.
- Check to see whether the input columns are columns of a table that we're tracking.
- Make sure that both the tables are "visible" to the current join node
- If there is already a link between the two tables, make sure that the link's
join kind is compatible with what we have
current join Node
left-side column
right-side column
Check to see if all columns in the input varList are from the same table
Degenerate case: if the list is empty, we still return true
list of columns
true, if every column is from the same table
Build a set of JoinEdges for this join.
For cross joins, we simply invoke this function recursively on the children, and return
For other joins,
- We first compute the "visibility" for the left and right branches
- For full outer joins, the "visibility" is the current join node's id. (ie)
the tables below are not to be considered as candidates for JoinEdges anywhere
above this FOJ node
- For left outer joins, the "visibility" of the left child is the input "maxVisibility"
parameter. For the right child, the "visibility" is the current join node's id
- For inner joins, the visibility for both children is the "maxVisibility" parameter
- We then check to see if the join condition is "ok". If the current join node
is a full-outer join, OR if the joinNode has an OtherPredicate (ie) stuff
other than equijoin column conditions, then we don't build any joinedges.
- Otherwise, we build join edges for each equijoin column
current join node
the highest node where any of the tables below is visible
Builds up the list of join edges. If the current node is
a ScanTable - we simply set the "LastVisibleId" property to the maxVisibility
parameter
a join - we invoke the BuildJoinEdges() function on the join node
anything else - do nothing
highest node that this node is visible at
If edge1 represents (T1, T2), and edge2 represents (T2, T3), try and
create a (T1,T3) edge.
The transitive edge is created if all of the following conditions hold:
1. edge1 and edge2 are of the same join kind
2. If edge1 and edge2 are Left Outer Joins, then
a. both edges represent joins on the same columns, and
b. at least one of the edges represents a self join
3. For inner joins:
The intersection of the columns on which are the joins represented
by edge1 and edge2 is non-empty, the transitive edge is created to represent
a join on that intersection.
If an edge already exists between these tables, then don't add a new edge
Given a list of key vars a list of corresponding value vars, creates a list
of key-value pairs that is ordered based on the keys
Try to turn left outer joins into inner joins
Turn an augmented join node that represents a Left Outer Join into an Inner join
if all its edges are candidates to be turned into an Inner Join
An edge representing A LOJ B is a candidate to be turned into an inner join (A INNER JOIN B)
if the following conditions hold:
1. a) There is a foreign key constraint (parent-child relationship) between B and A,
the join is on the constraint, and the joined columns in B are non-nullable, or
b) There is a foreign key constraint between A and B, the join is on the constraint,
and the child multiplicity is One. However, this scenario cannot be specified in the ssdl,
thus this case has not be implemented, and
2. All the rows from the right table B are preserved (i.e. not filtered out) at the level of the join.
This means that if B is participating in any joins prior to being joined with A, these have to be
left outer joins and B has to be a driver (on the left spine).
Are all the rows from the given table that is part of the subtree rooted
at the given root preserved on the root.
This is true if:
- The root represents the table
- The table is a on the left spine of a left outer join tree
Does the set of given joinEdges contain a join edge to a given table
Determines whether each of the given joinEdges can be turned into an inner join
NOTE: Due to how we create join edges, currenlty there can only be one join edge in this group
See for details.
A LOJ B edge can be turned into an inner join if:
1. There is a foreign key constraint based on which such transformation is possible
2. All the rows from the right table B are preserved (i.e. not filtered out) at the level of the join.
This means that if B is participating in any joins prior to being joined with A, these have to be
left outer joins and B has to be a driver (on the left spine).
A necessary condition for an A LOJ B edge to be turned into an inner join is
the existence of one of the following constraints:
a) There is a foreign key constraint (parent-child relationship) between B and A,
the join is on the constraint, and the joined columns in B are non-nullable, or
b) There is a foreign key constraint between A and B, the join is on the constraint,
and the child multiplicity is One. However, this scenario cannot be specified in the ssdl,
thus this case has not be implemented
Generate a set of transitive edges
Checks whether a given table can be eliminated to be replaced by the given replacingTable
with regards to possible participation in the driving (left) subtree of Left Outer Joins.
In order for elimination to happen, one of the two tables has to logically move,
either the replacement table to the original table's location, or the table to the
replacing table's location.
For the table that would have to move, it checks whether such move would be valid
with regards to its participation as driver in Left Outer Joins ()
Can the right table of the given tableJoinEdge be eliminated and replaced by the right table of the replacingTableJoinEdge
based on both tables participation in other joins.
It can be if:
- The table coming from tableJoinEdge does not participate in any other join on the way up to the least common ancestor
- The table coming from replacingTableJoinEdge does not get filtered on the way up to the least common ancestor
Can the right table of the joinEdge be filtered by joins on the the way up the the given leastCommonAncestor.
It can, if
- dissallowAnyJoin is specified, or
- if it is on the right side of a left outer join or participates in any inner join, thus it is only
allowed to be on the left side of a left outer join
Determines whether the given table can be moved to the replacing table's location
with regards to participation in the driving (left) subtree of Left Outer Joins.
If the table to be moved is part of the driving (left) subtree of a Left Outer Join
and the replacing table is not part of that subtree then the table cannot be moved,
otherwise it can.
Gets the least common ancestor for two given nodes in the tree
This function marks a table as eliminated. The replacement varmap
is updated with columns of the table being mapped to the corresponding columns
of the replacement table
table being replaced
the table being used in its place
list of vars to replace
list of vars to replace with
Var or one of its subtypes
Record that replacingVar is replacing replacedVar.
Also, replacedVar was previously replacing any other vars,
add these to the list of replaced vars for the replacingVar too.
The info about the replacedVar no longer needs to be maintained.
This function marks a table (part of a selfjoin) as eliminated. The replacement varmap
is updated with columns of the table being mapped to the corresponding columns
of the replacement table
table being replaced
the table being used in its place
This function is a helper function for star selfjoin elimination. All the
"right" tables of the join edges in the input list are instances of the same table.
Precondition: Each joinedge is of the form (X, Ai),
where X is the star-joined table, and A1...An are all instances of the same
table A
This function first creates groups of join edges such that all tables
in a group:
1. are joined to the center (X) on the same columns
2. are of the same join kind
3. are joined on all key columns of table A
4. if the join type is Left Outer Join, they are not joined on any other columns
For each group, we then identify the table with the
smallest "Id", and choose that to replace all the other tables from that group
list of join edges
Two edges match for star self join elimination if:
1. are joined to the center (X) on the same columns
2. are of the same join kind
A join edge qualifies for starting a group for star self join elimination if:
1. the join is on all key columns of the right table,
2. if the join type is Left Outer Join, the join is on no columns
other than the keys of the right table.
NOTE: The second limitation is really arbitrary, to should be possible
to also allow other conditions
Eliminates any star self joins. This function looks at all the tables that
this table is joined to, groups the tables based on the table name (metadata),
and then tries selfjoin elimination on each group (see function above)
the star-joined table?
Eliminate a self-join edge.
the join edge
tur, if we did eliminate the self-join
Eliminate self-joins for this table (if any)
current table
Eliminate all selfjoins
Eliminate the left table
Eliminate the right table
Do we reference any nonkey columns from this table
the table instance
true, if there are any nonkey references
Are any of the key columns from the right table of the given join edge referenced
elsewhere (outside the join condition)
Eliminate a parent-child join, given a fk constraint
the current join edge
the referential integrity constraint
Given a ForeignKeyConstraint and lists of vars on which the tables are joined,
it checks whether the join condition includes (but is not necessarily joined only on)
the foreign key constraint.
Try to eliminate the parent table from a
child Left Outer Join parent
join, given a fk constraint
More specific:
P(p1, p2, p3,…) is the parent table, and C(c1, c2, c3, …) is the child table.
Say p1,p2 is the PK of P, and c1,c2 is the FK from C to P
SELECT …
From C LOJ P ON (p1 = c1 and p2 = c2)
WHERE …
If only the keys are used from P, we should but should be carefull about composite keys with nullable foreign key columns.
If a composite foreign key has been defined on columns that allow nulls,
and at least one of the columns, upon the insert or update of a row, is set to null, then the foreign key constraint will be satisfied
on SqlServer.
Thus we should do the elimination only if
1. The key is not composite
2. All columns on the child side are non nullable
the current join edge
the referential integrity constraint
Helper method to try to eliminate the right table given a join edge.
The right table should be eliminated if:
1. It does not have non key references, and
2. Either its columns are not referenced anywhere outside the join condition or,
if allowRefsForJoinedOnFkOnly is true, the join condition is only on the fk constraint
(which we deduct by only checking the count, since we already checked that the conditions do
include the fk constraint.
3. It can be eliminated based on possible participation in a left outer join
Eliminate the join if possible, for this edge
the current join edge
Eliminate parent child nodes that this node participates in
the "left" table in a join
Eliminate all parent-child joins in the join graph
Return the result of join elimination
the transformed node tree
Build a filter node (if necessary) to prune out null values for the specified
columns
Adds a filter node (if necessary) on top of the input node.
Returns the input node, if the filter predicate is null - otherwise, adds a
a new filter node above the input
the input node
the filter predicate
Rebuilds the predicate for a join node and caculates the minimum location id at which it can be specified.
The predicate is an AND of the equijoin conditions and the "otherPredicate".
We first remap all columns in the equijoin predicates - if a column pair
resolves to the same column, then we skip that pair.
The minimum location id at which a predicate can be specified is the minimum location id that is
still at or above the minimum location id of all participating vars. By default, it is the location id
of the input join node. However, because a table producing a participating var may be moved or
replaced by another table, the rebuilt predicate may need to be specified at higher location id.
the current join node
the minimum location id (AugumentedNode.Id) at which this predicate can be specified
the rebuilt predicate
Rebuilds a crossjoin node tree. We visit each child of the cross join, and get
back a list of nodes. If the list of nodes has
0 children - we return null
1 child - we return the single child
otherwise - we build a new crossjoin op with all the children
the crossjoin node
new node tree
Rebuilds the node tree for a join.
For crossjoins, we delegate to the function above. For other cases, we first
invoke this function recursively on the left and the right inputs.
the annotated join node tree
A dictionary of output predicates that should be included in ancestor joins along with the minimum location id at which they can be specified
rebuilt tree
Rebuild the node tree for a TableNode.
- Keep following the ReplacementTable links until we get to a node that
is either null, or has a "false" value for the IsEliminated property
- If the result is null, then simply return null
- If the tableNode we ended up with has already been "placed" in the resulting
node tree, then return null again
- If the tableNode has a set of non-nullable columns, then build a filterNode
above the ScanTable node (pruning out null values); otherwise, simply return
the ScanTable node
the "augmented" tableNode
rebuilt node tree for this node
Rebuilds the node tree from the annotated node tree. This function is
simply a dispatcher
ScanTable - call RebuildNodeTree for ScanTable
Join - call RebuildNodeTree for joinOp
Anything else - return the underlying node
annotated node tree
the output predicate that should be included in the parent join
the rebuilt node tree
Helper method for RebuildNodeTree.
Given predicate nodes and the minimum location ids at which they can be specified, it creates:
1. A single predicate AND-ing all input predicates with a minimum location id that is less or equal to the given targetNodeId.
2. A dictionary of all other input predicates and their target minimum location ids.
The location id of the resulting predicate
A predicate
The location id for the localPredicateNode
A dictionary of predicates and the minimum location id at which they can be specified
A dictionary of predicates and the minimum location id at which they can be specified
An output dictionary of predicates and the minimum location id at which they can be specified that includes all input predicates with minimum location id greater then targetNodeId
A single predicate "AND"-ing all input predicates with a minimum location id that is less or equal to the tiven targetNodeId.
Helper method for
If the predicateMinimuLocationId is less or equal to the target location id of the current result, it is AND-ed with the
current result, otherwise it is included in the list of predicates that need to be propagated up (outPredicates)
Combines two predicates into one by AND-ing them.
Get the location id of the AugumentedTableNode at which the given var is defined.
If the var is not in th m_varToDefiningNodeMap, then it return the input defaultLocationId
Gets the location id of least common ancestor for two nodes in the tree given their location ids
Helper method for
Given a root node pick its immediate child to which the node identifed with the given nodeId bellongs.
The immediate child of the given root that is root of the subree that contains the node with the given nodeId.
The only join kinds we care about
Transformation rules for JoinOps
CrossJoin(Project(A), B) => Project(CrossJoin(A, B), modifiedvars)
InnerJoin(Project(A), B, p) => Project(InnerJoin(A, B, p'), modifiedvars)
LeftOuterJoin(Project(A), B, p) => Project(LeftOuterJoin(A, B, p'), modifiedvars)
Rule processing context
Current JoinOp tree to process
Transformed subtree
transformation status
CrossJoin(Filter(A,p), B) => Filter(CrossJoin(A, B), p)
CrossJoin(A, Filter(B,p)) => Filter(CrossJoin(A, B), p)
InnerJoin(Filter(A,p), B, c) => Filter(InnerJoin(A, B, c), p)
InnerJoin(A, Filter(B,p), c) => Filter(InnerJoin(A, B, c), p)
LeftOuterJoin(Filter(A,p), B, c) => Filter(LeftOuterJoin(A, B, c), p)
Note that the predicate on the right table in a left-outer-join cannot be pulled
up above the join.
Rule processing context
Current JoinOp tree to process
transformed subtree
transformation status
Convert a CrossJoin(SingleRowTable, X) or CrossJoin(X, SingleRowTable) or LeftOuterJoin(X, SingleRowTable)
into just "X"
rule processing context
the join node
transformed subtree
transformation status
The KeyPullup class subclasses the default visitor and pulls up keys
for the different node classes below.
The only Op that really deserves special treatment is the ProjectOp.
Pull up keys (if possible) for the given node
node to pull up keys for
Keys for the node
Default visitor for children. Simply visit all children, and
try to get keys for those nodes (relops, physicalOps) that
don't have keys as yet.
Current node
Default visitor for RelOps. Simply visits the children, and
then tries to recompute the NodeInfo (with the fond hope that
some keys have now shown up)
Visitor for a ScanTableOp. Simply ensures that the keys get
added to the list of referenced columns
current ScanTableOp
current subtree
Pulls up keys for a ProjectOp. First visits its children to pull
up its keys; then identifies any keys from the input that it may have
projected out - and adds them to the output list of vars
Current ProjectOp
Current subtree
Comments from Murali:
There are several cases to consider here.
Case 0:
Let’s assume that K1 is the set of keys ({k1, k2, ..., kn}) for the
first input, and K2 ({l1, l2, …}) is the set of keys for the second
input.
The best case is when both K1 and K2 have the same cardinality (hopefully
greater than 0), and the keys are in the same locations (ie) the corresponding
positions in the select-list. Even in this case, its not enough to take
the keys, and treat them as the keys of the union-all. What we’ll need to
do is to add a “branch” discriminator constant for each branch of the
union-all, and use this as the prefix for the keys.
For example, if I had:
Select c1, c2, c3... from ...
Union all
Select d1, d2, d3... from ...
And for the sake of argument, lets say that {c2} and {d2} are the keys of
each of the branches. What you’ll need to do is to translate this into
Select 0 as bd, c1, c2, c3... from ...
Union all
Select 1 as bd, d1, d2, d3... from ...
And then treat {bd, c2/d2} as the key of the union-all
Case 1: (actually, a subcase of Case 0):
Now, if the keys don’t align, then we can simply take the union of the
corresponding positions, and make them all the keys (we would still need
the branch discriminator)
Case 2:
Finally, if you need to “pull” up keys from either of the branches, it is
possible that the branches get out of whack. We will then need to push up
the keys (with nulls if the other branch doesn’t have the corresponding key)
into the union-all. (We still need the branch discriminator).
Now, unfortunately, whenever we've got polymorphic entity types, we'll end up
in case 2 way more often than we really want to, because when we're pulling up
keys, we don't want to reason about a caseop (which is how polymorphic types
wrap their key value).
To simplify all of this, we:
(1) Pulling up the keys for both branches of the UnionAll, and computing which
keys are in the outputs and which are missing from the outputs.
(2) Accumulate all the missing keys.
(3) Slap a projectOp around each branch, adding a branch discriminator
var and all the missing keys. When keys are missing from a different
branch, we'll construct null ops for them on the other branches. If
a branch already has a branch descriminator, we'll re-use it instead
of constructing a new one. (Of course, if there aren't any keys to
add and it's already including the branch discriminator we won't
need the projectOp)
the UnionAllOp
current subtree
A nested propertyref describes a nested property access - think "a.b.c"
Basic constructor.
Represents the access of property "propertyRef" within property "property"
the inner property
the outer property
Overrides the default equality function. Two NestedPropertyRefs are
equal if the have the same property name, and the types are the same
Overrides the default hashcode function. Simply adds the hashcodes
of the "property" and "propertyRef" fields
the nested property
the parent property
This class "pulls" up nest operations to the root of the tree
The goal of this module is to eliminate nest operations from the query - more
specifically, the nest operations are pulled up to the root of the query instead.
map from a collection var to the node where it's defined; the node should be
the node that should be used as the replacement for the var if it is referred
to in an UnnestOp (through a VarRef) Note that we expect this to contain the
PhysicalProjectOp of the node, so we can use the VarList when mapping vars to
the copy; (We'll remove the PhysicalProjectOp when we copy it...)
map from var to the var we're supposed to replace it with
Map from VarRef vars to what they're referencing; used to enable the defining
node map to contain only the definitions, not all the references to it.
Whether a sort was encountered under an UnnestOp.
If so, sort removal needs to be performed.
The driver routine. Does all the hard work of processing
is the node a NestOp node?
Not Supported common processing
For all those cases where we don't intend to support
a nest operation as a child, we have this routine to
do the work.
Follow the VarRef chain to the defining var
Update the replacement Var map with the vars from the pulled-up
operation; the shape is supposed to be identical, so we should not
have more vars on either side, and the order is guaranteed to be
the same.
Replace a list of sortkeys *IN-PLACE* with the corresponding "mapped" Vars
sortkeys
the mapping info for Vars
Produce a "mapped" sequence of the input Var sequence - based on the supplied
map
input var sequence
var->var map
the mapped var sequence
Produce a "mapped" varList
Produce a "mapped" varVec
VarDefOp
Essentially, maintains m_varRefMap, adding an entry for each VarDef that has a
VarRef on it.
VarRefOp
When we remove the UnnestOp, we are left with references to it's column vars that
need to be fixed up; we do this by creating a var replacement map when we remove the
UnnestOp and whenever we find a reference to a var in the map, we replace it with a
reference to the replacement var instead;
We don't yet support nest pullups over Case
The input to Exists is always a ProjectOp with a single constant var projected.
If the input to that ProjectOp contains nesting, it may end up with additional outputs after being
processed. If so, we clear out those additional outputs.
Default RelOp processing:
We really don't want to allow any NestOps through; just fail if we don't have
something coded.
ApplyOp/JoinOp common processing
If one of the inputs to any JoinOp/ApplyOp is a NestOp, then the NestOp
can be pulled above the join/apply if every input to the join/apply has
a key(s). The keys of the NestOp are augmented with the keys of the
other join inputs:
JoinOp/ApplyOp(NestOp(X, ...), Y) => NestOp(JoinOp/ApplyOp(X, Y), ...)
In addition, if the NestOp is on a 'nullable' side of a join (i.e. right side of
LeftOuterJoin/OuterApply or either side of FullOuterJoin), the driving node
of that NestOp (X) is capped with a project with a null sentinel and
the dependant collection nodes (the rest of the NestOp children)
are filtered based on that sentinel:
LOJ/OA/FOJ (X, NestOp(Y, Z1, Z2, ..ZN)) => NestOp( LOJ/OA/FOJ (X, PROJECT (Y, v = 1)), FILTER(Z1, v!=null), FILTER(Z2, v!=null), ... FILTER(ZN, v!=null))
FOJ (NestOp(Y, Z1, Z2, ..ZN), X) => NestOp( LOJ/OA/FOJ (PROJECT (Y, v = 1), X), FILTER(Z1, v!=null), FILTER(Z2, v!=null), ... FILTER(ZN, v!=null))
Also, FILTER(Zi, v != null) may be transformed to push the filter below any NestOps.
The definitions for collection vars corresponding to the filtered collection nodes (in m_definingNodeMap)
are also updated to filter based on the sentinel.
Requires: Every input to the join/apply must have a key.
Applies a IsNotNull(sentinelVar) filter to the given node.
The filter is pushed below all MultiStremNest-s, because this part of the tree has
already been visited and it is expected that the MultiStreamNests have bubbled up
above the filters.
Input => Filter(input, Ref(var) is not null)
ApplyOp common processing
DistinctOp
The input to a DistinctOp cannot be a NestOp – that would imply that
we support distinctness over collections - which we don’t.
FilterOp
If the input to the FilterOp is a NestOp, and if the filter predicate
does not reference any of the collection Vars of the nestOp, then the
FilterOp can be simply pushed below the NestOp:
Filter(Nest(X, ...), pred) => Nest(Filter(X, pred), ...)
Note: even if the filter predicate originally referenced one of the
collection vars, as part of our bottom up traversal, the appropriate
Var was replaced by a copy of the source of the collection. So, this
transformation should always be legal.
GroupByOp
At this point in the process, there really isn't a way we should actually
have a NestOp as an input to the GroupByOp, and we currently aren't allowing
you to specify a collection as an aggregation Var or key, so if we find a
NestOp anywhere on the inputs, it's a NotSupported situation.
GroupByIntoOp
Transform the GroupByInto node into a Project over a GroupBy. The project
outputs all keys and aggregates produced by the GroupBy and has the definition of the
group aggregates var in its var def list.
GroupByInto({key1, key2, ... , keyn}, {fa1, fa1, ... , fan}, {ga1, ga2, ..., gn}) =>
Project(GroupBy({key1, key2, ... , keyn}, {fa1, fa1, ... , fan}), // input
{ga1, ga2, ..., gn} // vardeflist
JoinOp common processing
ProjectOp
If after visiting the children, the ProjectOp's input is a SortOp, swap the ProjectOp and the SortOp,
to allow the SortOp to bubble up and be honored. This may only occur if the original input to the
ProjectOp was an UnnestOp.
There are three cases to handle in ProjectOp:
(1) The input is not a NestOp; but the ProjectOp locally defines some Vars
as collections:
ProjectOp(X,{a,CollectOp(PhysicalProjectOp(Y)),b,...}) ==> MsnOp(ProjectOp'(X,{a,b,...}),Y)
ProjectOp(X,{a,VarRef(ref-to-collect-var-Y),b,...}) ==> MsnOp(ProjectOp'(X,{a,b,...}),copy-of-Y)
Where:
ProjectOp' is ProjectOp less any vars that were collection vars, plus
any additional Vars needed by the collection.
(2) The input is a NestOp, but the ProjectOp does not local define some Vars
as collections:
ProjectOp(MsnOp(X,Y,...)) => MsnOp'(ProjectOp'(X),Y,...)
Where:
ProjectOp' is ProjectOp plus any additional Vars needed by NestOp
(see NestOp.Outputs – except the collection vars)
MsnOp' should be MsnOp. Additionally, its Outputs should be enhanced
to include any Vars produced by the ProjectOp
(3) The combination of both (1) and (2) -- both the vars define a collection,
and the input is also a nestOp. we handle this by first processing Case1,
then processing Case2.
Helper method for .
Fold nested MultiStreamNestOps into one:
MSN(MSN(X,Y),Z) ==> MSN(X,Y,Z)
NOTE: It would be incorrect to merge NestOps from the non-driving node
into one nest op, because that would change the intent. Instead,
we let those go through the tree and wait until we get to the top
level PhysicalProject, when we'll use the ConvertToSingleStreamNest
process to handle them.
NOTE: We should never have three levels of nestOps, because we should
have folded the lower two together when we constructed one of them.
We also remove unreferenced collections, that is, if any collection is
not referred to by the top level-NestOp, we can safely remove it from
the merged NestOp we produce.
ProjectOp(X,{a,CollectOp(PhysicalProjectOp(Y)),b,...}) ==> MsnOp(ProjectOp'(X,{a,b,...}),Y)
ProjectOp(X,{a,VarRef(ref-to-collect-var-Y),b,...}) ==> MsnOp(ProjectOp'(X,{a,b,...}),copy-of-Y)
Remove CollectOps from projection, constructing a NestOp
over the ProjectOp.
If we're going to eat the ProjectNode, then we at least need to make
sure we remap any vars it defines as varRefs, and ensure that any
references to them are switched.
We need to make sure that we remap the column maps that we're pulling
up to point to the defined var, not it's reference.
Convert a CollectOp subtree (when used as the defining expression for a
VarDefOp) into a reasonable input to a NestOp.
There are a couple of cases that we handle here:
(a) PhysicalProject(X) ==> X
(b) PhysicalProject(Sort(X)) ==> Sort(X)
the child of the CollectOp
the collectionVar being defined
where to append the new collectionInfo
where to append the collectionNode
a bit vector of external references of the physicalProject
a bit vector of collection vars
Case 2 for ProjectOp: NestOp is the input:
ProjectOp(NestOp(X,Y,...)) => NestOp'(ProjectOp'(X),Y,...)
Remove collection references from the ProjectOp and pull the
NestOp over it, adding any outputs that the projectOp added.
The outputs are important here; expanding the above:
P{a,n}(N{x1,x2,x3,y}(X,Y)) => N{a,x1,x2,x3,y}(P{a,x1,x2,x3}(X),Y)
Strategy:
(1) Determine oldNestOpCollectionOutputs
(2) oldNestOpNonCollectionOutputs = oldNestOpOutputs - oldNestOpCollectionOutputs;
(3) oldProjectOpNonCollectionOutputs = oldProjectOpOutputs - oldNestOpCollectionOutputs
(4) oldProjectOpCollectionOutputs = oldProjectOpOutputs - oldProjectOpNonCollectionOutputs
(5) build a new list of collectionInfo's for the new NestOp, including
only oldProjectOpCollectionOutputs.
(6) leftCorrelationVars = vars that are defined by the left most child of the input nestOpNode
and used in the subtrees rooted at the other children of the input nestOpNode
(7) newProjectOpOutputs = oldProjectOpNonCollectionOutputs + oldNestOpNonCollectionOutputs + leftCorrelationVars
(8) newProjectOpChildren = ....
Of course everything needs to be "derefed", that is, expressed in the projectOp Var Ids.
(9) Set ProjectOp's input to NestOp's input
(10) Set NestOp's input to ProjectOp.
SetOp common processing
The input to an IntersectOp or an ExceptOp cannot be a NestOp – that
would imply that we support distinctness over collections - which
we don’t.
UnionAllOp is somewhat trickier. We would need a way to percolate keys
up the UnionAllOp – and I’m ok with not supporting this case for now.
SingleRowOp
SingleRowOp(NestOp(x,...)) => NestOp(SingleRowOp(x),...)
SortOp
If the input to a SortOp is a NestOp, then none of the sort
keys can be collection Vars of the NestOp – we don't support
sorts over collections.
ConstrainedSortOp
Push the ConstrainedSortOp onto the driving node of the NestOp:
ConstrainedSortOp(NestOp(X,Y,...)) ==> NestOp(ConstrainedSortOp(X),Y,...)
There should not be any need for var renaming, because the ConstrainedSortOp cannot
refer to any vars from the NestOp
Helper method used by Visit(ConstrainedSortOp, Node)and Visit(SortOp, Node).
It returns a NestBaseOp equivalent to the inputNestOp, only with the given sortKeys
prepended to the prefix sort keys already on the inputNestOp.
Helper method that given two lists of sort keys creates a single list of sort keys without duplicates.
First the keys from the first given list are added, then from the second one.
UnnestOp
Logically, the UnnestOp can simply be replaced with the defining expression
corresponding to the Var property of the UnnestOp. The tricky part is that
the UnnestOp produces a set of ColumnVars which may be referenced in other
parts of the query, and these need to be replaced by the corresponding Vars
produced by the defining expression.
There are essentially four cases:
Case 1: The UnnestOps Var is a UDT. Only the store can handle this, so we
pass it on without changing it.
Case 2: The UnnestOp has a Function as its input. This implies that the
store has TVFs, which it can Unnest, so we let it handle that and do
nothing.
Case 3: The UnnestOp Var defines a Nested collection. We'll just replace
the UnnestOp with the Input:
UnnestOp(VarDef(CollectOp(PhysicalProjectOp(input)))) => input
Case 4: The UnnestOp Var refers to a Nested collection from elsewhere. As we
discover NestOps, we maintain a var->PhysicalProject Node map. When
we get this case, we just make a copy of the PhysicalProject node, for
the referenced Var, and we replace the UnnestOp with it.
UnnestOp(VarDef(VarRef(v))) ==> copy-of-defining-node-for-v
Then, we need to update all references to the output Vars (ColumnVars) produced
by the Unnest to instead refer to the Vars produced by the copy of the subquery.
We produce a map from the Vars of the subquery to the corresponding vars of the
UnnestOp. We then use this map as we walk up the tree, and replace any references
to the Unnest Vars by the new Vars.
To simplify this process, as part of the ITreeGenerator, whenever we generate
an UnnestOp, we will generate a ProjectOp above it – which simply selects out
all Vars from the UnnestOp; and has no local definitions. This allows us to
restrict the Var->Var replacement to just ProjectOp.
Copies the given defining node for a collection var, but also makes sure to 'register' all newly
created collection vars (i.e. copied).
SQLBUDT #557427: The defining node that is being copied may itself contain definitions to other
collection vars. These defintions would be present in m_definingNodeMap. However, after we make a copy
of the defining node, we need to make sure to also put 'matching' definitions of these other collection
vars into m_definingNodeMap.
The dictionary collectionVarDefinitions (below) contains the copied definitions of such collection vars.
but without the wrapping PhysicalProjectOp.
Example: m_definingNodeMap contains (var1, definition1) and (var2, definintion2).
var2 is defined inside the definition of var1.
Here we copy definition1 -> definintion1'.
We need to add to m_definitionNodeMap (var2', definition2').
definition2' should be a copy of definiton2 in the context of to definition1',
i.e. definition2' should relate to definition1' in same way that definition2 relates to definition1
MultiStreamNestOp/SingleStreamNestOp common processing.
Pretty much just verifies that we didn't leave a NestOp behind.
PhysicalProjectOp
Tranformation:
PhysicalProjectOp(MultiStreamNestOp(...)) => PhysicalProjectOp(SortOp(...))
Strategy:
(1) Convert MultiStreamNestOp(...) => SingleStreamNestOp(...)
(2) Convert SingleStreamNestOp(...) => SortOp(...)
(3) Fixup the column maps.
Build up a sort node above the nestOp's input - only if there
are any sort keys to produce
Build up the list of sortkeys. This list should comprise (in order):
- Any prefix sort keys (these represent sort operations on the
driving table, that were logically above the nest)
- The keys of the nest operation
- The discriminator column for the nest operation
- the list of postfix sort keys (used to represent nested collections)
Note that we only add the first occurrance of a var to the list; further
references to the same variable would be trumped by the first one.
convert MultiStreamNestOp to SingleStreamNestOp
A MultiStreamNestOp is typically of the form M(D, N1, N2, ..., Nk)
where D is the driver stream, and N1, N2 etc. represent the collections.
In general, this can be converted into a SingleStreamNestOp over:
(D+ outerApply N1) AugmentedUnionAll (D+ outerApply N2) ...
Where:
D+ is D with an extra discriminator column that helps to identify
the specific collection.
AugmentedUnionAll is simply a unionAll where each branch of the
unionAll is augmented with nulls for the corresponding columns
of other tables in the branch
The simple case where there is only a single nested collection is easier
to address, and can be represented by:
MultiStreamNest(D, N1) => SingleStreamNest(OuterApply(D, N1))
The more complex case, where there is more than one nested column, requires
quite a bit more work:
MultiStreamNest(D, X, Y,...) => SingleStreamNest(UnionAll(Project{"1", D1...Dn, X1...Xn, nY1...nYn}(OuterApply(D, X)), Project{"2", D1...Dn, nX1...nXn, Y1...Yn}(OuterApply(D, Y)), ...))
Where:
D is the driving collection
D1...Dn are the columns from the driving collection
X is the first nested collection
X1...Xn are the columns from the first nested collection
nX1...nXn are null values for all columns from the first nested collection
Y is the second nested collection
Y1...Yn are the columns from the second nested collection
nY1...nYn are null values for all columns from the second nested collection
"Normalize" each input to the NestOp.
We're now in the context of a MultiStreamNestOp, and we're trying to convert this
into a SingleStreamNestOp.
Normalization specifically refers to
- augmenting each input with a discriminator value (that describes the collection)
- removing the sort node at the root (and capturing this information as part of the sortkeys)
the nestOp
the nestOp subtree
Discriminator Vars for each Collection input
SortKeys (postfix) for each Collection input
'Extend' a given input node to also project out an internal integer constant with the given value
Add a constant to a node. Specifically:
N ==> Project(N,{definitions-from-N, constant})
the input node to augment
The fucntion to create the constant op
the computed Var for the internal constant
the augmented node
Convert a SingleStreamNestOp into a massive UnionAllOp
Get back an ordered list of outputs from a union-all op. The ordering should
be identical to the ordered list "leftVars" which describes the left input of
the unionAllOp
the unionall Op
vars of the left input
output vars ordered in the same way as the left input
the iqt we're processing
The goal of this module is to eliminate all references to nominal types
in the tree. Additionally, all structured types are replaced by "flat"
record types - where every field of the structured type is a scalar type.
Note that UDTs are not considered to be structured types.
At the end of this phase,
* there are no more nominal types in the tree
* there are no more nested record types in the tree
* No Var in the tree is of an structured type
* Additionally (and these follow from the statements above)
* There are no NewInstanceOp constructors in the tree
* There are no PropertyOp operators where the result is a structured type
This module uses information from the PropertyPushdown phase to "optimize"
structured type elimination. Essentially, if we can avoid producing pieces
of information that will be discarded later, then lets do that.
The general mechanism of type elimination is as follows. We walk up the tree
in a bottom up fashion, and try to convert all structured types into flattened
record types - type constructors are first converted into flat record constructors
and then dismantled etc. The barrier points - Vars - are all converted into
scalar types, and all intermediate stages will be eliminated in transition.
The output from this phase includes a ColumnMap - which is used later by
the execution model to produce results in the right form from an otherwise
flat query
Notes: This phase could be combined later with the PropertyPushdown phase
Eliminates all structural types from the query
current compiler state
inferred s-space keys for TVFs that are mapped to entities
The real driver. Invokes the visitor to traverse the tree bottom-up,
and modifies the tree along the way.
Get the "new" type corresponding to the input type.
For structured types, we simply look up the typeInfoMap
For collection types, we create a new collection type based on the
"new" element type.
For enums we return the underlying type of the enum type.
For strong spatial types we return the union type that includes the strong spatial type.
For all other types, we simply return the input type
This function builds a "property accessor" over the input expression. It
can produce one of three results:
- It can return "null", if it is convinced that the input has no
such expression
- It can return a subnode of the input, if that subnode represents
the property
- Or, it can build a PropertyOp explicitly
Assertion: the property is not a structured type
The input expression
The desired property
A BuildAccessor variant. If the appropriate property was not found, then
build up a null constant instead
Builds up an accessor to the typeid property. If the type has no typeid
property, then we simply create a constantOp with the corresponding
typeid value for the type
the input expression
the original type of the input expression
Builds a SoftCast operator over the input - if one is necessary.
the input expression to "cast"
the target type
the "cast"ed expression
Clones a subtree.
This is used by the "BuildAccessor" routines to build a property-accessor
over some input. If we're reusing the input, the input must be cloned.
The subtree to copy
Returns a node for a null constant of the desired type
Create a node to represent nullability.
Node for the typeid constant
Create a node to represent the exact value of the typeid constant
The current type
Node for the typeid constant
Create a node to represent a typeid constant for a prefix match.
If the typeid value were "123X", then we would generate a constant
like "123X%"
the current type
Node for the typeid constant
Identify the list of property refs for comparison and isnull semantics
Get the list of "desired" propertyrefs for the specified type and operation
Get a list of "desired" properties for each operationKind (specified by the opKind
parameter). The OpKinds we support are
* GetKeys
Applies only to entity and ref types - gets the key properties (more specifically
the flattened equivalents)
* GetIdentity
Applies only to entity and ref types - gets the entityset id property first, and then the
the Key properties
* All
Gets all properties of the flattened type
* Equality
Scalar types - the entire instance
Entity - the identity properties
Ref - all properties (= identity properties)
Complex/Collection - Not supported
Record - recurse over each property
* IsNull
Scalar types - entire instance
Entity - typeid property, if it exists; otherwise, the key properties
ComplexType - typeid property
Ref - all properties
Collection - not supported
Record - recurse over each property
Type information for the current op
Current operation kind
List of desired properties
Get a list of properties and value (expressions) for each desired property of the
input. The list of desired properties is based on the opKind parameter.
The ignoreMissingProperties indicates if we should create a null constant, in case
the input cannot produce the specified property
typeinfo for the input
Current operation kind
The input expression tree
Should we ignore missing properties
Output: list of properties
Output: correspondng list of values
Build up a key-value pair of (property, expression) to represent
the extraction of the appropriate property from the input expression
The input (structured type) expression
The property in question
should we ignore missing properties
Walk the SortKeys, and expand out
any Structured type Var references
If any of the sort keys is expanded to include a var representing a null sentinel,
set PlanCompiler.HasSortingOnNullSentinels to true.
The list of input keys
An expanded list of keys. If there is nothing to expand it returns the original list.
Project properties of that represents the flattened type of the
.
The contains a TVF call.
Return new node with ProjectOp and representing the projection outputs.
VarDefListOp
Walks each VarDefOp child, and "expands" it out if the Var is a
structured type. If the Var is of enum type it replaces the var
with a var whose type is the underlying type of the enum type from
the original Var. If the Var is of strong spatial type it replaces the var
with a var whose type is the spatial union type that contains the strong spatial type of
the original Var.
For each Var that is expanded, a new expression is created to compute
its value (from the original computed expression)
A new VarDefListOp is created to hold all the "expanded" Varlist
Helps flatten out a computedVar expression
The Var
Subtree rooted at the VarDefOp expression
list of new nodes produced
Is the given propertyRef representing a null sentinel
It is if:
- it is a NullSentinelPropertyRef
- it is a NestedPropertyRef with the outer property being a NullSentinelPropertyRef
Helps flatten out an enum or strong spatial Var
Var definition expression. Must not be null.
Subtree rooted at the VarDefOp expression. Must not be null.
VarDefNode referencing the newly created Var.
PhysicalProjectOp
Walk the input var sequence, flatten each var, and return the new sequence of
Vars
input Var sequence
flattened output var sequence
Probe the current VarSet for "structured" Vars - replace these with the
corresponding sets of flattened Vars
current set of vars
an "expanded" varset
Build up a new varlist, where each structured var has been replaced by its
corresponding flattened vars
the varlist to flatten
the new flattened varlist
Simply flatten out every var in the keys, and return a new DistinctOp
DistinctOp
Current subtree
GroupBy
Again, VisitChildren - for the Keys and Properties VarDefList nodes - does
the real work.
The "Keys" and the "OutputVars" varsets are updated to flatten out
references to any structured Vars.
GroupByInto
Again, VisitChildren - for the Keys and Properties VarDefList nodes - does
the real work.
The "Keys", "InputVars" and "OutputVars" varsets are updated to flatten out
references to any structured Vars.
ProjectOp
The computedVars (the VarDefList) are processed via the VisitChildren() call
We then try to update the "Vars" property to flatten out any structured
type Vars - if a new VarSet is produced, then the ProjectOp is cloned
new subtree
ScanTableOp
Visit a scanTable Op. Flatten out the table's record into one column
for each field. Additionally, set up the VarInfo map appropriately
new subtree
Get the *single" var produced by the subtree rooted at this node.
Returns null, if the node produces more than one var, or less than one
the node
the single var produced by the node
ScanViewOp
Flatten out the view definition, and return that after
the appropriate remapping
the ScanViewOp
current subtree
the flattened view definition
Convert a SortOp. Specifically, walk the SortKeys, and expand out
any Structured type Var references
the sortOp
the current node
new subtree
UnnestOp
Converts an UnnestOp to the right shape.
- Visits UnnestOp input node and then rebuilds the Table instance according to the new flattened output of the input node.
- In the case of a TVF call represented by Unnest(Func()) builds another projection that converts raw TVF output to a collection of flattened rows:
Unnest(Func()) -> Project(Unnest(Func()))
new subtree
SetOp
Converts all SetOps - union/intersect/except.
Calls VisitChildren() to do the bulk of the work. After that, the VarMaps
need to be updated to reflect the removal of any structured Vars
new subtree
Fixes up a SetOp child.
As part of Var flattening, it may so happen that the outer var in the VarMap
may require a property that has no corresponding analog in the inner Var
This logically implies that the corresponding inner property is null. H
What we do here is to throw an additional projectOp over the setOp child to
add computed Vars (whose defining expressions are null constants) for each
of those missing properties
one child of the setop
the varmap for this child
list of new Vars produced
new node for the setOpchild (if any)
Flattens out a VarMap.
Any structured type Vars are expanded out; and collection type Vars
are replaced by new Vars that reflect the new collection types.
There is one special case when dealing with Structured type Vars -
the output and input vars may no longer be 1-1; specifically, there
may be no input Var corresponding to an output var. In such cases, we
build up a new ComputedVar (with an expected value of null), and use that
in place of the inner var. A subsequent stage will inspect the list of
new ComputedVars, and perform the appropriate fixups
The VarMap to fixup
list of any new computedVars that are created
a new VarMap
Flattens a SetOpVar (used in SetOps). Simply produces a list of
properties corresponding to each desired property
SoftCastOp
Visit the children first.
If this is an entity type, complextype or ref type, simply return the
visited child. (Rationale: These must be in the same type hierarchy; or
the earlier stages of query would have failed. And, we end up
using the same "flat" type for every type in the hierarchy)
If this is a scalar type, then simply return the current node
If this is a collection type, then create a new softcastOp over the input
(the collection type may have changed)
Otherwise, we're dealing with a record type. Since our earlier
definitions of equivalence required that equivalent record types must
have the same number of fields, with "promotable" types, and in the same
order; *and* since we asked for all properties (see PropertyPushdownHelper),
the input must be a NewRecordOp, whose fields line up 1-1 with our fields.
Build up a new NewRecordOp based on the arguments to the input NewRecordOp,
and build up SoftCastOps for any field whose type does not match
Removes or rewrites cast to enum or spatial type.
operator.
Current node.
Visited, possible rewritten .
Converts Constant enum value to its underlying type. Converts strong spatial constants to be union typed
The node is processed only if it represents enum or strong spatial constant.
operator.
Current node.
Possible rewritten .
CaseOp
Special handling
If the case statement is of one of the following two shapes:
(1) case when X then NULL else Y, or
(2) case when X then Y else NULL,
where Y is of row type and the types of the input CaseOp, the NULL and Y are the same,
it gets rewritten into: Y', where Y's null sentinel N' is:
(1) case when X then NULL else N, or
where N is Y's null sentinel.
the CaseOp
corresponding node
new subtree
Given a case statement of one of the following two shapes:
(1) case when X then NULL else Y, or
(2) case when X then Y else NULL,
where Y is of row type and the types of the input CaseOp, the NULL and Y are the same,
it rewrittes into: Y', where Y's null sentinel N' is:
(1) case when X then NULL else N, or
where N is Y's null sentinel.
The rewrite only happens if:
(1) Y has null sentinel, and
(2) Y is a NewRecordOp.
Whether a rewrite was done
Flattens a CaseOp - Specifically, if the CaseOp returns a structuredtype,
then the CaseOp is broken up so that we build up a "flat" record constructor
for that structured type, with each argument to the record constructor being
a (scalar) CaseOp. For example:
Case when b1 then e1 else e2 end
gets translated into:
RecordOp(case when b1 then e1.a else e2.a end,
case when b1 then e1.b else e2.b end,
...)
The property extraction is optimized by producing only those properties
that have actually been requested.
Node corresponding to the CaseOp
Information about the type
Set of properties desired
CollectOp
Nothing much to do - simply update the result type
the NestOp
corresponding node
new subtree
ComparisonOp
If the inputs to the comparisonOp are Refs/records/entitytypes, then
we need to flatten these out. Of course, the only reasonable comparisons
should be EQ and NE
ConditionalOp
IsNull requires special handling.
Convert a ConstrainedSortOp. Specifically, walk the SortKeys, and expand out
any Structured type Var references
the constrainedSortOp
the current node
new subtree
GetEntityKeyOp
GetRefKeyOp
GetEntityKeyOp/GetRefKeyOp common handling
In either case, get the "key" properties from the input entity/ref, and
build up a record constructor from these values
the GetRefKey/GetEntityKey op
current subtree
new expression subtree
Common handler for PropertyOp and RelPropertyOp
ignore missing properties
PropertyOp
If this is a scalar/collection property, then simply get the appropriate
field out.
Otherwise, build up a record constructor corresponding to the result
type - optimize this by only getting those properties that are needed
If the instance is not a structured type (ie) it is a UDT, then simply return
the PropertyOp
the corresponding node
new subtree
RelPropertyOp. Pick out the appropriate property from the child
RefOp
Simply convert this into the corresponding record type - with one
field for each key, and one for the entitysetid
VarRefOp
Replace a VarRef with a copy of the corresponding "Record" constructor.
For collection and enum Var references replaces VarRef with the new Var
stored in the VarInfo.
the VarRefOp
the node
new subtree
Handler for NewEntity
NewInstanceOp
the NewInstanceOp
corresponding node
new subtree
DiscriminatedNewInstanceOp
the DiscriminatedNewInstanceOp
corresponding node
new subtree
Given an explicit discriminator value, map to normalized values. Essentially, this allows
a discriminated new instance to coexist with free-floating entities, MEST, etc. which use
general purpose ordpath type ids (e.g. '0X0X')
An example of the normalization is given:
CASE
WHEN discriminator = 'Base' THEN '0X'
WHEN discriminator = 'Derived1' THEN '0X0X'
WHEN discriminator = 'Derived2' THEN '0X1X'
ELSE '0X2X' -- default case for 'Derived3'
NewRecordOp
the newRecordOp
corresponding node
new subtree
Build out an expression corresponding to the entitysetid
the property corresponding to the entitysetid
the *NewEntity op
Flattens out a constructor into a "flat" record constructor.
The "flat" record type is looked up for the current constructor's type,
and each property is filled out from the current constructor's fields
The NewRecordOp/NewInstanceOp
The current subtree
the new subtree
NullOp
If the node represents a null of an entity type it 'flattens' it into a new record,
with at most one non-null value: for the typeIdProperty, if one is needed.
If the node represents an null of a non-entity type, no special work is done.
The NullOp
The current subtree
the new subtree
IsOf
Convert an IsOf operator into a typeid comparison:
IsOfOnly(e, T) => e.TypeId == TypeIdValue(T)
IsOf(e, T) => e.TypeId like TypeIdValue(T)% escape null
The IsOfOp to handle
current isof subtree
new subtree
TreatOp
TreatOp(e, T) => case when e.TypeId like TypeIdValue(T) then T else null end
the TreatOp
the node
new subtree
Create a typeid-comparison operator - more specifically, create an
operator that compares a typeid value with the typeid property of an
input structured type.
The comparison may be "exact" - in which case we're looking for the exact
type; otherwise, we're looking for any possible subtypes.
The "exact" variant is used by the IsOfOp (only); the other variant is
used by IsOfOp and TreatOp
The input structured type expression
Augmented type information for the type
Exact comparison?
New comparison expression
Create a filter matching all types in the given hierarchy (typeIdProperty IN typeInfo.Hierarchy) e.g.:
typeIdProperty = 'Base' OR typeIdProperty = 'Derived1' ...
This is called only for types using DiscriminatorMap (explicit discriminator values)
type hierarchy check
Generates a node of the form typeIdProperty = typeInfo.TypeId
type equality check
The datatype of the typeid property
Describes an operation kind - for various property extractions
Comparing two instances for equality
Checking to see if an instance is null
Getting the "identity" of an entity
Getting the keys of an entity
All properties of an entity
The normalizer performs transformations of the tree to bring it to a 'normalized' format
The SubqueryTracking Visitor serves as a base class for the visitors that may turn
scalar subqueryies into outer-apply subqueries.
Adds a subquery to the list of subqueries for the relOpNode
the RelOp node
the subquery
Add a subquery to the "parent" relop node
the output var to be used - at the current location - in lieu of the subquery
the subquery to move
a var ref node for the var returned from the subquery
Find the first RelOp node that is in my ancestral path.
If I see a PhysicalOp, then I don't have a RelOp parent
the first RelOp node
Extends the base class implementation of VisitChildren.
Wraps the call to visitchildren() by first adding the current node
to the stack of "ancestors", and then popping back the node at the end
Current node
Augments a node with a number of OuterApply's - one for each subquery
If S1, S2, ... are the list of subqueries for the node, and D is the
original (driver) input, we convert D into
OuterApply(OuterApply(D, S1), S2), ...
the input (driver) node
List of subqueries
should the input node be first in the apply chain, or the last?
The resulting node tree
Default processing for RelOps.
- First, we mark the current node as its own ancestor (so that any
subqueries that we detect internally will be added to this node's list)
- then, visit each child
- finally, accumulate all nested subqueries.
- if the current RelOp has only one input, then add the nested subqueries via
Outer apply nodes to this input.
The interesting RelOps are
Project, Filter, GroupBy, Sort,
Should we break this out into separate functions instead?
Current RelOp
Node to process
Current subtree
Processing for all JoinOps
Current subtree
Whether the node was modified
Visitor for UnnestOp. If the child has any subqueries, we need to convert this
into an
OuterApply(S, Unnest)
unlike the other cases where the OuterApply will appear as the input of the node
the unnestOp
current subtree
modified subtree
The driver routine.
plan compiler state
Translate Exists(X) into Exists(select 1 from X)
Build Project(select 1 from child).
Build up an unnest above a scalar op node
X => unnest(X)
the scalarop collection node
the unnest node
Converts the reference to a TVF as following: Collect(PhysicalProject(Unnest(Func)))
current function op
current function subtree
the new expression that corresponds to the TVF
Converts a collection aggregate function count(X), where X is a collection into
two parts. Part A is a groupby subquery that looks like
GroupBy(Unnest(X), empty, count(y))
where "empty" describes the fact that the groupby has no keys, and y is an
element var of the Unnest
Part 2 is a VarRef that refers to the aggregate var for count(y) described above.
Logically, we would replace the entire functionOp by element(GroupBy...). However,
since we also want to translate element() into single-row-subqueries, we do this
here as well.
The function itself is replaced by the VarRef, and the GroupBy is added to the list
of scalar subqueries for the current relOp node on the stack
the functionOp for the collection agg
current subtree
the VarRef node that should replace the function
Pre-processing for a function. Does the default scalar op processing.
If the function returns a collection (TVF), the method converts this expression into
Collect(PhysicalProject(Unnest(Func))).
If the function is a collection aggregate, converts it into the corresponding group aggregate.
Processing for all JoinOps
JoinOp
Current subtree
An NullSentinel propertyref represents the NullSentinel property for
a row type.
As with TypeId, this class is a singleton instance
Gets the singleton instance
Wrapper around OpCopier to keep track of the defining subtrees
of collection vars defined in the subtree being returned as a copy.
Equivalent to OpCopier.Copy, only in addition it keeps track of the defining subtrees
of collection vars defined in the subtree rooted at the copy of the input node n.
Tracks the collection vars after calling the base implementation
The PlanCompiler class is used by the BridgeCommand to produce an
execution plan - this execution plan is the plan object. The plan compilation
process takes as input a command tree (in C space), and then runs through a
set of changes before the final plan is produced. The final plan contains
one or more command trees (commands?) (in S space), with a set of assembly
instructions.
The compiler phases include
* Convert the command tree (CTree) into an internal tree (an ITree)
* Run initializations on the ITree.
* Eliminate structured types from the tree
* Eliminating named type references, refs and records from the tree
At the end of this phase, we still may have collections (and record
arguments to collections) in the tree.
* Projection pruning (ie) eliminating unused references
* Tree transformations. Various transformations are run on the ITree to
(ostensibly) optimize the tree. These transformations are represented as
rules, and a rule processor is invoked.
* Nest elimination. At this point, we try to get pull up nest operations
as high up the tree as possible
* Code Generation. This phase produces a plan object with various subpieces
of the ITree represented as commands (in S space).
* The subtrees of the ITree are then converted into the corresponding CTrees
and converted into S space as part of the CTree creation.
* A plan object is created and returned.
Determines the maximum size of the query in terms of Iqt nodes for which we attempt to do transformation rules.
This number is ignored if applyTransformationsRegardlessOfSize is enabled.
A boolean switch indicating whether we should apply transformation rules regardless of the size of the Iqt.
By default, the Enabled property of a boolean switch is set using the value specified in the configuration file.
Configuring the switch with a value of 0 sets the Enabled property to false; configuring the switch with a nonzero
value to set the Enabled property to true. If the BooleanSwitch constructor cannot find initial switch settings
in the configuration file, the Enabled property of the new switch is set to false by default.
The CTree we're compiling a plan for.
The ITree we're working on.
The phase of the process we're currently in.
Set of phases we need to go through
Keeps track of foreign key relationships. Needed by Join Elimination
Can transformation rules be applied
private constructor
the input cqt
Retail Assertion code.
Provides the ability to have retail asserts.
Compile a query, and produce a plan
the input CQT
list of provider commands
column map for result assembly
the entity sets referenced in this query
Is the specified phase needed for this query?
the phase in question
Mark the specified phase as needed
plan compiler phase
The real driver.
list of provider commands
column map for the result
the entity sets exposed in this query
Helper method for applying transformation rules
Logic to perform between each compile phase
Compute whether transformations may be applied.
Transformation rules may be applied only if the number of nodes is less than
MaxNodeCountForTransformations or if it is specified that they should be applied
regardless of the size of the query.
Converts the CTree into an ITree, and initializes the plan
Get the current command
Does the command include any sort key that represents a null sentinel
This may only be set to true in NominalTypeElimination and is used
in Transformation Rules
Keeps track of foreign key relationships. Needed by Join Elimination
The MetadataWorkspace
To avoid processing huge trees, transformation rules are applied only if the number of nodes
is less than MaxNodeCountForTransformations
or if it is specified that they should be applied regardless of the size of the query.
Whether to apply transformations is only computed the first time this property is requested,
and is cached afterwards. This is because we don't expect the tree to get larger
from applying transformations.
Enum describing which phase of plan compilation we're currently in
Just entering the PreProcessor phase
Entering the AggregatePushdown phase
Entering the Normalization phase
Entering the NTE (Nominal Type Eliminator) phase
Entering the Projection pruning phase
Entering the Nest Pullup phase
Entering the Transformations phase
Entering the JoinElimination phase
Entering the codegen phase
We're almost done
Marker
Utility class for the methods shared among the classes comprising the plan compiler
Utility method that determines whether a given CaseOp subtree can be optimized.
Called by both PreProcessor and NominalTypeEliminator.
If the case statement is of the shape:
case when X then NULL else Y, or
case when X then Y else NULL,
where Y is of row type, and the types of the input CaseOp, the NULL and Y are the same,
return true
Is this function a collection aggregate function. It is, if
- it has exactly one child
- that child is a collection type
- and the function has been marked with the aggregate attribute
the function op
the current subtree
true, if this was a collection aggregate function
Is the given op one of the ConstantBaseOp-s
Combine two predicates by trying to avoid the predicate parts of the
second one that are already present in the first one.
In particular, given two nodes, predicate1 and predicate2,
it creates a combined predicate logically equivalent to
predicate1 AND predicate2,
but it does not include any AND parts of predicate2 that are present
in predicate1.
Create a list of AND parts for a given predicate.
For example, if the predicate is of the shape:
((p1 and p2) and (p3 and p4)) the list is p1, p2, p3, p4
The predicates p1,p2, p3, p4 may be roots of subtrees that
have nodes with AND ops, but
would not be broken unless they are the AND nodes themselves.
The Predicate class represents a condition (predicate) in CNF.
A predicate consists of a number of "simple" parts, and the parts are considered to be
ANDed together
This class provides a number of useful functions related to
- Single Table predicates
- Join predicates
- Key preservation
- Null preservation
etc.
Note: This class doesn't really convert node trees into CNF form. It looks for
basic CNF patterns, and reasons about them. For example,
(a AND b) OR c
can technically be translated into (a OR c) AND (b OR c),
but we don't bother.
At some future point of time, it might be appropriate to consider this
Create an empty predicate
Create a predicate from a node tree
current iqt command
the node tree
Add a new "part" (simple predicate) to the current list of predicate parts
simple predicate
Build up an AND tree based on the current parts.
Specifically, if I have parts (p1, p2, ..., pn), we build up a tree that looks like
p1 AND p2 AND ... AND pn
If we have no parts, we return a null reference
If we have only one part, then we return just that part
the and subtree
Partition the current predicate into predicates that only apply
to the specified table (single-table-predicates), and others
current columns defined by the table
non-single-table predicates
single-table-predicates
Get the set of equi-join columns from this predicate
Is the current predicate a "key-satisfying" predicate?
list of keyVars
current table definitions
true, if this predicate satisfies the keys
Does this predicate preserve nulls for the table columns?
If the ansiNullSemantics parameter is set, then we simply return true
always - this shuts off most optimizations
list of columns to consider
use ansi null semantics
true, if the predicate preserves nulls
Is this "simple" predicate an equi-join predicate?
(ie) is it of the form "var1 = var2"
Return "var1" and "var2"
the simple predicate
var on the left-side
var on the right
true, if this is an equijoin predicate
Is this an equi-join predicate involving columns from the specified tables?
On output, if this was indeed an equijoin predicate, "leftVar" is the
column of the left table, while "rightVar" is the column of the right table
and the predicate itself is of the form "leftVar = rightVar"
the simple predicate node
interesting columns of the left table
interesting columns of the right table
join column of the left table
join column of the right table
true, if this is an equijoin predicate involving columns from the 2 tables
Does this predicate preserve nulls on the specified columns of the table?
If any of the columns participates in a comparison predicate, or in a
not-null predicate, then, nulls are not preserved
the "simple" predicate node
list of table columns
true, if nulls are preserved
The PreProcessor module is responsible for performing any required preprocessing
on the tree and gathering information before subsequent phases may be performed.
Tracks affinity of entity constructors to entity sets (aka scoped entity type constructors).
Scan view ops and entityset-bound tvfs push corresponding entity sets so that their child nodes representing entity constructors could
determine the entity set to which the constructed entity belongs.
Helper for rel properties
The driver routine.
plan compiler state
type information about all types/sets referenced in the query
inferred key columns of tvfs return types
Mark this EntitySet as referenced in the query
Mark this type as being referenced in the query, if it is a structured, collection or enum type.
type to reference
Get the list of relationshipsets that can hold instances of the given relationshiptype
We identify the list of relationshipsets in the current list of entitycontainers that are
of the given type. Since we don't yet support relationshiptype subtyping, this is a little
easier than the entity version
the relationship type to look for
the list of relevant relationshipsets
Find all entitysets (that are reachable in the current query) that can hold instances that
are *at least* of type "entityType".
An entityset ES of type T1 can hold instances that are at least of type T2, if one of the following
is true
- T1 is a subtype of T2
- T2 is a subtype of T1
- T1 is equal to T2
the desired entity type
list of all entitysets of the desired shape
Gets the "expanded" query mapping view for the specified C-Space entity set
The scanTableOp that references the entity set
An optional type filter to apply to the generated view. Set to null on return if the generated view renders the type filter superfluous.
A node that is the root of the new expanded view
If the discrminator map we're already tracking for this type (in this entityset)
isn't already rooted at our required type, then we have to suppress the use of
the descriminator maps when we constrct the structuredtypes; see SQLBUDT #615744
Rewrites a NavigateOp tree in the following fashion
SELECT VALUE r.ToEnd
FROM (SELECT VALUE r1 FROM RS1 as r1
UNION ALL
SELECT VALUE r2 FROM RS2 as r2
...
SELECT VALUE rN FROM RSN as rN) as r
WHERE r.FromEnd = sourceRef
RS1, RS2 etc. are the set of all relationshipsets that can hold instances of the specified
relationship type. "sourceRef" is the single (ref-type) argument to the NavigateOp that
represents the from-end of the navigation traversal
If the toEnd is multi-valued, then we stick a Collect(PhysicalProject( over the subquery above
A couple of special cases.
If no relationship sets can be found, we return a NULL (if the
toEnd is single-valued), or an empty multiset (if the toEnd is multi-valued)
If the toEnd is single-valued, *AND* the input Op is a GetEntityRefOp, then
we convert the NavigateOp into a RelPropertyOp over the entity.
the navigateOp tree
the navigateOp
the output var produced by the subquery (ONLY if the to-End is single-valued)
the resulting node
Build up a node tree that represents the set of instances from the given table that are at least
of the specified type ("ofType"). If "ofType" is NULL, then all rows are returned
Return the outputVar from the nodetree
the entityset or relationshipset to scan over
the element types we're interested in
the output var produced by this node tree
the node tree
Produces a relop tree that "logically" produces the target of the derefop. In essence, this gets rewritten
into
SELECT VALUE e
FROM (SELECT VALUE e0 FROM OFTYPE(ES0, T) as e0
UNION ALL
SELECT VALUE e1 FROM OFTYPE(ES1, T) as e1
...
SELECT VALUE eN from OFTYPE(ESN, T) as eN)) as e
WHERE REF(e) = myRef
"T" is the target type of the Deref, and myRef is the (single) argument to the DerefOp
ES0, ES1 etc. are all the EntitySets that could hold instances that are at least of type "T". We identify this list of sets
by looking at all entitycontainers referenced in the query, and looking at all entitysets in those
containers that are of the right type
An EntitySet ES (of entity type X) can hold instances of T, if one of the following is true
- T is a subtype of X
- X is equal to T
Our situation is a little trickier, since we also need to look for cases where X is a subtype of T.
the derefOp subtree
the derefOp
output var produced
the subquery described above
Find the entityset that corresponds to the specified end of the relationship.
We must find one - else we assert.
the relationshipset
the destination end of the relationship traversal
the entityset corresponding to the target end
Builds up a join between the relationshipset and the entityset corresponding to its toEnd. In essence,
we produce
SELECT r, e
FROM RS as r, OFTYPE(ES, T) as e
WHERE r.ToEnd = Ref(e)
"T" is the entity type of the toEnd of the relationship.
the relationshipset
the toEnd of the relationship
the var representing the relationship instance ("r") in the output subquery
the var representing the entity instance ("e") in the output subquery
the join subquery described above
Rewrite a navigation property when the target end has multiplicity
of one (or zero..one) and the source end has multiplicity of many.
Note that this translation is also valid for a navigation property when the target
end has multiplicity of one (or zero..one) and the source end has multiplicity of one
(or zero..one), but a different translation is used because it yields a simpler query in some cases.
We simply pick up the corresponding rel property from the input entity, and
apply a deref operation
NavProperty(e, n) => deref(relproperty(e, r))
where e is the entity expression, n is the nav-property, and r is the corresponding
rel-property
the rel-property describing the navigation
entity instance that we're starting the traversal from
type of the target entity
a rewritten subtree
Rewrite a navigation property when the source end has multiplicity
of one (or zero..one) and the target end has multiplicity of many.
We also build out a CollectOp over the subquery above, and return that
the rel-property describing the relationship traversal
the list of relevant relationshipsets
node tree corresponding to the source entity ref
the rewritten subtree
Rewrite a navigation property when the target end has multiplicity
of one (or zero..one) and the source end has multiplicity of one (or zero..one).
We add the translation as a subquery to the parent rel op and return a reference to
the corresponding var
the rel-property describing the relationship traversal
the list of relevant relationshipsets
node tree corresponding to the source entity ref
the rewritten subtree
Translation for Navigation Properties with a 0 or 0..1 source end
In essence, we find all the relevant target entitysets, and then compare the
rel-property on the target end with the source ref
Converts
NavigationProperty(e, r)
into
SELECT VALUE t
FROM (SELECT VALUE e1 FROM ES1 as e1
UNION ALL
SELECT VALUE e2 FROM ES2 as e2
UNION ALL
...
) as t
WHERE RelProperty(t, r') = GetEntityRef(e)
r' is the inverse-relproperty for r
the rel-property describing the relationship traversal
the list of relevant relationshipsets
node tree corresponding to the source entity ref
the var representing the output
the rewritten subtree
Rewrite a navigation property when the target end has multiplicity
many and the source end has multiplicity of many.
Consider this a rewrite of DEREF(NAVIGATE(r)) where "r" is a many-to-many relationship
We essentially produce the following subquery
SELECT VALUE x.e
FROM (SELECT r1 as r, e1 as e FROM RS1 as r1 INNER JOIN OFTYPE(ES1, T) as e1 on r1.ToEnd = Ref(e1)
UNION ALL
SELECT r1 as r, e1 as e FROM RS1 as r1 INNER JOIN OFTYPE(ES1, T) as e1 on r1.ToEnd = Ref(e1)
...
) as x
WHERE x.r.FromEnd = sourceRef
RS1, RS2 etc. are the relevant relationshipsets
ES1, ES2 etc. are the corresponding entitysets for the toEnd of the relationship
sourceRef is the ref argument
T is the type of the target-end of the relationship
We then build a CollectOp over the subquery above
the rel property to traverse
list of relevant relationshipsets
source ref
Rewrite a NavProperty; more generally, consider this a rewrite of DEREF(NAVIGATE(r))
We handle four cases here, depending on the kind of relationship we're
dealing with.
- 1:1 relationships
- 1:M relationships
- N:1 relationships
- N:M relationships
the navigation property
the input ref to start the traversal
the result type of the expression
the rewritten tree
Default handler for scalar Ops. Simply traverses the children,
and also identifies any structured types along the way
the ScalarOp
current subtree
the possibly modified node
Rewrite a DerefOp subtree. We have two cases to consider here.
We call RewriteDerefOp to return a subtree (and an optional outputVar).
If the outputVar is null, then we simply return the subtree produced by those calls.
Otherwise, we add the subtree to the "parent" relop (to be outer-applied), and then use the outputVar
in its place.
As an example,
select deref(e) from T
gets rewritten into
select v from T OuterApply X
where X is the subtree returned from the RewriteXXX calls, and "v" is the output var produced by X
the derefOp
the deref subtree
the rewritten tree
Processing for an ElementOp. Replaces this by the corresponding Var from
the subquery, and adds the subquery to the list of currently tracked subqueries
the elementOp
current subtree
the Var from the subquery
Mark Normalization as needed
Visit a function call expression. If function is mapped, expand and visit the mapping expression.
If this is TVF or a collection aggregate function, NestPullUp and Normalization are needed.
Default processing.
In addition, if the case statement is of the shape
case when X then NULL else Y, or
case when X then Y else NULL,
where Y is of row type and the types of the input CaseOp, the NULL and Y are the same,
marks that type as needing a null sentinel.
This allows in NominalTypeElimination the case op to be pushed inside Y's null sentinel.
Special processing for ConditionalOp is handled by
If it is a IsNull op over a row type or a complex type mark the type as needing a null sentinel.
Validates that the nav property agrees with the underlying relationship
the Nav PropertyOp
Rewrite a PropertyOp subtree for a nav property
does the heavy lifting
the PropertyOp
the current node
the rewritten subtree
Is the given node of shape NavigationProperty(SoftCast(VarRef)), or NavigationProperty(VarRef)
Rewrite a PropertyOp subtree.
If the PropertyOp represents a simple property (ie) not a navigation property, we simply call
VisitScalarOpDefault() and return. Otherwise, we call VisitNavPropertyOp and return the result from
that function
the PropertyOp
the PropertyOp subtree
the rewritten tree
Handler for a RefOp.
Keeps track of the entityset
the RefOp
current RefOp subtree
current subtree
Handler for a TreatOp.
Rewrites the operator if the argument is guaranteed to be of type
op.
Current TreatOp
Current subtree
Current subtree
Handler for an IsOfOp.
Keeps track of the IsOfType (if it is a structured type) and rewrites the
operator if the argument is guaranteed to be of type op.IsOfType
Current IsOfOp
Current subtree
Current subtree
Rewrite a NavigateOp subtree.
We call RewriteNavigateOp to return a subtree (and an optional outputVar).
If the outputVar is null, then we simply return the subtree produced by those calls.
Otherwise, we add the subtree to the "parent" relop (to be outer-applied), and then use the outputVar
in its place.
As an example,
select navigate(e) from T
gets rewritten into
select v from T OuterApply X
where X is the subtree returned from the RewriteXXX calls, and "v" is the output var produced by X
the navigateOp
the navigateOp subtree
the rewritten tree
Returns the current entity set scope, if any, for an entity type constructor.
The scope defines the result of the construtor as a scoped entity type.
Find the relationshipset that matches the current entityset + from/to roles
Find the position of a property in a type.
Positions start at zero, and a supertype's properties precede the current
type's properties
the type in question
the member to lookup
the position of the member in the type (0-based)
Build out an expression (NewRecord) that corresponds to the key properties
of the passed-in entity constructor
This function simply looks up the key properties of the entity type, and then
identifies the arguments to the constructor corresponding to those
properties, and then slaps on a record wrapper over those expressions.
No copies/clones are performed. That's the responsibility of the caller
the entity constructor op
the corresponding subtree
the key expression
Build out an expression corresponding to the rel-property.
We create a subquery that looks like
(select r
from RS r
where GetRefKey(r.FromEnd) = myKey)
RS is the single relationship set that corresponds to the given entityset/rel-property pair
FromEnd - is the source end of the relationship
myKey - is the key expression of the entity being constructed
NOTE: We always clone "myKey" before use.
We then convert it into a scalar subquery, and extract out the ToEnd property from
the output var of the subquery. (Should we do this inside the subquery itself?)
If no single relationship-set is found, we return a NULL instead.
entity set that logically holds instances of the entity we're building
the rel-property we're trying to build up
the "key" of the entity instance
the rel-property expression
Given an entity constructor (NewEntityOp, DiscriminatedNewEntityOp), build up
the list of rel-property expressions.
Walks through the list of relevant rel-properties, and builds up expressions
(using BuildRelPropertyExpression) for each rel-property that does not have
an expression already built (preBuiltExpressions)
entity set that holds instances of the entity we're building
the list of relevant rel-properties for this entity type
the prebuilt rel-property expressions
the key of the entity instance
a list of rel-property expressions (lines up 1-1 with 'relPropertyList')
Handler for NewEntityOp.
Assignes scope to the entity constructor if it hasn't been assigned before.
the NewEntityOp
the node tree corresponding to the op
rewritten tree
Tracks discriminator metadata so that is can be used when constructing
StructuredTypeInfo.
Handles a newMultiset constructor. Converts this into
select a from dual union all select b from dual union all ...
Handles a NewMultiset constructor, i.e. {x, y, z}
1. Empty multiset constructors are simply converted into:
select x from singlerowtable as x where false
2. Mulltset constructors with only one element or with multiple elements all of
which are constants or nulls are converted into:
select x from dual union all select y from dual union all select z
3. All others are converted into:
select case when d = 0 then x when d = 1 then y else z end
from ( select 0 as d from single_row_table
union all
select 1 as d from single_row_table
union all
select 2 as d from single_row_table )
NOTE: The translation for 2 is valid for 3 too. We choose different translation
in order to avoid correlation inside the union all,
which would prevent us from removing apply operators
Do this before processing the children, and then
call Visit on the result to handle the elements
the new instance op
the current subtree
the modified subtree
Returns true if each node in the list is either a constant or a null
Default processing for a CollectOp. But make sure that we
go through the NestPullUp phase
Visits a "table" expression - performs view expansion on the table (if appropriate),
and then some additional book-keeping.
The "ofType" and "includeSubtypes" parameters are optional hints for view expansion, allowing
for more customized (and hopefully, more optimal) views. The wasOfTypeSatisfied out parameter
tells whether the ofType filter was already handled by the view expansion, or if the caller still
needs to deal with it.
If the "table" is a C-space entityset, then we produce a ScanViewOp
tree with the defining query as the only child of the ScanViewOp
If the table is an S-space entityset, then we still produce a ScanViewOp, but this
time, we produce a simple "select * from BaseTable" as the defining
query
the scanTable node tree
the scanTableOp
An optional IsOfOp representing a type filter to apply to the scan table; will be set to null if the scan target is expanded to a view that renders the type filter superfluous.
Processes a ScanTableOp - simply delegates to ProcessScanTableOp
the view op
current node tree
the transformed view-op
Visitor for a ScanViewOp
Processing for all JoinOps
JoinOp
Current subtree
Perform default relop processing; Also "require" the join-elimination phase
Can I eliminate this sort? I can, if the current path is *not* one of the
following
TopN(Sort)
PhysicalProject(Sort)
We don't yet handle the TopN variant
Visit a SortOp. Eliminate it if the path to this node is not one of
PhysicalProject(Sort) or
TopN(Sort)
Otherwise, simply visit the child RelOp
Current sortOp
current subtree
possibly transformed subtree
Checks to see if this filterOp represents an IS OF (or IS OF ONLY) filter over a ScanTableOp
the filterOp node
(OUT) the Type to restrict to
Handler for a FilterOp. Usually delegates to VisitRelOpDefault.
There's one special case - where we have an ISOF predicate over a ScanTable. In that case, we attempt
to get a more "optimal" view; and return that optimal view
the filterOp
the node tree
Visit a ProjectOp; if the input is a SortOp, we pullup the sort over
the ProjectOp to ensure that we don't have nested sorts;
Note: This transformation cannot be moved in the normalizer,
because it needs to happen before any subquery augmentation happens.
Mark AggregatePushdown as needed
the groupByInto op
the node tree
Represents information about a primitive typed Var and how it can be replaced.
Initializes a new instance of class.
New that replaces current .
Gets the newVar.
Gets for this . Always .
Gets the list of all NewVars. The list contains always just one element.
The ProjectionPruner module is responsible for eliminating unnecessary column
references (and other expressions) from the query.
Projection pruning logically operates in two passes - the first pass is a top-down
pass where information about all referenced columns and expressions is collected
(pushed down from a node to its children).
The second phase is a bottom-up phase, where each node (in response to the
information collected above) attempts to rid itself of unwanted columns and
expressions.
The two phases can be combined into a single tree walk, where for each node, the
processing is on the lines of:
- compute and push information to children (top-down)
- process children
- eliminate unnecessary references from myself (bottom-up)
Trivial private constructor
current compiler state
Runs through the root node of the tree, and eliminates all
unreferenced expressions
current compiler state
Runs through the given subtree, and eliminates all
unreferenced expressions
current compiler state
The node to be processed
The processed, i.e. transformed node
The real driver of the pruning process. Simply invokes the visitor over the input node
The node to be processed
The processed node
Adds a reference to this Var
Adds a reference to each var in a set of Vars
Is this Var referenced?
Is this var unreferenced?
Prunes a VarMap - gets rid of unreferenced vars from the VarMap inplace
Additionally, propagates var references to the inner vars
Prunes a varset - gets rid of unreferenced vars from the Varset in place
the varset to prune
Visits the children and recomputes the node info
The current node
Visits the children in reverse order and recomputes the node info
The current node
VarDefListOp
Walks the children (VarDefOp), and looks for those whose Vars
have been referenced. Only those VarDefOps are visited - the
others are ignored.
At the end, a new list of children is created - with only those
VarDefOps that have been referenced
the varDefListOp
corresponding node
modified node
PhysicalProjectOp
Insist that all Vars in this are required
NestOps
Common handling for all NestOps.
SingleStreamNestOp
Insist (for now) that all Vars are required
MultiStreamNestOp
Insist (for now) that all Vars are required
ApplyOps
Common handling for all ApplyOps. Visit the right child first to capture
any references to the left, and then visit the left child.
the apply op
modified subtree
DistinctOp
We remove all null and constant keys that are not referenced as long as
there is one key left. We add all remaining keys to the referenced list
and proceed to the inputs
the DistinctOp
Current subtree
ElementOp
An ElementOp that is still present when Projection Prunning is invoked can only get introduced
in the TransformationRules phase by transforming an apply operation into a scalar subquery.
Such ElementOp serves as root of a defining expression of a VarDefinitionOp node and
thus what it produces is useful.
the ElementOp
Current subtree
FilterOp
First visit the predicate (because that may contain references to
the relop input), and then visit the relop input. No additional
processing is required
the filterOp
current node
GroupByBase
First, we visit the vardeflist for aggregates and potentially group aggregates
as they may reference keys (including constant keys).
Then we remove all null and constant keys that are not referenced as long as
there is one key left. We add all remaining key columns to the referenced list.
Then we walk through the vardeflist for the keys; and finally process the relop input
Once we're done, we update the "Outputs" varset - to account for any
pruned vars. The "Keys" varset will not change
the groupbyOp
current subtree
modified subtree
Helper method for removing redundant constant keys from GroupByOp and DistictOp.
It only examines the keys defined in the given varDefListNode.
It removes all constant and null keys that are not referenced elsewhere,
but ensuring that at least one key is left.
It should not be called with empty keyVec.
The keys
The var vec that needs to be updated along with the keys
Var def list node for the keys
First defer to default handling for groupby nodes
If all group aggregate vars are prunned out turn it into a GroupBy.
JoinOps
Common handling for all join ops. For all joins (other than crossjoin),
we must first visit the predicate (to capture any references from it), and
then visit the relop inputs. The relop inputs can be visited in any order
because there can be no correlations between them
For crossjoins, we simply use the default processing - visit all children
; there can be no correlations between the nodes anyway
Node for the join subtree
modified subtree
ProjectOp
We visit the projections first (the VarDefListOp child), and then
the input (the RelOp child) - this reverse order is necessary, since
the projections need to be visited to determine if anything from
the input is really needed.
The VarDefListOp child will handle the removal of unnecessary VarDefOps.
On the way out, we then update our "Vars" property to reflect the Vars
that have been eliminated
the ProjectOp
the current node
modified subtree
ScanTableOp
Update the list of referenced columns
SetOps
Common handling for all SetOps. We first identify the "output" vars
that are referenced, and mark the corresponding "input" vars as referenced
We then remove all unreferenced output Vars from the "Outputs" varset
as well as from the Varmaps.
Finally, we visit the children
current node
SortOp
First visit the sort keys - no sort key can be eliminated.
Then process the vardeflist child (if there is one) that contains computed
vars, and finally process the relop input. As before, the computedvars
and sortkeys need to be processed before the relop input
the sortop
the current subtree
modified subtree
UnnestOp
Marks the unnestVar as referenced, and if there
is a child, visits the child.
the unnestOp
current subtree
modified subtree
VarRefOp
Mark the corresponding Var as "referenced"
the VarRefOp
current node
ExistsOp
The child must be a ProjectOp - with exactly 1 var. Mark it as referenced
the ExistsOp
the input node
This class tracks down the vars that are referenced in the column map
Find all vars that were referenced in the column map. Looks for VarRefColumnMap
in the ColumnMap tree, and tracks those vars
NOTE: The "vec" parameter must be supplied by the caller. The caller is responsible for
clearing out this parameter (if necessary) before calling into this function
the column map to traverse
the set of referenced columns
Trivial constructor
Handler for VarRefColumnMap. Simply adds the "var" to the set of referenced vars
the current varRefColumnMap
the set of referenced vars so far
Transformation rules for ProjectOp
Converts a Project(Project(X, c1,...), d1,...) =>
Project(X, d1', d2'...)
where d1', d2' etc. are the "mapped" versions of d1, d2 etc.
Rule processing context
Current ProjectOp node
modified subtree
Transformation status
Eliminate a ProjectOp that has no local definitions at all and
no external references, (ie) if Child1
of the ProjectOp (the VarDefListOp child) has no children, then the ProjectOp
is serving no useful purpose. Get rid of the ProjectOp, and replace it with its
child
rule processing context
current subtree
transformed subtree
transformation status
If the ProjectOp defines some computedVars, but those computedVars are simply
redefinitions of other Vars, then eliminate the computedVars.
Project(X, VarDefList(VarDef(cv1, VarRef(v1)), ...))
can be transformed into
Project(X, VarDefList(...))
where cv1 has now been replaced by v1
Rule processing context
current subtree
transformed subtree
transformation status
Tries to remove null sentinel definitions by replacing them to vars that are guaranteed
to be non-nullable and of integer type, or with reference to other constants defined in the
same project. In particular,
- If based on the ancestors, the value of the null sentinel can be changed and the
input of the project has a var that is guaranteed to be non-nullable and
is of integer type, then the definitions of the vars defined as NullSentinels in the ProjectOp
are replaced with a reference to that var. I.eg:
Project(X, VarDefList(VarDef(ns_var, NullSentinel), ...))
can be transformed into
Project(X, VarDefList(VarDef(ns_var, VarRef(v))...))
where v is known to be non-nullable
- Else, if based on the ancestors, the value of the null sentinel can be changed and
the project already has definitions of other int constants, the definitions of the null sentinels
are removed and the respective vars are remapped to the var representing the constant.
- Else, the definitions of the all null sentinels except for one are removed, and the
the respective vars are remapped to the remaining null sentinel.
Rule processing context
current subtree
transformed subtree
transformation status
The PropertyPushdownHelper module is a submodule of the StructuredTypeEliminator
module. It serves as a useful optimization sidekick for NominalTypeEliminator which
is the real guts of eliminating structured types.
The goal of this module is to identify a list of desired properties for each node
(and Var) in the tree that is of a structured type. This list of desired properties
is identified in a top-down push fashion.
While it is desirable to get as accurate information as possible, it is unnecessary
for this module to be super-efficient (i.e.) it is ok for it to get a superset
of the appropriate information for each node, but it is absolutely not ok for it
to get a subset. Later phases (projection pruning) can help eliminate unnecessary
information, but the query cannot be made incorrect.
This module is implemented as a visitor - it leverages information about
types in the query - made possible by the TypeFlattener module - and walks
down the tree pushing properties to each child of a node. It builds two maps:
(*) a node-property map
(*) a var-property map
Each of these keeps trackof the properties needed from each node/var.
These maps are returned to the caller and will be used by the NominalTypeEliminator
module to eliminate all structured types.
The driver.
Walks the tree, and "pushes" down information about required properties
to every node and Var in the tree.
The query tree
List of desired properties from each Var
List of desired properties from each node
the driver routine. Invokes the visitor, and then returns the collected
info
node in the tree to begin processing at
Get the list of propertyrefs for a node. If none exists, create an
empty structure and store it in the map
Specific node
List of properties expected from this node
Add a list of property references for this node
the node
list of property references
Get the list of desired properties for a Var
the var
List of desired properties
Add a new set of properties to a Var
the var
desired properties
Gets the list of "identity" properties for an entity. Gets the
"entitysetid" property in addition to the "key" properties
Gets the list of key properties for an entity
Default visitor for an Op.
Simply walks through all children looking for Ops of structured
types, and asks for all their properties.
Several of the ScalarOps take the default handling, to simply ask
for all the children's properties:
AggegateOp
ArithmeticOp
CastOp
ConditionalOp
ConstantOp
ElementOp
ExistsOp
FunctionOp
GetRefKeyOp
LikeOp
NestAggregateOp
NewInstanceOp
NewMultisetOp
NewRecordOp
RefOp
They do not exist here to eliminate noise.
Note that the NewRecordOp and the NewInstanceOp could be optimized to only
push down the appropriate references, but it isn't clear to Murali that the
complexity is worth it.
SoftCastOp:
If the input is
Ref - ask for all properties
Entity, ComplexType - ask for the same properties I've been asked for
Record - ask for all properties (Note: This should be more optimized in the future
since we can actually "remap" the properties)
CaseOp handling
Pushes its desired properties to each of the WHEN/ELSE clauses
CollectOp handling.
ComparisonOp handling
ElementOp handling
GetEntityRefOp handling
Ask for the "identity" properties from the input entity, and push that
down to my child
IsOfOp handling
Simply requests the "typeid" property from
the input. No other property is required
IsOf op
Node to visit
Common handler for RelPropertyOp and PropertyOp.
Simply pushes down the desired set of properties to the child
the *propertyOp
node tree corresponding to the Op
the property reference
RelPropertyOp handling.
Delegates to VisitPropertyOp. Marks the rel-property as required from the
child
the RelPropertyOp
node tree corresponding to the op
PropertyOp handling
Pushes down the requested properties along with the current
property to the child
TreatOp handling
Simply passes down "my" desired properties, and additionally
asks for the TypeID property
VarRefOp handling
Simply passes along the current "desired" properties
to the corresponding Var
VarDefOp handling
Pushes the "desired" properties to the
defining expression
VarDefListOp handling
ApplyOp handling
CrossApplyOp handling
OuterApplyOp handling
Handling for all ApplyOps: Process the right child, and then
the left child - since the right child may have references to the
left
apply op
DistinctOp handling
Require all properties out of all structured vars
FilterOp handling
Process the predicate child, and then the input child - since the
predicate child will probably have references to the input.
GroupByOp handling
JoinOp handling
CrossJoinOp handling
InnerJoinOp handling
LeftOuterJoinOp handling
FullOuterJoinOp handling
Handler for all JoinOps. For all joins except cross joins, process
the predicate first, and then the inputs - the inputs can be processed
in any order.
For cross joins, simply process all the (relop) inputs
join op
ProjectOp handling
ScanTableOp handler
ScanViewOp
ask for all properties from the view definition
that have currently been requested from the view itself
current ScanViewOp
current node
SetOp handling
UnionAllOp handling
IntersectOp handling
ExceptOp handling
Visitor for a SetOp. Pushes desired properties to the corresponding
Vars of the input
the setop
SortOp handling
First, "request" that for any sort key that is a structured type, we
need all its properties. Then process any local definitions, and
finally the relop input
UnnestOp handling
PhysicalProjectOp handling
MultiStreamNestOp handling
SingleStreamNestOp handling
Represents a collection of property references
Get something that represents "all" property references
Trivial constructor
Add a new property reference to this list
new property reference
Append an existing list of property references to myself
list of property references
Create a clone of myself
a clone of myself
Do I contain the specifed property?
The property
true, if I do
Do I contain "all" properties?
Get the list of all properties
Helper class for creating a ProviderCommandInfo given an Iqt Node.
Creates a ProviderCommandInfo for the given node.
This method should be called when the keys, foreign keys and sort keys are known ahead of time.
Typically it is used when the original command is factored into multiple commands.
The owning command, used for creating VarVecs, etc
The root of the sub-command for which a ProviderCommandInfo should be generated
The resulting ProviderCommandInfo
Build up a mapping from Vars to the corresponding property of the output row type
the physical projectOp
output type
a map from Vars to the output type member
A rel-property ref - represents a rel property of the type
Simple constructor
the property metadata
Overrides the default equality function. Two RelPropertyRefs are
equal, if they describe the same property
the other object to compare to
true, if the objects are equal
Overrides the default hashcode function.
Simply returns the hashcode for the property instead
hashcode for the relpropertyref
debugging support
Gets the property metadata
A subclass of the TypeInfo class above that only represents information
about "root" types
The TypeInfo class encapsulates various pieces of information about a type.
The most important of these include the "flattened" record type - corresponding
to the type, and the TypeId field for nominal types
Creates type information for a type
Get the new property for the supplied propertyRef
property reference (on the old type)
Try get the new property for the supplied propertyRef
property reference (on the old type)
throw if the property is not found
the corresponding property on the new type
Get the list of "key" properties (in the flattened type)
the key property equivalents in the flattened type
Get the list of "identity" properties in the flattened type.
The identity properties include the entitysetid property, followed by the
key properties
List of identity properties
Get the list of all properties in the flattened type
Get the list of all properties in the flattened type
Gets all types in the hierarchy rooted at this.
Adds all types in the hierarchy to the given list.
Is this the root type?
True for entity, complex types and ref types, if this is the root of the
hierarchy.
Always true for Record types
the types that derive from this type
the immediate parent type of this type.
the top most type in the hierarchy.
The metadata type
The typeid value for this type - only applies to nominal types
Flattened record version of the type
TypeUsage that encloses the Flattened record version of the type
Get the property describing the entityset (if any)
Does this type have an entitySetId property
Get the nullSentinel property (if any)
Does this type have a nullSentinel property?
The typeid property in the flattened type - applies only to nominal types
this will be used as the type discriminator column.
Does this type need a typeid property? (Needed for complex types and entity types in general)
All the properties of this type.
Constructor for a root type
Add a mapping from the propertyRef (of the old type) to the
corresponding property in the new type.
NOTE: Only to be used by StructuredTypeInfo
Adds a new property reference to the list of desired properties
NOTE: Only to be used by StructuredTypeInfo
Determines the offset for structured types in Flattened type. For instance, if the original type is of the form:
{ int X, ComplexType Y }
and the flattened type is of the form:
{ int X, Y_ComplexType_Prop1, Y_ComplexType_Prop2 }
GetNestedStructureOffset(Y) returns 1
Complex property.
Offset.
Try get the new property for the supplied propertyRef
property reference (on the old type)
throw if the property is not found
the corresponding property on the new type
Kind of the typeid column (if any)
Datatype of the typeid column (if any)
Flattened record version of the type
TypeUsage that encloses the Flattened record version of the type
Gets map information for types mapped using simple discriminator pattern.
Get the property describing the entityset (if any)
Get the list of property refs for this type
The typeid property in the flattened type - applies only to nominal types
this will be used as the type discriminator column.
Transformation rules for ScalarOps
We perform the following simple transformation for CaseOps. If every single
then/else expression in the CaseOp is equivalent, then we can simply replace
the Op with the first then/expression. Specifically,
case when w1 then t1 when w2 then t2 ... when wn then tn else e end
=> t1
assuming that t1 is equivalent to t2 is equivalent to ... to e
Rule Processing context
The current subtree for the CaseOp
the (possibly) modified subtree
true, if we performed any transformations
Try and collapse the case expression into a single expression.
If every single then/else expression in the CaseOp is equivalent, then we can
simply replace the CaseOp with the first then/expression. Specifically,
case when w1 then t1 when w2 then t2 ... when wn then tn else e end
=> t1
if t1 is equivalent to t2 is equivalent to ... to e
current subtree
new subtree
true, if we performed a transformation
Try and remove spurious branches from the case expression.
If any of the WHEN clauses is the 'FALSE' expression, simply remove that
branch (when-then pair) from the case expression.
If any of the WHEN clauses is the 'TRUE' expression, then all branches to the
right of it are irrelevant - eliminate them. Eliminate this branch as well,
and make the THEN expression of this branch the ELSE expression for the entire
Case expression. If the WHEN expression represents the first branch, then
replace the entire case expression by the corresponding THEN expression
rule processing context
current caseOp
Current subtree
the new subtree
true, if there was a transformation
If the else clause of the CaseOp is another CaseOp, when two can be collapsed into one.
In particular,
CASE
WHEN W1 THEN T1
WHEN W2 THEN T2 ...
ELSE (CASE
WHEN WN1 THEN TN1, …
ELSE E)
Is transformed into
CASE
WHEN W1 THEN T1
WHEN W2 THEN T2 ...
WHEN WN1 THEN TN1 ...
ELSE E
current subtree
new subtree
true, if we performed a transformation
Convert an Equals(X, Y) to a "true" predicate if X=Y, or a "false" predicate if X!=Y
Convert a NotEquals(X,Y) in the reverse fashion
Rule processing context
current node
possibly modified subtree
true, if transformation was successful
Transform
AND(x, true) => x;
AND(true, x) => x
AND(x, false) => false
AND(false, x) => false
Rule Processing context
Current LogOp (And, Or, Not) node
constant predicate node
The other child of the LogOp (possibly null)
new subtree
transformation status
Convert a
IsNull(constant)
to just the
False predicate
new subtree
Convert an IsNull(null) to just the 'true' predicate
new subtree
eliminates nested null casts into a single cast of the outermost cast type.
basically the transformation applied is: cast(null[x] as T) => null[t]
modified subtree
Convert a
IsNull(VarRef(v))
to just the
False predicate
if v is guaranteed to be non nullable.
new subtree
SetOp Transformation Rules
Process a SetOp when one of the inputs is an emptyset.
An emptyset is represented by a Filter(X, ConstantPredicate)
where the ConstantPredicate has a value of "false"
The general rules are
UnionAll(X, EmptySet) => X
UnionAll(EmptySet, X) => X
Intersect(EmptySet, X) => EmptySet
Intersect(X, EmptySet) => EmptySet
Except(EmptySet, X) => EmptySet
Except(X, EmptySet) => X
These rules then translate into
UnionAll: return the non-empty input
Intersect: return the empty input
Except: return the "left" input
Rule processing context
the current setop tree
transformed subtree
transformation status
A "simple" property ref - represents a simple property of the type
Simple constructor
the property metadata
Overrides the default equality function. Two SimplePropertyRefs are
equal, if they describe the same property
Overrides the default hashcode function.
Simply returns the hashcode for the property instead
Gets the property metadata
Rules for SingleRowOp
Convert a
SingleRowOp(X) => X
if X produces at most one row
Rule Processing context
Current subtree
transformed subtree
Transformation status
Convert
SingleRowOp(Project) => Project(SingleRowOp)
Rule Processing context
current subtree
transformeed subtree
transformation status
Transformation Rules for SortOp
If the SortOp's input is guaranteed to produce at most 1 row, remove the node with the SortOp:
Sort(X) => X, if X is guaranteed to produce no more than 1 row
Rule processing context
current subtree
transformed subtree
transformation status
Removes all sort nodes from the given command except for the top most one
(the child of the root PhysicalProjectOp node) if any
The only sort node that should not be removed, if any
Keeps track of changed nodes to allow to only recompute node info when needed.
Iterates over all children.
If any of the children changes, update the node info.
This is safe to do because the only way a child can change is
if it is a sort node that needs to be removed. The nodes whose children have
chagnged also get tracked.
The current node
If the given node is not the top most SortOp node remove it.
The type flattener module is part of the structured type elimination phase,
and is largely responsible for "flattening" record and nominal types into
flat record types. Additionally, for nominal types, this module produces typeid
values that can be used later to interpret the input data stream.
The goal of this module is to load up information about type and entityset metadata
used in the ITree. This module is part of the "StructuredTypeElimination" phase,
and provides information to help in this process.
This module itself is broken down into multiple parts.
(*) Loading type information: We walk the query tree to identify all references
to structured types and entity sets
(*) Processing entitysets: We walk the list of entitysets, and assign ids to each
entityset. We also create a map of id->entityset metadata in this phase.
(*) Processing types: We then walk the list of types, and process each type. This,
in turn, is also broken into multiple parts:
* Populating the Type Map: we walk the list of reference types and add each of
them to our typeMap, along with their base types.
* TypeId assignment: We assign typeids to each nominal (complextype/entitytype).
This typeid is based on a dewey encoding. The typeid of a type is typically
the typeid of its supertype suffixed by the subtype number of this type within
its supertype. This encoding is intended to support easy type matching
later on in the query - both for exact (IS OF ONLY) and inexact (IS OF) matches.
* Type flattening: We then "explode"/"flatten" each structured type - refs,
entity types, complex types and record types. The result is a flattened type
where every single property of the resulting type is a primitive/scalar type
(Note: UDTs are considered to be scalar types). Additional information may also
be encoded as a type property. For example, a typeid property is added (if
necessary) to complex/entity types to help discriminate polymorphic instances.
An EntitySetId property is added to ref and entity type attributes to help
determine the entity set that a given entity instance comes from.
As part of type flattening, we keep track of additional information that allows
us to map easily from the original property to the properties in the new type
The final result of this processing is an object that contains:
* a TypeInfo (extra type information) for each structured type in the query
* a map from typeid value to type. To be used later by result assembly
* a map between entitysetid value and entityset. To be used later by result assembly
NOTE: StructuredTypeInfo is probably not the best name for this class, since
it doesn't derive from TypeInfo but rather manages a collection of them.
I don't have a better name, but if you come up with one change this.
Process Driver
structured types referenced in the query
entitysets referenced in the query
entity types that have "free-floating" entity constructors
information on optimized discriminator patterns for entity sets
helper for rel properties
which types need a null sentinel
Fills the StructuredTypeInfo instance from the itree provided.
referenced structured types
referenced entitysets
free-floating entityConstructor types
discriminator information for entity sets mapped using TPH pattern
helper for rel properties
Gets the "single" entityset that stores instances of this type
Get the entitysetid value for a given entityset
the entityset
entitysetid value
Gets entity sets referenced by the query.
entity sets
Find the TypeInfo entry for a type. For non-structured types, we always
return null. For structured types, we return the entry in the typeInfoMap.
If we don't find one, and the typeInfoMap has already been populated, then we
assert
the type to look up
the typeinfo for the type (null if we couldn't find one)
Add a new entry to the entityTypeToSet map
entity type
entityset producing this type
Handle any relevant processing for entity sets
referenced entitysets
free-floating entity constructor types
Handle discriminator maps (determine which can safely be used in the query)
Assign ids to each entityset in the query
referenced entitysets
Process all types in the query
referenced types
Build up auxilliary information for each referenced type in the query
Tries to lookup custom discriminator map for the given type (applies to EntitySets with
TPH discrimination pattern)
Create a TypeInfo (if necessary) for the type, and add it to the TypeInfo map
the type to process
Add a new entry to the map. If an entry already exists, then this function
simply returns the existing entry. Otherwise a new entry is created. If
the type has a supertype, then we ensure that the supertype also exists in
the map, and we add our info to the supertype's list of subtypes
New type to add
type discriminator map
The TypeInfo for this type
Assigns typeids to each type in the map.
We walk the map looking only for "root" types, and call the function
above to process root types. All other types will be handled in that
function
Assign a typeid to a root type
Assigns typeids to each subtype of the current type.
Assertion: the current type has already had a typeid assigned to it.
The current type
Assign a typeid to a non-root type.
Assigns typeids to a non-root type based on a dewey encoding scheme.
The typeid will be the typeId of the supertype suffixed by a
local identifier for the type.
the non-root type
position in the subtype list
A type needs a type-id property if it is an entity type or a complex tpe that
has subtypes.
Coming soon: relax the "need subtype" requirement (ie) any entity/complex type will
have a typeid
A type needs a null-sentinel property if it is an row type that was projected
at the top level of the query; we capture that information in the preprocessor
and pass it in here.
The type needs an entitysetidproperty, if it is either an entity type
or a reference type, AND we cannot determine that there is only entityset
in the query that could be producing instances of this entity
"Explode" each type in the dictionary. (ie) for each type, get a flattened
list of all its members (including special cases for the typeid)
"Explode" a type. (ie) produce a flat record type with one property for each
scalar property (top-level or nested) of the original type.
Really deals with structured types, but also
peels off collection wrappers
the type to explode
the typeinfo for this type (with the explosion)
Type Explosion - simply delegates to the root type
type info
"Explode" a root type. (ie) add each member of the type to a flat list of
members for the supertype.
Type explosion works in a DFS style model. We first walk through the
list of properties for the current type, and "flatten" out the properties
that are themselves "structured". We then target each subtype (recursively)
and perform the same kind of processing.
Consider a very simple case:
Q = (z1 int, z2 date)
Q2: Q = (z3 string) -- Q2 is a subtype of Q
T = (a int, b Q, c date)
S: T = (d int) -- read as S is a subtype of T
The result of flattening T (and S) will be
(a int, b.z1 int, b.z2 date, b.z3 string, c date, d int)
the root type to explode
Helper for ExplodeType.
Walks through each member introduced by the current type, and
adds it onto the "flat" record type being constructed.
We then walk through all subtypes of this type, and process those as
well.
Special handling for Refs: we only add the keys; there is no
need to handle subtypes (since they won't be introducing anything
different)
type in the type hierarchy
Add the list of rel-properties for this type
the type to process
Create the flattened record type for the type.
Walk through the list of property refs, and creates a new field
(which we name as "F1", "F2" etc.) with the required property type.
We then produce a mapping from the original property (propertyRef really)
to the new property for use in later modules.
Finally, we identify the TypeId and EntitySetId property if they exist
Get the "new" type corresponding to the input type. For structured types,
we return the flattened record type.
For collections of structured type, we return a new collection type of the corresponding flattened
type.
For enum types we return the underlying type of the enum type.
For strong spatial types we return the union type that includes the strong spatial type.
For everything else, we return the input type
the original type
the new type (if any)
Get the datatype for a propertyRef. The only concrete classes that we
handle are TypeIdPropertyRef, and BasicPropertyRef.
AllPropertyRef is illegal here.
For BasicPropertyRef, we simply pick up the type from the corresponding
property. For TypeIdPropertyRef, we use "string" as the default type
or the discriminator property type where one is available.
typeinfo of the current type
current property ref
the datatype of the property
Get the root entity type for a type
entity type
Mapping from entitysetid-s to entitysets
Get a helper for rel properties
Finds the record (Row) types that we're projecting out of the query, and
ensures that we mark them as needing a nullable sentinel, so when we
flatten them later we'll have one added.
VarRefColumnMap
Recursively add any Row types to the list of types needing a sentinel.
Marks the given typeUsage as needing a null sentinel.
Call this method instead of calling Add over the HashSet directly, to ensure consistency.
The StructuredVarInfo class contains information about a structured type Var
and how it can be replaced. This is targeted towards Vars of complex/record/
entity/ref types, and the goal is to replace all such Vars in this module.
Constructor
new "flat" record type corresponding to the Var's datatype
List of vars to replace current Var
List of properties in the "flat" record type
Do the new vars include a var that represents a null sentinel either for this type or for any nested type
Get the Var corresponding to a specific property
the requested property
the corresponding Var
true, if the Var was found
Initialize mapping from properties to the corresponding Var
Gets for this . Always
.
The NewVars property of the VarInfo is a list of the corresponding
"scalar" Vars that can be used to replace the current Var. This is
mainly intended for use by other RelOps that maintain lists of Vars
- for example, the "Vars" property of ProjectOp and other similar
locations.
The Fields property is matched 1-1 with the NewVars property, and
specifies the properties of the record type corresponding to the
original VarType
Indicates whether any of the vars in NewVars 'derives'
from a null sentinel. For example, for a type that is a Record with two
nested records, if any has a null sentinel, it would be set to true.
It is used when expanding sort keys, to be able to indicate that there is a
sorting operation that includes null sentinels. This indication is later
used by transformation rules.
The NewType property describes the new "flattened" record type
that is a replacement for the original type of the Var
Returns the NewType wrapped in a TypeUsage
The list of all transformation rules to apply
A lookup table for built from all rules
The lookup table is an array indexed by OpType and each entry has a list of rules.
A lookup table for built only from ProjectRules
The lookup table is an array indexed by OpType and each entry has a list of rules.
A lookup table built only from rules that use key info
The lookup table is an array indexed by OpType and each entry has a list of rules.
A lookup table built only from rules that rely on nullability of vars and other rules
that may be able to perform simplificatios if these have been applied.
The lookup table is an array indexed by OpType and each entry has a list of rules.
A look-up table of rules that may cause modifications such that projection pruning may be useful
after they have been applied.
A look-up table of rules that may cause modifications such that reapplying the nullability rules
may be useful after they have been applied.
Apply the rules that belong to the specified group to the given query tree.
Apply the rules that belong to the specified rules table to the given query tree.
is projection pruning required after the rule application
Whether any rule has been applied after which reapplying nullability rules may be useful
Remap the given subree using the current remapper
Adds a mapping from oldVar to newVar
"Remap" an expression tree, replacing all references to vars in varMap with
copies of the corresponding expression
The subtree is modified *inplace* - it is the caller's responsibility to make
a copy of the subtree if necessary.
The "replacement" expression (the replacement for the VarRef) is copied and then
inserted into the appropriate location into the subtree.
Note: we only support replacements in simple ScalarOp trees. This must be
validated by the caller.
Current subtree to process
The updated subtree
Makes a copy of the appropriate subtree - with a simple accelerator for VarRefOp
since that's likely to be the most command case
the subtree to copy
the copy of the subtree
Checks to see if the current subtree only contains ScalarOps
current subtree
true, if the subtree contains only ScalarOps
Is the given var guaranteed to be non-nullable with regards to the node
that is currently being processed.
True, if it is listed as such on any on the node infos on any of the
current relop ancestors.
Is the op not safe for null sentinel value change
Does the given subtree contain a node with an op that
is not safer for null sentinel value change
Is this is a scalar-op tree? Also return a dictionary of var refcounts (ie)
for each var encountered in the tree, determine the number of times it has
been seen
current subtree
dictionary of var refcounts to fill in
Get a mapping from Var->Expression for a VarDefListOp tree. This information
will be used by later stages to replace all references to the Vars by the
corresponding expressions
This function uses a few heuristics along the way. It uses the varRefMap
parameter to determine if a computed Var (defined by this VarDefListOp)
has been referenced multiple times, and if it has, it checks to see if
the defining expression is too big (> 100 nodes). This is to avoid
bloating up the entire query tree with too many copies.
The varDefListOp subtree
ref counts for each referenced var
mapping from Var->replacement xpressions
Builds a NULLIF expression (ie) a Case expression that looks like
CASE WHEN v is null THEN null ELSE expr END
where v is the conditionVar parameter, and expr is the value of the expression
when v is non-null
null discriminator var
expression
Shut off filter pushdown for this subtree
Is filter pushdown shut off for this subtree?
Given a list of vars try to get one that is of type Int32
Callback function to invoke *before* rules are applied.
Calls the VarRemapper to update any Vars in this node, and recomputes
the nodeinfo
Callback function to invoke *before* rules are applied.
Calls the VarRemapper to update any Vars in the entire subtree
If the given node has a RelOp it is pushed on the relOp ancestors stack.
If the given node has a RelOp it is popped from the relOp ancestors stack.
Callback function to invoke *after* rules are applied
Recomputes the node info, if this node has changed
If the rule is among the rules after which projection pruning may be beneficial,
m_projectionPrunningRequired is set to true.
If the rule is among the rules after which reapplying the nullability rules may be beneficial,
m_reapplyNullabilityRules is set to true.
the rule that was applied
Get the hash value for this subtree
Check to see if the current subtree is a scalar-op subtree (ie) does
the subtree only comprise of scalarOps?
Additionally, compute the number of non-leaf nodes (ie) nodes with at least one child
that are found in the subtree. Note that this count is approximate - it is only
intended to be used as a hint. It is the caller's responsibility to initialize
nodeCount to a sane value on entry into this function
And finally, if the varRefMap parameter is non-null, we keep track of
how often a Var is referenced within the subtree
The non-leaf-node count and the varRefMap are used by GetVarMap to determine
if expressions can be composed together
root of the subtree
Ref counts for each Var encountered in the subtree
count of non-leaf nodes encountered in the subtree
true, if this node only contains scalarOps
Whether any rule was applied that may have caused modifications such that projection pruning
may be useful
Whether any rule was applied that may have caused modifications such that reapplying
the nullability rules may be useful
Is it safe to use a null sentinel with any value?
It may not be safe if:
1. The top most sort includes null sentinels. If the null sentinel is replaced with a different value
and is used as a sort key it may change the sorting results
2. If any of the ancestors is Distinct, GroupBy, Intersect or Except,
because the null sentinel may be used as a key.
3. If the null sentinel is defined in the left child of an apply it may be used at the right side,
thus in these cases we also verify that the right hand side does not have any Distinct, GroupBy,
Intersect or Except.
Available groups of rules, not necessarily mutually exclusive
The kind of type-id in use
A TypeId propertyref represents a reference to the TypeId property
of a type (complex type, entity type etc.)
Gets the default instance of this type
Friendly string for debugging.
This class is used as a Comparer for Types all through the PlanCompiler.
It has a pretty strict definition of type equality - which pretty much devolves
to equality of the "Identity" of the Type (not the TypeUsage).
NOTE: Unlike other parts of the query pipeline, record types follow
a much stricter equality condition here - the field names must be the same, and
the field types must be equal.
NOTE: Primitive types are considered equal, if their Identities are equal. This doesn't
take into account any of the facets that are represented external to the type (size, for instance).
Again, this is different from other parts of the query pipeline; and we're much stricter here
Is this a structured type?
Note: Structured, in this context means structured outside the server.
UDTs for instance, are considered to be scalar types - all WinFS types,
would by this argument, be scalar types.
The type to check
true, if the type is a structured type
Is this type a collection type?
the current type
true, if this is a collection type
Is this type an enum type?
the current type
true, if this is an enum type
Create a new collection type based on the supplied element type
element type of the collection
the new collection type
Kind of VarInfo
The VarInfo is of type.
The VarInfo is of type.
The VarInfo is of type.
The VarInfo map maintains a mapping from Vars to their corresponding VarInfo
It is logically a Dictionary
Default constructor
Create a new VarInfo for a structured type Var
The structured type Var
"Mapped" type for v
List of vars corresponding to v
Flattened Properties
Do the new vars include a var that represents a null sentinel either for this type or for any nested type
the VarInfo
Create a new VarInfo for a structured type Var where the newVars cannot include a null sentinel
The structured type Var
"Mapped" type for v
List of vars corresponding to v
Flattened Properties
Create a VarInfo for a collection typed Var
The collection-typed Var
the new Var
the VarInfo
Creates a var info for var variables of primitive or enum type.
Current variable of primitive or enum type.
The new variable replacing .
for .
Return the VarInfo for the specified var (if one exists, of course)
The Var
the corresponding VarInfo
This is a halper module for
The VarRefManager keeps track of the child-parent relationships in order to be able
to decide whether a given var is referenced by children on right-side relatives of a given node.
It is used in JoinElimination when deciding whether it is possible to eliminate the child table participating
in a left-outer join when there is a 1 - 0..1 FK relationship.
Constructs a new VarRefManager given a command.
Tracks the information that the given node is a parent of its children (one level only)
Determines whether any var from a given list of keys is referenced by any of defining node's right relatives,
with the exception of the relatives brunching at the given targetJoinNode.
A list of vars to check for
The node considered to be the defining node
The relatives branching at this node are skipped
False, only it can determine that not a single var from a given list of keys is referenced by any of defining node's right relatives, with the exception of the relatives brunching at the given targetJoinNode.
Checks whether the given node has references to any of the vars in the given VarVec.
It only checks the given node, not its children.
The node to check
The list of vars to check for
The index of the node's subree from which this var is coming. This is used for SetOp-s, to be able to locate the appropriate var map that will give the vars corresponding to the given once
If the OpType of the node's Op is such that it 'hides' the input, i.e. the decision of whether the given vars are referenced can be made on this level, it returns true, false otherwise
True if the given node has references to any of the vars in the given VarVec, false otherwise
Does the gvien VarList overlap with the given VarVec
Do the two given varVecs overlap
Does the given list of sort keys contain a key with a var that is the given VarVec
Does the list of outputs of the given SetOp contain a var
from the given VarVec defined by the SetOp's child with the given index
DbDataReader functionality for the bridge.
Object that holds the state needed by the coordinator and the root enumerator
Enumerator over shapers for NextResult() calls.
Null for nested data readers (depth > 0);
The coordinator we're responsible for returning results for.
The default record (pre-read/past-end) state
We delegate to this on our getters, to avoid duplicate code.
Do we have a row to read? Determined in the constructor and
should not be changed.
Set to true only when we've been closed through the Close() method
0 if initialization hasn't been performed, 1 otherwise
Runs the initialization if it hasn't been run
An asynchronous version of , which
runs the initialization if it hasn't been run
Ensures that the reader is actually open, and throws an exception if not
Implicitly close this (nested) data reader; will be called whenever
the user has done a GetValue() or a Read() on a parent reader/record
to ensure that we consume all our results. We do that because we
our design requires us to be positioned at the next nested reader's
first row.
An asynchronous version of , which
implicitly closes this (nested) data reader; will be called whenever
the user has done a GetValue() or a ReadAsync() on a parent reader/record
to ensure that we consume all our results. We do that because we
our design requires us to be positioned at the next nested reader's
first row.
Reads to the end of the source enumerator provided
An asynchronous version of , which
reads to the end of the source enumerator provided
Figure out the CLR type from the TypeMetadata object; For scalars,
we can get this from the metadata workspace, but for the rest, we
just guess at "Object". You need to use the DataRecordInfo property
to get better information for those.
Internal read method; does the work of advancing the root enumerator
as needed and determining whether it's current record is for our
coordinator. The public Read method does the assertions and such that
we don't want to do when we're called from internal methods to do things
like consume the rest of the reader's contents.
DbDataRecord functionality for the bridge.
How deep down the hierarchy are we?
Where the data comes from
The current record that we're responsible for; this will change from row to row
on the source data reader. Will be set to null when parent the enumerator has
returned false.
Current state of the record;
the column ordinal of the last column read, used to enforce sequential access
the last data offset of a read returned, used to enforce sequential access
the last ordinal that IsDBNull was called for; used to avoid re-reading the value;
value, of the last column that IsDBNull was called for; used to avoid re-reading the value;
Set to the current data record when we hand them out. (For data reader columns,
we use it's attached data record) The Close, GetValue and Read methods ensures
that this is implicitly closed when we move past it.
Called by our owning datareader when it is explicitly closed; will
not be called for nested structures, they go through the ClosedImplicitly.
path instead.
An asynchronous version of , which
is called by our owning datareader when it is explicitly closed; will
not be called for nested structures, they go through the ClosedImplicitly.
path instead.
Called by our parent object to ensure that we're marked as implicitly
closed; will not be called for root level data readers.
An asynchronous version of , which
is called by our parent object to ensure that we're marked as implicitly
closed; will not be called for root level data readers.
Ensure that whatever column we're currently processing is implicitly closed;
An asynchronous version of , which
Ensure that whatever column we're currently processing is implicitly closed;
Should be called after each Read on the data reader.
Ensures that the reader is actually open, and throws an exception if not
Helper method.
Ensures that sequential access rules are being obeyed for non-array
getter methods, throws the appropriate exception if not. Also ensures
that the last column and array offset is set appropriately.
Ensures that sequential access rules are being obeyed for array offset
getter methods, throws the appropriate exception if not. Also ensures
that the last column and array offset is set appropriately.
Helper method to get the edm TypeUsage for the specified column;
If the column requested is a record, we'll pick up whatever the
current record says it is, otherwise we'll take whatever was stored
on our record state.
implementation of DbDataRecord.GetDataTypeName() method
implementation of DbDataRecord.GetFieldType() method
implementation of DbDataRecord.GetName() method
implementation of DbDataRecord.GetOrdinal() method
implementation for DbDataRecord.GetValue() method
This method is used by most of the column getters on this
class to retrieve the value from the source reader. Therefore,
it asserts all the good things, like that the reader is open,
and that it has data, and that you're not trying to circumvent
sequential access requirements.
For nested objects (records/readers) we have a bit more work to do; this
method extracts it all out from the main GetValue method so it doesn't
have to be so big.
implementation for DbDataRecord.GetValues() method
implementation of DbDataRecord.GetBoolean() method
implementation of DbDataRecord.GetByte() method
implementation of DbDataRecord.GetChar() method
implementation of DbDataRecord.GetDateTime() method
implementation of DbDataRecord.GetDecimal() method
implementation of DbDataRecord.GetDouble() method
implementation of DbDataRecord.GetFloat() method
implementation of DbDataRecord.GetGuid() method
implementation of DbDataRecord.GetInt16() method
implementation of DbDataRecord.GetInt32() method
implementation of DbDataRecord.GetInt64() method
implementation of DbDataRecord.GetString() method
implementation of DbDataRecord.IsDBNull() method
implementation for DbDataRecord.GetBytes() method
implementation for DbDataRecord.GetChars() method
implementation for DbDataRecord.GetData() method
implementation for DbDataRecord.GetDataRecord() method
Used to return a nested result
True when the record has data (SetRecordSource was called with true)
True so long as we haven't been closed either implicity or explictly
Determine whether we have been explicitly closed by our owning
data reader; only data records that are responsible for processing
data reader requests can be explicitly closed;
Determine whether the parent data reader or record moved on from
where we can be considered open, (because the consumer of the
parent data reader/record called either the GetValue() or Read()
methods on the parent);
implementation of DbDataRecord.DataRecordInfo property
implementation of DbDataRecord.FieldCount property
implementation for DbDataRecord[ordinal] indexer property
implementation for DbDataRecord[name] indexer property
Provides common language runtime (CLR) methods that expose EDM canonical functions
for use in or LINQ to Entities queries.
Note that this class was called EntityFunctions in some previous versions of Entity Framework.
When used as part of a LINQ to Entities query, this method invokes the canonical StDev EDM function to calculate
the standard deviation of the collection.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The collection over which to perform the calculation.
The standard deviation.
When used as part of a LINQ to Entities query, this method invokes the canonical StDev EDM function to calculate
the standard deviation of the collection.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The collection over which to perform the calculation.
The standard deviation.
When used as part of a LINQ to Entities query, this method invokes the canonical StDev EDM function to calculate
the standard deviation of the collection.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The collection over which to perform the calculation.
The standard deviation.
When used as part of a LINQ to Entities query, this method invokes the canonical StDev EDM function to calculate
the standard deviation of the collection.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The collection over which to perform the calculation.
The standard deviation.
When used as part of a LINQ to Entities query, this method invokes the canonical StDev EDM function to calculate
the standard deviation of the collection.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The collection over which to perform the calculation.
The standard deviation.
When used as part of a LINQ to Entities query, this method invokes the canonical StDev EDM function to calculate
the standard deviation of the collection.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The collection over which to perform the calculation.
The standard deviation.
When used as part of a LINQ to Entities query, this method invokes the canonical StDev EDM function to calculate
the standard deviation of the collection.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The collection over which to perform the calculation.
The standard deviation.
When used as part of a LINQ to Entities query, this method invokes the canonical StDev EDM function to calculate
the standard deviation of the collection.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The collection over which to perform the calculation.
The standard deviation.
When used as part of a LINQ to Entities query, this method invokes the canonical StDevP EDM function to calculate
the standard deviation for the population.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The collection over which to perform the calculation.
The standard deviation for the population.
When used as part of a LINQ to Entities query, this method invokes the canonical StDevP EDM function to calculate
the standard deviation for the population.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The collection over which to perform the calculation.
The standard deviation for the population.
When used as part of a LINQ to Entities query, this method invokes the canonical StDevP EDM function to calculate
the standard deviation for the population.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The collection over which to perform the calculation.
The standard deviation for the population.
When used as part of a LINQ to Entities query, this method invokes the canonical StDevP EDM function to calculate
the standard deviation for the population.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The collection over which to perform the calculation.
The standard deviation for the population.
When used as part of a LINQ to Entities query, this method invokes the canonical StDevP EDM function to calculate
the standard deviation for the population.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The collection over which to perform the calculation.
The standard deviation for the population.
When used as part of a LINQ to Entities query, this method invokes the canonical StDevP EDM function to calculate
the standard deviation for the population.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The collection over which to perform the calculation.
The standard deviation for the population.
When used as part of a LINQ to Entities query, this method invokes the canonical StDevP EDM function to calculate
the standard deviation for the population.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The collection over which to perform the calculation.
The standard deviation for the population.
When used as part of a LINQ to Entities query, this method invokes the canonical StDevP EDM function to calculate
the standard deviation for the population.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The collection over which to perform the calculation.
The standard deviation for the population.
When used as part of a LINQ to Entities query, this method invokes the canonical Var EDM function to calculate
the variance of the collection.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The collection over which to perform the calculation.
The variance.
When used as part of a LINQ to Entities query, this method invokes the canonical Var EDM function to calculate
the variance of the collection.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The collection over which to perform the calculation.
The variance.
When used as part of a LINQ to Entities query, this method invokes the canonical Var EDM function to calculate
the variance of the collection.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The collection over which to perform the calculation.
The variance.
When used as part of a LINQ to Entities query, this method invokes the canonical Var EDM function to calculate
the variance of the collection.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The collection over which to perform the calculation.
The variance.
When used as part of a LINQ to Entities query, this method invokes the canonical Var EDM function to calculate
the variance of the collection.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The collection over which to perform the calculation.
The variance.
When used as part of a LINQ to Entities query, this method invokes the canonical Var EDM function to calculate
the variance of the collection.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The collection over which to perform the calculation.
The variance.
When used as part of a LINQ to Entities query, this method invokes the canonical Var EDM function to calculate
the variance of the collection.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The collection over which to perform the calculation.
The variance.
When used as part of a LINQ to Entities query, this method invokes the canonical Var EDM function to calculate
the variance of the collection.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The collection over which to perform the calculation.
The variance.
When used as part of a LINQ to Entities query, this method invokes the canonical VarP EDM function to calculate
the variance for the population.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The collection over which to perform the calculation.
The variance for the population.
When used as part of a LINQ to Entities query, this method invokes the canonical VarP EDM function to calculate
the variance for the population.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The collection over which to perform the calculation.
The variance for the population.
When used as part of a LINQ to Entities query, this method invokes the canonical VarP EDM function to calculate
the variance for the population.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The collection over which to perform the calculation.
The variance for the population.
When used as part of a LINQ to Entities query, this method invokes the canonical VarP EDM function to calculate
the variance for the population.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The collection over which to perform the calculation.
The variance for the population.
When used as part of a LINQ to Entities query, this method invokes the canonical VarP EDM function to calculate
the variance for the population.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The collection over which to perform the calculation.
The variance for the population.
When used as part of a LINQ to Entities query, this method invokes the canonical VarP EDM function to calculate
the variance for the population.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The collection over which to perform the calculation.
The variance for the population.
When used as part of a LINQ to Entities query, this method invokes the canonical VarP EDM function to calculate
the variance for the population.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The collection over which to perform the calculation.
The variance for the population.
When used as part of a LINQ to Entities query, this method invokes the canonical VarP EDM function to calculate
the variance for the population.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The collection over which to perform the calculation.
The variance for the population.
When used as part of a LINQ to Entities query, this method invokes the canonical Left EDM function to return a given
number of the leftmost characters in a string.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The input string.
The number of characters to return
A string containing the number of characters asked for from the left of the input string.
When used as part of a LINQ to Entities query, this method invokes the canonical Right EDM function to return a given
number of the rightmost characters in a string.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The input string.
The number of characters to return
A string containing the number of characters asked for from the right of the input string.
When used as part of a LINQ to Entities query, this method invokes the canonical Reverse EDM function to return a given
string with the order of the characters reversed.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The input string.
The input string with the order of the characters reversed.
When used as part of a LINQ to Entities query, this method invokes the canonical GetTotalOffsetMinutes EDM function to
return the number of minutes that the given date/time is offset from UTC. This is generally between +780
and -780 (+ or - 13 hrs).
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The date/time value to use.
The offset of the input from UTC.
When used as part of a LINQ to Entities query, this method invokes the canonical TruncateTime EDM function to return
the given date with the time portion cleared.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The date/time value to use.
The input date with the time portion cleared.
When used as part of a LINQ to Entities query, this method invokes the canonical TruncateTime EDM function to return
the given date with the time portion cleared.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The date/time value to use.
The input date with the time portion cleared.
When used as part of a LINQ to Entities query, this method invokes the canonical CreateDateTime EDM function to
create a new object.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The year.
The month (1-based).
The day (1-based).
The hours.
The minutes.
The seconds, including fractional parts of the seconds if desired.
The new date/time.
When used as part of a LINQ to Entities query, this method invokes the canonical CreateDateTimeOffset EDM function to
create a new object.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The year.
The month (1-based).
The day (1-based).
The hours.
The minutes.
The seconds, including fractional parts of the seconds if desired.
The time zone offset part of the new date.
The new date/time.
When used as part of a LINQ to Entities query, this method invokes the canonical CreateTime EDM function to
create a new object.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The hours.
The minutes.
The seconds, including fractional parts of the seconds if desired.
The new time span.
When used as part of a LINQ to Entities query, this method invokes the canonical AddYears EDM function to
add the given number of years to a date/time.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The input date/time.
The number of years to add.
A resulting date/time.
When used as part of a LINQ to Entities query, this method invokes the canonical AddYears EDM function to
add the given number of years to a date/time.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The input date/time.
The number of years to add.
A resulting date/time.
When used as part of a LINQ to Entities query, this method invokes the canonical AddMonths EDM function to
add the given number of months to a date/time.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The input date/time.
The number of months to add.
A resulting date/time.
When used as part of a LINQ to Entities query, this method invokes the canonical AddMonths EDM function to
add the given number of months to a date/time.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The input date/time.
The number of months to add.
A resulting date/time.
When used as part of a LINQ to Entities query, this method invokes the canonical AddDays EDM function to
add the given number of days to a date/time.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The input date/time.
The number of days to add.
A resulting date/time.
When used as part of a LINQ to Entities query, this method invokes the canonical AddDays EDM function to
add the given number of days to a date/time.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The input date/time.
The number of days to add.
A resulting date/time.
When used as part of a LINQ to Entities query, this method invokes the canonical AddHours EDM function to
add the given number of hours to a date/time.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The input date/time.
The number of hours to add.
A resulting date/time.
When used as part of a LINQ to Entities query, this method invokes the canonical AddHours EDM function to
add the given number of hours to a date/time.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The input date/time.
The number of hours to add.
A resulting date/time.
When used as part of a LINQ to Entities query, this method invokes the canonical AddHours EDM function to
add the given number of hours to a time span.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The input date/time.
The number of hours to add.
A resulting time span.
When used as part of a LINQ to Entities query, this method invokes the canonical AddMinutes EDM function to
add the given number of minutes to a date/time.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The input date/time.
The number of minutes to add.
A resulting date/time.
When used as part of a LINQ to Entities query, this method invokes the canonical AddMinutes EDM function to
add the given number of minutes to a date/time.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The input date/time.
The number of minutes to add.
A resulting date/time.
When used as part of a LINQ to Entities query, this method invokes the canonical AddMinutes EDM function to
add the given number of minutes to a time span.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The input date/time.
The number of minutes to add.
A resulting time span.
When used as part of a LINQ to Entities query, this method invokes the canonical AddSeconds EDM function to
add the given number of seconds to a date/time.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The input date/time.
The number of seconds to add.
A resulting date/time.
When used as part of a LINQ to Entities query, this method invokes the canonical AddSeconds EDM function to
add the given number of seconds to a date/time.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The input date/time.
The number of seconds to add.
A resulting date/time.
When used as part of a LINQ to Entities query, this method invokes the canonical AddSeconds EDM function to
add the given number of seconds to a time span.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The input date/time.
The number of seconds to add.
A resulting time span.
When used as part of a LINQ to Entities query, this method invokes the canonical AddMilliseconds EDM function to
add the given number of milliseconds to a date/time.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The input date/time.
The number of milliseconds to add.
A resulting date/time.
When used as part of a LINQ to Entities query, this method invokes the canonical AddMilliseconds EDM function to
add the given number of milliseconds to a date/time.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The input date/time.
The number of milliseconds to add.
A resulting date/time.
When used as part of a LINQ to Entities query, this method invokes the canonical AddMilliseconds EDM function to
add the given number of milliseconds to a time span.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The input date/time.
The number of milliseconds to add.
A resulting time span.
When used as part of a LINQ to Entities query, this method invokes the canonical AddMicroseconds EDM function to
add the given number of microseconds to a date/time.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The input date/time.
The number of microseconds to add.
A resulting date/time.
When used as part of a LINQ to Entities query, this method invokes the canonical AddMicroseconds EDM function to
add the given number of microseconds to a date/time.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The input date/time.
The number of microseconds to add.
A resulting date/time.
When used as part of a LINQ to Entities query, this method invokes the canonical AddMicroseconds EDM function to
add the given number of microseconds to a time span.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The input date/time.
The number of microseconds to add.
A resulting time span.
When used as part of a LINQ to Entities query, this method invokes the canonical AddNanoseconds EDM function to
add the given number of nanoseconds to a date/time.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The input date/time.
The number of nanoseconds to add.
A resulting date/time.
When used as part of a LINQ to Entities query, this method invokes the canonical AddNanoseconds EDM function to
add the given number of nanoseconds to a date/time.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The input date/time.
The number of nanoseconds to add.
A resulting date/time.
When used as part of a LINQ to Entities query, this method invokes the canonical AddNanoseconds EDM function to
add the given number of nanoseconds to a time span.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The input date/time.
The number of nanoseconds to add.
A resulting time span.
When used as part of a LINQ to Entities query, this method invokes the canonical DiffYears EDM function to
calculate the number of years between two date/times.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The first date/time.
The second date/time.
The number of years between the first and second date/times.
When used as part of a LINQ to Entities query, this method invokes the canonical DiffYears EDM function to
calculate the number of years between two date/times.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The first date/time.
The second date/time.
The number of years between the first and second date/times.
When used as part of a LINQ to Entities query, this method invokes the canonical DiffMonths EDM function to
calculate the number of months between two date/times.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The first date/time.
The second date/time.
The number of months between the first and second date/times.
When used as part of a LINQ to Entities query, this method invokes the canonical DiffMonths EDM function to
calculate the number of months between two date/times.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The first date/time.
The second date/time.
The number of months between the first and second date/times.
When used as part of a LINQ to Entities query, this method invokes the canonical DiffDays EDM function to
calculate the number of days between two date/times.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The first date/time.
The second date/time.
The number of days between the first and second date/times.
When used as part of a LINQ to Entities query, this method invokes the canonical DiffDays EDM function to
calculate the number of days between two date/times.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The first date/time.
The second date/time.
The number of days between the first and second date/times.
When used as part of a LINQ to Entities query, this method invokes the canonical DiffHours EDM function to
calculate the number of hours between two date/times.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The first date/time.
The second date/time.
The number of hours between the first and second date/times.
When used as part of a LINQ to Entities query, this method invokes the canonical DiffHours EDM function to
calculate the number of hours between two date/times.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The first date/time.
The second date/time.
The number of hours between the first and second date/times.
When used as part of a LINQ to Entities query, this method invokes the canonical DiffHours EDM function to
calculate the number of hours between two time spans.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The first time span.
The second time span.
The number of hours between the first and second time spans.
When used as part of a LINQ to Entities query, this method invokes the canonical DiffMinutes EDM function to
calculate the number of minutes between two date/times.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The first date/time.
The second date/time.
The number of minutes between the first and second date/times.
When used as part of a LINQ to Entities query, this method invokes the canonical DiffMinutes EDM function to
calculate the number of minutes between two date/times.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The first date/time.
The second date/time.
The number of minutes between the first and second date/times.
When used as part of a LINQ to Entities query, this method invokes the canonical DiffMinutes EDM function to
calculate the number of minutes between two time spans.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The first time span.
The second time span.
The number of minutes between the first and second time spans.
When used as part of a LINQ to Entities query, this method invokes the canonical DiffSeconds EDM function to
calculate the number of seconds between two date/times.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The first date/time.
The second date/time.
The number of seconds between the first and second date/times.
When used as part of a LINQ to Entities query, this method invokes the canonical DiffSeconds EDM function to
calculate the number of seconds between two date/times.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The first date/time.
The second date/time.
The number of seconds between the first and second date/times.
When used as part of a LINQ to Entities query, this method invokes the canonical DiffSeconds EDM function to
calculate the number of seconds between two time spans.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The first time span.
The second time span.
The number of seconds between the first and second time spans.
When used as part of a LINQ to Entities query, this method invokes the canonical DiffMilliseconds EDM function to
calculate the number of milliseconds between two date/times.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The first date/time.
The second date/time.
The number of milliseconds between the first and second date/times.
When used as part of a LINQ to Entities query, this method invokes the canonical DiffMilliseconds EDM function to
calculate the number of milliseconds between two date/times.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The first date/time.
The second date/time.
The number of milliseconds between the first and second date/times.
When used as part of a LINQ to Entities query, this method invokes the canonical DiffMilliseconds EDM function to
calculate the number of milliseconds between two time spans.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The first time span.
The second time span.
The number of milliseconds between the first and second time spans.
When used as part of a LINQ to Entities query, this method invokes the canonical DiffMicroseconds EDM function to
calculate the number of microseconds between two date/times.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The first date/time.
The second date/time.
The number of microseconds between the first and second date/times.
When used as part of a LINQ to Entities query, this method invokes the canonical DiffMicroseconds EDM function to
calculate the number of microseconds between two date/times.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The first date/time.
The second date/time.
The number of microseconds between the first and second date/times.
When used as part of a LINQ to Entities query, this method invokes the canonical DiffMicroseconds EDM function to
calculate the number of microseconds between two time spans.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The first time span.
The second time span.
The number of microseconds between the first and second time spans.
When used as part of a LINQ to Entities query, this method invokes the canonical DiffNanoseconds EDM function to
calculate the number of nanoseconds between two date/times.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The first date/time.
The second date/time.
The number of nanoseconds between the first and second date/times.
When used as part of a LINQ to Entities query, this method invokes the canonical DiffNanoseconds EDM function to
calculate the number of nanoseconds between two date/times.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The first date/time.
The second date/time.
The number of nanoseconds between the first and second date/times.
When used as part of a LINQ to Entities query, this method invokes the canonical DiffNanoseconds EDM function to
calculate the number of nanoseconds between two time spans.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The first time span.
The second time span.
The number of nanoseconds between the first and second time spans.
When used as part of a LINQ to Entities query, this method invokes the canonical Truncate EDM function to
truncate the given value to the number of specified digits.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The value to truncate.
The number of digits to preserve.
The truncated value.
When used as part of a LINQ to Entities query, this method invokes the canonical Truncate EDM function to
truncate the given value to the number of specified digits.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function is translated to a corresponding function in the database.
The value to truncate.
The number of digits to preserve.
The truncated value.
When used as part of a LINQ to Entities query, this method acts as an operator that ensures the input
is treated as a Unicode string.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function impacts the way the LINQ query is translated to a query that can be run in the database.
The input string.
The input string treated as a Unicode string.
When used as part of a LINQ to Entities query, this method acts as an operator that ensures the input
is treated as a non-Unicode string.
You cannot call this function directly. This function can only appear within a LINQ to Entities query.
This function impacts the way the LINQ query is translated to a query that can be run in the database.
The input string.
The input string treated as a non-Unicode string.
Describes the state of an entity.
The entity is not being tracked by the context.
An entity is in this state immediately after it has been created with the new operator
or with one of the Create methods.
The entity is being tracked by the context and exists in the database, and its property
values have not changed from the values in the database.
The entity is being tracked by the context but does not yet exist in the database.
The entity is being tracked by the context and exists in the database, but has been marked
for deletion from the database the next time SaveChanges is called.
The entity is being tracked by the context and exists in the database, and some or all of its
property values have been modified.
Represents information about a database connection.
Creates a new instance of DbConnectionInfo representing a connection that is specified in the application configuration file.
The name of the connection string in the application configuration.
Creates a new instance of DbConnectionInfo based on a connection string.
The connection string to use for the connection.
The name of the provider to use for the connection. Use 'System.Data.SqlClient' for SQL Server.
Gets the connection information represented by this instance.
Configuration to use if connection comes from the configuration file.
Gets the of the current instance.
The exact runtime type of the current instance.
Advances the enumerator to the next element in the sequence, returning the result asynchronously.
A Task containing the result of the operation: true if the enumerator was successfully advanced to the next element; false if the enumerator has passed the end of the sequence.
Instances of this class are used to create DbConnection objects for
SQL Server LocalDb based on a given database name or connection string.
An instance of this class can be set on the class or in the
app.config/web.config for the application to cause all DbContexts created with no
connection information or just a database name to use SQL Server LocalDb by default.
This class is immutable since multiple threads may access instances simultaneously
when creating connections.
Implementations of this interface are used to create DbConnection objects for
a type of database server based on a given database name.
An Instance is set on the class to
cause all DbContexts created with no connection information or just a database
name or connection string to use a certain type of database server by default.
Two implementations of this interface are provided:
is used to create connections to Microsoft SQL Server, including EXPRESS editions.
is used to create connections to Microsoft SQL
Server Compact Editions.
Other implementations for other database servers can be added as needed.
Note that implementations should be thread safe or immutable since they may
be accessed by multiple threads at the same time.
Creates a connection based on the given database name or connection string.
The database name or connection string.
An initialized DbConnection.
Creates a new instance of the connection factory for the given version of LocalDb.
For SQL Server 2012 LocalDb use "v11.0".
The LocalDb version to use.
Creates a new instance of the connection factory for the given version of LocalDb.
For SQL Server 2012 LocalDb use "v11.0".
The LocalDb version to use.
The connection string to use for options to the database other than the 'Initial Catalog', 'Data Source', and 'AttachDbFilename'. The 'Initial Catalog' and 'AttachDbFilename' will be prepended to this string based on the database name when CreateConnection is called. The 'Data Source' will be set based on the LocalDbVersion argument.
Creates a connection for SQL Server LocalDb based on the given database name or connection string.
If the given string contains an '=' character then it is treated as a full connection string,
otherwise it is treated as a database name only.
The database name or connection string.
An initialized DbConnection.
The connection string to use for options to the database other than the 'Initial Catalog',
'Data Source', and 'AttachDbFilename'.
The 'Initial Catalog' and 'AttachDbFilename' will be prepended to this string based on the
database name when CreateConnection is called.
The 'Data Source' will be set based on the LocalDbVersion argument.
The default is 'Integrated Security=True;'.
Encapsulates a cloned and store . Note that these
objects are disposable and should be used in a using block to ensure both the cloned context and the
cloned connection are disposed.
For mocking.
Creates a clone of the given . The underlying of
the context is also cloned and the given connection string is used for the connection string of
the cloned connection.
Finds the assemblies that were used for loading o-space types in the source context
and loads those assemblies in the cloned context.
Disposes both the underlying ObjectContext and its store connection.
The cloned context.
This is always the store connection of the underlying ObjectContext.
Represents setting the database initializer for a specific context type
Represents a parameter to be passed to a method
Represents a series of parameters to pass to a method
Adds a new parameter to the collection
Used for unit testing
Represents the configuration for a series of contexts
Represents the configuration for a specific context type
Represents setting the default connection factory
Represents all Entity Framework related configuration
Handles creating databases either using the core provider or the Migrations pipeline.
Creates a database using the core provider (i.e. ObjectContext.CreateDatabase) or
by using Code First Migrations to create an empty database
and the perform an automatic migration to the current model.
A simple representation of an app.config or web.config file.
Initializes a new instance of AppConfig based on supplied configuration
Configuration to load settings from
Initializes a new instance of AppConfig based on supplied connection strings
The default configuration for database initializers and default connection factory will be used
Connection strings to be used
Initializes a new instance of AppConfig based on the for the AppDomain
Use AppConfig.DefaultInstance instead of this constructor
Gets the default connection factory based on the configuration
Gets the specified connection string from the configuration
Name of the connection string to get
The connection string, or null if there is no connection string with the specified name
Gets a singleton instance of configuration based on the for the AppDomain
Acts as a proxy for that for the most part just passes calls
through to the real object but uses virtual methods/properties such that uses of the object
can be mocked.
Calculates the model hash values used the EdmMetadata table from EF 4.1/4.2.
Calculates an SHA256 hash of the EDMX from the given code first model. This is the hash stored in
the database in the EdmMetadata table in EF 4.1/4.2. The hash is always calculated using a v2 schema
as was generated by EF 4.1/4.2 and with the entity included in the model.
Acts as a proxy for that for the most part just passes calls
through to the real object but uses virtual methods/properties such that uses of the object
can be mocked.
An implementation of that will use Code First Migrations
to update the database to the latest version.
Initializes a new instance of the MigrateDatabaseToLatestVersion class.
Initializes a new instance of the MigrateDatabaseToLatestVersion class that will
use a specific connection string from the configuration file to connect to
the database to perform the migration.
The name of the connection string to use for migration.
Helper class that is used to configure a column.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
Creates a new column definition to store Binary data.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
Value indicating whether or not the column allows null values.
The maximum allowable length of the array data.
Value indicating whether or not all data should be padded to the maximum length.
Constant value to use as the default value for this column.
SQL expression used as the default value for this column.
Value indicating whether or not this column should be configured as a timestamp.
The name of the column.
Provider specific data type to use for this column.
The newly constructed column definition.
Creates a new column definition to store Boolean data.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
Value indicating whether or not the column allows null values.
Constant value to use as the default value for this column.
SQL expression used as the default value for this column.
The name of the column.
Provider specific data type to use for this column.
The newly constructed column definition.
Creates a new column definition to store Byte data.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
Value indicating whether or not the column allows null values.
Value indicating whether or not the database will generate values for this column during insert.
Constant value to use as the default value for this column.
SQL expression used as the default value for this column.
The name of the column.
Provider specific data type to use for this column.
The newly constructed column definition.
Creates a new column definition to store DateTime data.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
Value indicating whether or not the column allows null values.
The precision of the column.
Constant value to use as the default value for this column.
SQL expression used as the default value for this column.
The name of the column.
Provider specific data type to use for this column.
The newly constructed column definition.
Creates a new column definition to store Decimal data.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
Value indicating whether or not the column allows null values.
The numeric precision of the column.
The numeric scale of the column.
Constant value to use as the default value for this column.
SQL expression used as the default value for this column.
The name of the column.
Provider specific data type to use for this column.
Value indicating whether or not the database will generate values for this column during insert.
The newly constructed column definition.
Creates a new column definition to store Double data.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
Value indicating whether or not the column allows null values.
Constant value to use as the default value for this column.
SQL expression used as the default value for this column.
The name of the column.
Provider specific data type to use for this column.
The newly constructed column definition.
Creates a new column definition to store GUID data.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
Value indicating whether or not the column allows null values.
Value indicating whether or not the database will generate values for this column during insert.
Constant value to use as the default value for this column.
SQL expression used as the default value for this column.
The name of the column.
Provider specific data type to use for this column.
The newly constructed column definition.
Creates a new column definition to store Single data.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
Value indicating whether or not the column allows null values.
Constant value to use as the default value for this column.
SQL expression used as the default value for this column.
The name of the column.
Provider specific data type to use for this column.
The newly constructed column definition.
Creates a new column definition to store Short data.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
Value indicating whether or not the column allows null values.
Value indicating whether or not the database will generate values for this column during insert.
Constant value to use as the default value for this column.
SQL expression used as the default value for this column.
The name of the column.
Provider specific data type to use for this column.
The newly constructed column definition.
Creates a new column definition to store Integer data.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
Value indicating whether or not the column allows null values.
Value indicating whether or not the database will generate values for this column during insert.
Constant value to use as the default value for this column.
SQL expression used as the default value for this column.
The name of the column.
Provider specific data type to use for this column.
The newly constructed column definition.
Creates a new column definition to store Long data.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
Value indicating whether or not the column allows null values.
Value indicating whether or not the database will generate values for this column during insert.
Constant value to use as the default value for this column.
SQL expression used as the default value for this column.
The name of the column.
Provider specific data type to use for this column.
The newly constructed column definition.
Creates a new column definition to store String data.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
Value indicating whether or not the column allows null values.
The maximum allowable length of the string data.
Value indicating whether or not all data should be padded to the maximum length.
Value indicating whether or not the column supports Unicode content.
Constant value to use as the default value for this column.
SQL expression used as the default value for this column.
The name of the column.
Provider specific data type to use for this column.
The newly constructed column definition.
Creates a new column definition to store Time data.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
Value indicating whether or not the column allows null values.
The precision of the column.
Constant value to use as the default value for this column.
SQL expression used as the default value for this column.
The name of the column.
Provider specific data type to use for this column.
The newly constructed column definition.
Creates a new column definition to store DateTimeOffset data.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
Value indicating whether or not the column allows null values.
The precision of the column.
Constant value to use as the default value for this column.
SQL expression used as the default value for this column.
The name of the column.
Provider specific data type to use for this column.
The newly constructed column definition.
Creates a new column definition to store geography data.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
Value indicating whether or not the column allows null values.
Constant value to use as the default value for this column.
SQL expression used as the default value for this column.
The name of the column.
Provider specific data type to use for this column.
The newly constructed column definition.
Creates a new column definition to store geometry data.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
Value indicating whether or not the column allows null values.
Constant value to use as the default value for this column.
SQL expression used as the default value for this column.
The name of the column.
Provider specific data type to use for this column.
The newly constructed column definition.
Gets the of the current instance.
The exact runtime type of the current instance.
Creates a shallow copy of the current .
A shallow copy of the current .
Helper class that is used to further configure a table being created from a CreateTable call on
.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
Initializes a new instance of the TableBuilder class.
The table creation operation to be further configured.
The migration the table is created in.
Specifies a primary key for the table.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
A lambda expression representing the property to be used as the primary key. C#: t => t.Id VB.Net: Function(t) t.Id If the primary key is made up of multiple properties then specify an anonymous type including the properties. C#: t => new { t.Id1, t.Id2 } VB.Net: Function(t) New With { t.Id1, t.Id2 }
The name of the primary key. If null is supplied, a default name will be generated.
A value indicating whether or not this is a clustered primary key.
Additional arguments that may be processed by providers. Use anonymous type syntax to specify arguments e.g. 'new { SampleArgument = "MyValue" }'.
Itself, so that multiple calls can be chained.
Specifies an index to be created on the table.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
A lambda expression representing the property to be indexed. C#: t => t.PropertyOne VB.Net: Function(t) t.PropertyOne If multiple properties are to be indexed then specify an anonymous type including the properties. C#: t => new { t.PropertyOne, t.PropertyTwo } VB.Net: Function(t) New With { t.PropertyOne, t.PropertyTwo }
A value indicating whether or not this is a unique index.
A value indicating whether or not this is a clustered index.
Additional arguments that may be processed by providers. Use anonymous type syntax to specify arguments e.g. 'new { SampleArgument = "MyValue" }'.
Itself, so that multiple calls can be chained.
Specifies a foreign key constraint to be created on the table.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
Name of the table that the foreign key constraint targets.
A lambda expression representing the properties of the foreign key. C#: t => t.PropertyOne VB.Net: Function(t) t.PropertyOne If multiple properties make up the foreign key then specify an anonymous type including the properties. C#: t => new { t.PropertyOne, t.PropertyTwo } VB.Net: Function(t) New With { t.PropertyOne, t.PropertyTwo }
A value indicating whether or not cascade delete should be configured on the foreign key constraint.
The name of this foreign key constraint. If no name is supplied, a default name will be calculated.
Additional arguments that may be processed by providers. Use anonymous type syntax to specify arguments e.g. 'new { SampleArgument = "MyValue" }'.
Itself, so that multiple calls can be chained.
Gets the of the current instance.
The exact runtime type of the current instance.
Creates a shallow copy of the current .
A shallow copy of the current .
Base class for code-based migrations.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
Operations to be performed during the upgrade process.
Operations to be performed during the downgrade process.
Adds an operation to create a new stored procedure.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
The name of the stored procedure. Schema name is optional, if no schema is specified then dbo is
assumed.
The body of the stored procedure.
The additional arguments that may be processed by providers. Use anonymous type syntax
to specify arguments. For example, 'new { SampleArgument = "MyValue" }'.
Adds an operation to create a new stored procedure.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
The name of the stored procedure. Schema name is optional, if no schema is specified then dbo is
assumed.
The action that specifies the parameters of the stored procedure.
The body of the stored procedure.
The additional arguments that may be processed by providers. Use anonymous type syntax
to specify arguments. For example, 'new { SampleArgument = "MyValue" }'.
The parameters in this create stored procedure operation. You do not need to specify this
type, it will be inferred from the parameter you supply.
Adds an operation to alter a stored procedure.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
The name of the stored procedure. Schema name is optional, if no schema is specified then dbo is
assumed.
The body of the stored procedure.
The additional arguments that may be processed by providers. Use anonymous type syntax
to specify arguments. For example, 'new { SampleArgument = "MyValue" }'.
Adds an operation to alter a stored procedure.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
The parameters in this alter stored procedure operation. You do not need to specify this
type, it will be inferred from the parameter you supply.
The name of the stored procedure. Schema name is optional, if no schema is specified then dbo is
assumed.
The action that specifies the parameters of the stored procedure.
The body of the stored procedure.
The additional arguments that may be processed by providers. Use anonymous type syntax
to specify arguments. For example, 'new { SampleArgument = "MyValue" }'.
Adds an operation to drop an existing stored procedure with the specified name.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
The name of the procedure to drop. Schema name is optional, if no schema is specified then dbo is
assumed.
The additional arguments that may be processed by providers. Use anonymous type syntax
to specify arguments. For example, 'new { SampleArgument = "MyValue" }'.
Adds an operation to create a new table.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
The columns in this create table operation. You do not need to specify this type, it will
be inferred from the columnsAction parameter you supply.
The name of the table. Schema name is optional, if no schema is specified then dbo is assumed.
An action that specifies the columns to be included in the table. i.e. t => new { Id =
t.Int(identity: true), Name = t.String() }
Additional arguments that may be processed by providers. Use anonymous type syntax to
specify arguments e.g. 'new { SampleArgument = "MyValue" }'.
An object that allows further configuration of the table creation operation.
Adds an operation to create a new foreign key constraint.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
The table that contains the foreign key column. Schema name is optional, if no schema is
specified then dbo is assumed.
The foreign key column.
The table that contains the column this foreign key references. Schema name is optional,
if no schema is specified then dbo is assumed.
The column this foreign key references. If no value is supplied the primary key of the
principal table will be referenced.
A value indicating if cascade delete should be configured for the foreign key
relationship. If no value is supplied, cascade delete will be off.
The name of the foreign key constraint in the database. If no value is supplied a unique name will
be generated.
Additional arguments that may be processed by providers. Use anonymous type syntax to
specify arguments e.g. 'new { SampleArgument = "MyValue" }'.
Adds an operation to create a new foreign key constraint.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
The table that contains the foreign key columns. Schema name is optional, if no schema is
specified then dbo is assumed.
The foreign key columns.
The table that contains the columns this foreign key references. Schema name is optional,
if no schema is specified then dbo is assumed.
The columns this foreign key references. If no value is supplied the primary key of the
principal table will be referenced.
A value indicating if cascade delete should be configured for the foreign key
relationship. If no value is supplied, cascade delete will be off.
The name of the foreign key constraint in the database. If no value is supplied a unique name will
be generated.
Additional arguments that may be processed by providers. Use anonymous type syntax to
specify arguments e.g. 'new { SampleArgument = "MyValue" }'.
Adds an operation to drop a foreign key constraint based on its name.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
The table that contains the foreign key column. Schema name is optional, if no schema is
specified then dbo is assumed.
The name of the foreign key constraint in the database.
Additional arguments that may be processed by providers. Use anonymous type syntax to
specify arguments e.g. 'new { SampleArgument = "MyValue" }'.
Adds an operation to drop a foreign key constraint based on the column it targets.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
The table that contains the foreign key column. Schema name is optional, if no schema is
specified then dbo is assumed.
The foreign key column.
The table that contains the column this foreign key references. Schema name is optional,
if no schema is specified then dbo is assumed.
Additional arguments that may be processed by providers. Use anonymous type syntax to
specify arguments e.g. 'new { SampleArgument = "MyValue" }'.
Adds an operation to drop a foreign key constraint based on the column it targets.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
The table that contains the foreign key column.
Schema name is optional, if no schema is specified then dbo is assumed.
The foreign key column.
The table that contains the column this foreign key references.
Schema name is optional, if no schema is specified then dbo is assumed.
The columns this foreign key references.
Additional arguments that may be processed by providers.
Use anonymous type syntax to specify arguments e.g. 'new { SampleArgument = "MyValue" }'.
Adds an operation to drop a foreign key constraint based on the columns it targets.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
The table that contains the foreign key columns. Schema name is optional, if no schema is
specified then dbo is assumed.
The foreign key columns.
The table that contains the columns this foreign key references. Schema name is optional,
if no schema is specified then dbo is assumed.
Additional arguments that may be processed by providers. Use anonymous type syntax to
specify arguments e.g. 'new { SampleArgument = "MyValue" }'.
Adds an operation to drop a table.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
The name of the table to be dropped. Schema name is optional, if no schema is specified then dbo is
assumed.
Additional arguments that may be processed by providers. Use anonymous type syntax to
specify arguments e.g. 'new { SampleArgument = "MyValue" }'.
Adds an operation to move a table to a new schema.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
The name of the table to be moved. Schema name is optional, if no schema is specified then dbo is
assumed.
The schema the table is to be moved to.
Additional arguments that may be processed by providers. Use anonymous type syntax to
specify arguments e.g. 'new { SampleArgument = "MyValue" }'.
Adds an operation to move a stored procedure to a new schema.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
The name of the stored procedure to be moved. Schema name is optional, if no schema is specified
then dbo is assumed.
The schema the stored procedure is to be moved to.
Additional arguments that may be processed by providers. Use anonymous type syntax to
specify arguments e.g. 'new { SampleArgument = "MyValue" }'.
Adds an operation to rename a table. To change the schema of a table use MoveTable.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
The name of the table to be renamed. Schema name is optional, if no schema is specified then dbo is
assumed.
The new name for the table. Schema name is optional, if no schema is specified then dbo is
assumed.
Additional arguments that may be processed by providers. Use anonymous type syntax to
specify arguments e.g. 'new { SampleArgument = "MyValue" }'.
Adds an operation to rename a stored procedure. To change the schema of a stored procedure use MoveStoredProcedure
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
The name of the stored procedure to be renamed. Schema name is optional, if no schema is specified
then dbo is assumed.
The new name for the stored procedure. Schema name is optional, if no schema is specified then
dbo is assumed.
Additional arguments that may be processed by providers. Use anonymous type syntax to
specify arguments e.g. 'new { SampleArgument = "MyValue" }'.
Adds an operation to rename a column.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
The name of the table that contains the column to be renamed. Schema name is optional, if no
schema is specified then dbo is assumed.
The name of the column to be renamed.
The new name for the column.
Additional arguments that may be processed by providers. Use anonymous type syntax to
specify arguments e.g. 'new { SampleArgument = "MyValue" }'.
Adds an operation to add a column to an existing table.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
The name of the table to add the column to. Schema name is optional, if no schema is specified
then dbo is assumed.
The name of the column to be added.
An action that specifies the column to be added. i.e. c => c.Int(nullable: false,
defaultValue: 3)
Additional arguments that may be processed by providers. Use anonymous type syntax to
specify arguments e.g. 'new { SampleArgument = "MyValue" }'.
Adds an operation to drop an existing column.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
The name of the table to drop the column from. Schema name is optional, if no schema is specified
then dbo is assumed.
The name of the column to be dropped.
Additional arguments that may be processed by providers. Use anonymous type syntax to
specify arguments e.g. 'new { SampleArgument = "MyValue" }'.
Adds an operation to alter the definition of an existing column.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
The name of the table the column exists in. Schema name is optional, if no schema is specified
then dbo is assumed.
The name of the column to be changed.
An action that specifies the new definition for the column. i.e. c => c.String(nullable:
false, defaultValue: "none")
Additional arguments that may be processed by providers. Use anonymous type syntax to
specify arguments e.g. 'new { SampleArgument = "MyValue" }'.
Adds an operation to create a new primary key.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
The table that contains the primary key column. Schema name is optional, if no schema is specified
then dbo is assumed.
The primary key column.
The name of the primary key in the database. If no value is supplied a unique name will be
generated.
A value indicating whether or not this is a clustered primary key.
Additional arguments that may be processed by providers. Use anonymous type syntax to
specify arguments e.g. 'new { SampleArgument = "MyValue" }'.
Adds an operation to create a new primary key based on multiple columns.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
The table that contains the primary key columns. Schema name is optional, if no schema is
specified then dbo is assumed.
The primary key columns.
The name of the primary key in the database. If no value is supplied a unique name will be
generated.
A value indicating whether or not this is a clustered primary key.
Additional arguments that may be processed by providers. Use anonymous type syntax to
specify arguments e.g. 'new { SampleArgument = "MyValue" }'.
Adds an operation to drop an existing primary key that does not have the default name.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
The table that contains the primary key column. Schema name is optional, if no schema is specified
then dbo is assumed.
The name of the primary key to be dropped.
Additional arguments that may be processed by providers. Use anonymous type syntax to
specify arguments e.g. 'new { SampleArgument = "MyValue" }'.
Adds an operation to drop an existing primary key that was created with the default name.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
The table that contains the primary key column. Schema name is optional, if no schema is specified
then dbo is assumed.
Additional arguments that may be processed by providers. Use anonymous type syntax to
specify arguments e.g. 'new { SampleArgument = "MyValue" }'.
Adds an operation to create an index on a single column.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
The name of the table to create the index on. Schema name is optional, if no schema is specified
then dbo is assumed.
The name of the column to create the index on.
A value indicating if this is a unique index. If no value is supplied a non-unique index will be
created.
The name to use for the index in the database. If no value is supplied a unique name will be
generated.
A value indicating whether or not this is a clustered index.
Additional arguments that may be processed by providers. Use anonymous type syntax to
specify arguments e.g. 'new { SampleArgument = "MyValue" }'.
Adds an operation to create an index on multiple columns.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
The name of the table to create the index on. Schema name is optional, if no schema is specified
then dbo is assumed.
The name of the columns to create the index on.
A value indicating if this is a unique index. If no value is supplied a non-unique index will be
created.
The name to use for the index in the database. If no value is supplied a unique name will be
generated.
A value indicating whether or not this is a clustered index.
Additional arguments that may be processed by providers. Use anonymous type syntax to
specify arguments e.g. 'new { SampleArgument = "MyValue" }'.
Adds an operation to drop an index based on its name.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
The name of the table to drop the index from. Schema name is optional, if no schema is specified
then dbo is assumed.
The name of the index to be dropped.
Additional arguments that may be processed by providers. Use anonymous type syntax to
specify arguments e.g. 'new { SampleArgument = "MyValue" }'.
Adds an operation to drop an index based on the columns it targets.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
The name of the table to drop the index from. Schema name is optional, if no schema is specified
then dbo is assumed.
The name of the column(s) the index targets.
Additional arguments that may be processed by providers. Use anonymous type syntax to
specify arguments e.g. 'new { SampleArgument = "MyValue" }'.
Adds an operation to execute a SQL command.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
The SQL to be executed.
A value indicating if the SQL should be executed outside of the transaction being
used for the migration process. If no value is supplied the SQL will be executed within the transaction.
Additional arguments that may be processed by providers. Use anonymous type syntax to
specify arguments e.g. 'new { SampleArgument = "MyValue" }'.
Configuration relating to the use of migrations for a given model.
You will typically create a configuration class that derives
from rather than
using this class.
The default directory that migrations are stored in.
Initializes a new instance of the DbMigrationsConfiguration class.
Adds a new SQL generator to be used for a given database provider.
Name of the database provider to set the SQL generator for.
The SQL generator to be used.
Gets the SQL generator that is set to be used with a given database provider.
Name of the database provider to get the SQL generator for.
The SQL generator that is set for the database provider.
Adds a new factory for creating instances to be used for a given database provider.
Name of the database provider to set the SQL generator for.
A factory for creating instances for a given and
representing the default schema.
Gets the history context factory that is set to be used with a given database provider.
Name of the database provider to get thefactory for.
The history context factory that is set for the database provider.
Gets or sets a value indicating if automatic migrations can be used when migration the database.
Gets or sets the string used to distinguish migrations belonging to this configuration
from migrations belonging to other configurations using the same database.
This property enables migrations from multiple different models to be applied to applied to a single database.
Gets or sets a value indicating if data loss is acceptable during automatic migration.
If set to false an exception will be thrown if data loss may occur as part of an automatic migration.
Gets or sets the derived DbContext representing the model to be migrated.
Gets or sets the namespace used for code-based migrations.
Gets or sets the sub-directory that code-based migrations are stored in.
Note that this property must be set to a relative path for a sub-directory under the
Visual Studio project root; it cannot be set to an absolute path.
Gets or sets the code generator to be used when scaffolding migrations.
Gets or sets the assembly containing code-based migrations.
Gets or sets a value to override the connection of the database to be migrated.
Gets or sets the timeout value used for the individual commands within a
migration. A null value indicates that the default value of the underlying
provider will be used.
Configuration relating to the use of migrations for a given model.
The context representing the model that this configuration applies to.
Initializes a new instance of the DbMigrationsConfiguration class.
Runs after upgrading to the latest migration to allow seed data to be updated.
Context to be used for updating seed data.
DbMigrator is used to apply existing migrations to a database.
DbMigrator can be used to upgrade and downgrade to any given migration.
To scaffold migrations based on changes to your model use
Base class for decorators that wrap the core
Initializes a new instance of the MigratorBase class.
The migrator that this decorator is wrapping.
Gets a list of the pending migrations that have not been applied to the database.
List of migration Ids
Updates the target database to the latest migration.
Updates the target database to a given migration.
The migration to upgrade/downgrade to.
Gets a list of the migrations that are defined in the assembly.
List of migration Ids
Gets a list of the migrations that have been applied to the database.
List of migration Ids
Gets the configuration being used for the migrations process.
Migration Id representing the state of the database before any migrations are applied.
For testing.
Initializes a new instance of the DbMigrator class.
Configuration to be used for the migration process.
Gets all migrations that are defined in the configured migrations assembly.
Gets all migrations that have been applied to the target database.
Gets all migrations that are defined in the assembly but haven't been applied to the target database.
Updates the target database to a given migration.
The migration to upgrade/downgrade to.
Ensures that the database exists by creating an empty database if one does not
already exist. If a new empty database is created but then the code in mustSucceedToKeepDatabase
throws an exception, then an attempt is made to clean up (delete) the new empty database.
This avoids leaving an empty database with no or incomplete metadata (e.g. MigrationHistory)
which can then cause problems for database initializers that check whether or not a database
exists.
Gets the configuration that is being used for the migration process.
A set of extension methods for
Adds or updates entities by key when SaveChanges is called. Equivalent to an "upsert" operation
from database terminology.
This method can useful when seeding data using Migrations.
The entities to add or update.
When the parameter is a custom or fake IDbSet implementation, this method will
attempt to locate and invoke a public, instance method with the same signature as this extension method.
Adds or updates entities by a custom identification expression when SaveChanges is called.
Equivalent to an "upsert" operation from database terminology.
This method can useful when seeding data using Migrations.
An expression specifying the properties that should be used when determining whether an Add or Update operation should be performed.
The entities to add or update.
When the parameter is a custom or fake IDbSet implementation, this method will
attempt to locate and invoke a public, instance method with the same signature as this extension method.
Generates C# code for a code-based migration.
Base class for providers that generate code for code-based migrations.
Generates the code that should be added to the users project.
Unique identifier of the migration.
Operations to be performed by the migration.
Source model to be stored in the migration metadata.
Target model to be stored in the migration metadata.
Namespace that code should be generated in.
Name of the class that should be generated.
The generated code.
Gets the namespaces that must be output as "using" or "Imports" directives to handle
the code generated by the given operations.
The operations for which code is going to be generated.
An ordered list of namespace names.
Gets the default namespaces that must be output as "using" or "Imports" directives for
any code generated.
A value indicating if this class is being generated for a code-behind file.
An ordered list of namespace names.
Generates the primary code file that the user can view and edit.
Operations to be performed by the migration.
Namespace that code should be generated in.
Name of the class that should be generated.
The generated code.
Generates the code behind file with migration metadata.
Unique identifier of the migration.
Source model to be stored in the migration metadata.
Target model to be stored in the migration metadata.
Namespace that code should be generated in.
Name of the class that should be generated.
The generated code.
Generates a property to return the source or target model in the code behind file.
Name of the property.
Value to be returned.
Text writer to add the generated code to.
Generates a namespace, using statements and class definition.
Namespace that code should be generated in.
Name of the class that should be generated.
Text writer to add the generated code to.
Base class for the generated class.
A value indicating if this class is being generated for a code-behind file.
Namespaces for which using directives will be added. If null, then the namespaces returned from GetDefaultNamespaces will be used.
Generates the closing code for a class that was started with WriteClassStart.
Text writer to add the generated code to.
Generates code to perform an .
The operation to generate code for.
Text writer to add the generated code to.
Generates code to perform a .
The operation to generate code for.
Text writer to add the generated code to.
Generates code to perform an .
The operation to generate code for.
Text writer to add the generated code to.
Generates code to perform a .
The operation to generate code for.
Text writer to add the generated code to.
Generates code to perform a .
The operation to generate code for.
Text writer to add the generated code to.
Generates code to specify the definition for a .
The parameter definition to generate code for.
Text writer to add the generated code to.
A value indicating whether to include the column name in the definition.
Generates code to perform a .
The operation to generate code for.
Text writer to add the generated code to.
Generates code to perform a .
The operation to generate code for.
Text writer to add the generated code to.
Generates code to perform an as part of a .
The operation to generate code for.
Text writer to add the generated code to.
Generates code to perform an as part of a .
The operation to generate code for.
Text writer to add the generated code to.
Generates code to perform a as part of a .
The operation to generate code for.
Text writer to add the generated code to.
Generates code to specify a set of column names using a lambda expression.
The columns to generate code for.
Text writer to add the generated code to.
Generates code to perform an .
The operation to generate code for.
Text writer to add the generated code to.
Generates code to perform a .
The operation to generate code for.
Text writer to add the generated code to.
Generates code to perform an .
The operation to generate code for.
Text writer to add the generated code to.
Generates code to perform a .
The operation to generate code for.
Text writer to add the generated code to.
Generates code to perform a .
The operation to generate code for.
Text writer to add the generated code to.
Generates code to perform a .
The operation to generate code for.
Text writer to add the generated code to.
Generates code to specify the definition for a .
The column definition to generate code for.
Text writer to add the generated code to.
A value indicating whether to include the column name in the definition.
Generates code to specify the default value for a column.
The value to be used as the default.
Code representing the default value.
Generates code to specify the default value for a column.
The value to be used as the default.
Code representing the default value.
Generates code to specify the default value for a column.
The value to be used as the default.
Code representing the default value.
Generates code to specify the default value for a column.
The value to be used as the default.
Code representing the default value.
Generates code to specify the default value for a column.
The value to be used as the default.
Code representing the default value.
Generates code to specify the default value for a column.
The value to be used as the default.
Code representing the default value.
Generates code to specify the default value for a column.
The value to be used as the default.
Code representing the default value.
Generates code to specify the default value for a column.
The value to be used as the default.
Code representing the default value.
Generates code to specify the default value for a column.
The value to be used as the default.
Code representing the default value.
Generates code to specify the default value for a column.
The value to be used as the default.
Code representing the default value.
Generates code to specify the default value for a column.
The value to be used as the default.
Code representing the default value.
Generates code to specify the default value for a column of unknown data type.
The value to be used as the default.
Code representing the default value.
Generates code to perform a .
The operation to generate code for.
Text writer to add the generated code to.
Generates code to perform a .
The operation to generate code for.
Text writer to add the generated code to.
Generates code to perform a .
The operation to generate code for.
Text writer to add the generated code to.
Generates code to perform a .
The operation to generate code for.
Text writer to add the generated code to.
Generates code to perform a .
The operation to generate code for.
Text writer to add the generated code to.
Removes any invalid characters from the name of an database artifact.
The name to be scrubbed.
The scrubbed name.
Gets the type name to use for a column of the given data type.
The data type to translate.
The type name to use in the generated migration.
Quotes an identifier using appropriate escaping to allow it to be stored in a string.
The identifier to be quoted.
The quoted identifier.
Scaffolds code-based migrations to apply pending model changes to the database.
Initializes a new instance of the MigrationScaffolder class.
Configuration to be used for scaffolding.
Scaffolds a code based migration to apply any pending model changes to the database.
The name to use for the scaffolded migration.
The scaffolded migration.
Scaffolds a code based migration to apply any pending model changes to the database.
The name to use for the scaffolded migration.
Whether or not to include model changes.
The scaffolded migration.
Scaffolds the initial code-based migration corresponding to a previously run database initializer.
The scaffolded migration.
Gets or sets the namespace used in the migration's generated code.
By default, this is the same as MigrationsNamespace on the migrations
configuration object passed into the constructor. For VB.NET projects, this
will need to be updated to take into account the project's root namespace.
Represents a code-based migration that has been scaffolded and is ready to be written to a file.
Gets or sets the unique identifier for this migration.
Typically used for the file name of the generated code.
Gets or sets the scaffolded migration code that the user can edit.
Gets or sets the scaffolded migration code that should be stored in a code behind file.
Gets or sets the programming language used for this migration.
Typically used for the file extension of the generated code.
Gets or sets the subdirectory in the user's project that this migration should be saved in.
Gets a dictionary of string resources to add to the migration resource file.
Gets or sets whether the migration was re-scaffolded.
Helper class that is used by design time tools to run migrations related
commands that need to interact with an application that is being edited
in Visual Studio.
Because the application is being edited the assemblies need to
be loaded in a separate AppDomain to ensure the latest version
is always loaded.
The App/Web.config file from the startup project is also copied
to ensure that any configuration is applied.
Initializes a new instance of the ToolingFacade class.
The name of the assembly that contains the migrations configuration to be used.
The name of the assembly that contains the DbContext to be used.
The namespace qualified name of migrations configuration to be used.
The working directory containing the compiled assemblies.
The path of the config file from the startup project.
The path of the application data directory from the startup project. Typically the App_Data directory for web applications or the working directory for executables.
The connection to the database to be migrated. If null is supplied, the default connection for the context will be used.
Releases all unmanaged resources used by the facade.
Gets the fully qualified name of all types deriving from .
All context types found.
Gets the fully qualified name of a type deriving from .
The name of the context type. If null, the single context type found in the assembly will be returned.
The context type found.
Gets a list of all migrations that have been applied to the database.
Ids of applied migrations.
Gets a list of all migrations that have not been applied to the database.
Ids of pending migrations.
Updates the database to the specified migration.
The Id of the migration to migrate to. If null is supplied, the database will be updated to the latest migration.
Value indicating if data loss during automatic migration is acceptable.
Generates a SQL script to migrate between two migrations.
The migration to update from. If null is supplied, a script to update the current database will be produced.
The migration to update to. If null is supplied, a script to update to the latest migration will be produced.
Value indicating if data loss during automatic migration is acceptable.
The generated SQL script.
Scaffolds a code-based migration to apply any pending model changes.
The name for the generated migration.
The programming language of the generated migration.
The root namespace of the project the migration will be added to.
Whether or not to include model changes.
The scaffolded migration.
Scaffolds the initial code-based migration corresponding to a previously run database initializer.
The programming language of the generated migration.
The root namespace of the project the migration will be added to.
The scaffolded migration.
Releases all resources used by the facade.
true to release both managed and unmanaged resources; false to release only unmanaged resources.
Gets or sets an action to be run to log information.
Gets or sets an action to be run to log warnings.
Gets or sets an action to be run to log verbose information.
Base class for loggers that can be used for the migrations process.
Logs an informational message.
The message to be logged.
Logs a warning that the user should be made aware of.
The message to be logged.
Logs some additional information that should only be presented to the user if they request verbose output.
The message to be logged.
Generates VB.Net code for a code-based migration.
Generates the primary code file that the user can view and edit.
Operations to be performed by the migration.
Namespace that code should be generated in.
Name of the class that should be generated.
The generated code.
Generates the code behind file with migration metadata.
Unique identifier of the migration.
Source model to be stored in the migration metadata.
Target model to be stored in the migration metadata.
Namespace that code should be generated in.
Name of the class that should be generated.
The generated code.
Generates a property to return the source or target model in the code behind file.
Name of the property.
Value to be returned.
Text writer to add the generated code to.
Generates a namespace, using statements and class definition.
Namespace that code should be generated in.
Name of the class that should be generated.
Text writer to add the generated code to.
Base class for the generated class.
A value indicating if this class is being generated for a code-behind file.
Namespaces for which Imports directives will be added. If null, then the namespaces returned from GetDefaultNamespaces will be used.
Generates the closing code for a class that was started with WriteClassStart.
Text writer to add the generated code to.
Generates code to perform an .
The operation to generate code for.
Text writer to add the generated code to.
Generates code to perform a .
The operation to generate code for.
Text writer to add the generated code to.
Generates code to perform an .
The operation to generate code for.
Text writer to add the generated code to.
Generates code to perform a .
The operation to generate code for.
Text writer to add the generated code to.
Generates code to perform a .
The operation to generate code for.
Text writer to add the generated code to.
Generates code to perform a .
The parameter model definition to generate code for.
Text writer to add the generated code to.
true to include the column name in the definition; otherwise, false.
Generates code to perform a .
The operation to generate code for.
Text writer to add the generated code to.
Generates code to perform a .
The operation to generate code for.
Text writer to add the generated code to.
Generates code to perform an as part of a .
The operation to generate code for.
Text writer to add the generated code to.
Generates code to perform an as part of a .
The operation to generate code for.
Text writer to add the generated code to.
Generates code to perform a as part of a .
The operation to generate code for.
Text writer to add the generated code to.
Generates code to specify a set of column names using a lambda expression.
The columns to generate code for.
Text writer to add the generated code to.
Generates code to perform an .
The operation to generate code for.
Text writer to add the generated code to.
Generates code to perform a .
The operation to generate code for.
Text writer to add the generated code to.
Generates code to perform an .
The operation to generate code for.
Text writer to add the generated code to.
Generates code to perform a .
The operation to generate code for.
Text writer to add the generated code to.
Generates code to perform a .
The operation to generate code for.
Text writer to add the generated code to.
Generates code to perform a .
The operation to generate code for.
Text writer to add the generated code to.
Generates code to specify the definition for a .
The column definition to generate code for.
Text writer to add the generated code to.
A value indicating whether to include the column name in the definition.
Generates code to specify the default value for a column.
The value to be used as the default.
Code representing the default value.
Generates code to specify the default value for a column.
The value to be used as the default.
Code representing the default value.
Generates code to specify the default value for a column.
The value to be used as the default.
Code representing the default value.
Generates code to specify the default value for a column.
The value to be used as the default.
Code representing the default value.
Generates code to specify the default value for a column.
The value to be used as the default.
Code representing the default value.
Generates code to specify the default value for a column.
The value to be used as the default.
Code representing the default value.
Generates code to specify the default value for a column.
The value to be used as the default.
Code representing the default value.
Generates code to specify the default value for a column.
The value to be used as the default.
Code representing the default value.
Generates code to specify the default value for a column.
The value to be used as the default.
Code representing the default value.
Generates code to specify the default value for a column.
The value to be used as the default.
Code representing the default value.
Generates code to specify the default value for a column.
The value to be used as the default.
Code representing the default value.
Generates code to specify the default value for a column of unknown data type.
The value to be used as the default.
Code representing the default value.
Generates code to perform a .
The operation to generate code for.
Text writer to add the generated code to.
Generates code to perform a .
The operation to generate code for.
Text writer to add the generated code to.
Generates code to perform a .
The operation to generate code for.
Text writer to add the generated code to.
Generates code to perform a .
The operation to generate code for.
Text writer to add the generated code to.
Generates code to perform a .
The operation to generate code for.
Text writer to add the generated code to.
Removes any invalid characters from the name of an database artifact.
The name to be scrubbed.
The scrubbed name.
Gets the type name to use for a column of the given data type.
The data type to translate.
The type name to use in the generated migration.
Quotes an identifier using appropriate escaping to allow it to be stored in a string.
The identifier to be quoted.
The quoted identifier.
This class is used by Code First Migrations to read and write migration history
from the database.
To customize the definition of the migrations history table you can derive from
this class and override OnModelCreating. Derived instances can either be registered
on a per migrations configuration basis using ,
or globally using .
The default name used for the migrations history table.
For testing
Initializes a new instance of the HistoryContext class.
If you are creating a derived history context you will generally expose a constructor
that accepts these same three parameters and passes them to this base constructor.
An existing connection to use for the new context.
The default schema of the model being migrated.
This schema will be used for the migrations history table unless a different schema is configured in OnModelCreating.
Applies the default configuration for the migrations history table. If you override
this method it is recommended that you call this base implementation before applying your
custom configuration.
The builder that defines the model for the context being created.
Gets the key used to locate a model that was previously built for this context. This is used
to avoid processing OnModelCreating and calculating the model every time a new context instance is created.
By default this property returns the default schema.
In most cases you will not need to override this property. However, if your implementation of OnModelCreating
contains conditional logic that results in a different model being built for the same database provider and
default schema you should override this property and calculate an appropriate key.
Gets the default schema of the model being migrated.
This schema will be used for the migrations history table unless a different schema is configured in OnModelCreating.
Gets or sets a that can be used to read and write instances.
This class is used by Code First Migrations to read and write migration history
from the database.
Gets or sets the Id of the migration this row represents.
Gets or sets a key representing to which context the row applies.
Gets or sets the state of the model after this migration was applied.
Gets or sets the version of Entity Framework that created this entry.
This is a version of the HistoryContext that still includes CreatedOn in its model.
It is used when figuring out whether or not the CreatedOn column exists and so should
be dropped.
Represents an error that occurs when an automatic migration would result in data loss.
Initializes a new instance of the AutomaticDataLossException class.
Initializes a new instance of the AutomaticDataLossException class.
The message that describes the error.
Initializes a new instance of the MigrationsException class.
The message that describes the error.
The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified.
Represents an error that occurs when there are pending model changes after applying the last migration and automatic migration is disabled.
Initializes a new instance of the AutomaticMigrationsDisabledException class.
Initializes a new instance of the AutomaticMigrationsDisabledException class.
The message that describes the error.
Initializes a new instance of the MigrationsException class.
The message that describes the error.
The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified.
For testing.
Exposed internally for testing.
Provides additional metadata about a code-based migration.
Gets the unique identifier for the migration.
Gets the state of the model before this migration is run.
Gets the state of the model after this migration is run.
Decorator to provide logging during migrations operations..
Initializes a new instance of the MigratorLoggingDecorator class.
The migrator that this decorator is wrapping.
The logger to write messages to.
Decorator to produce a SQL script instead of applying changes to the database.
Using this decorator to wrap will prevent
from applying any changes to the target database.
Initializes a new instance of the MigratorScriptingDecorator class.
The migrator that this decorator is wrapping.
Produces a script to update the database.
The migration to update from. If null is supplied, a script to update the
current database will be produced.
The migration to update to. If null is supplied,
a script to update to the latest migration will be produced.
The generated SQL script.
Represents a column being added to a table.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
Initializes a new instance of the AddColumnOperation class.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
The name of the table the column should be added to.
Details of the column being added.
Additional arguments that may be processed by providers. Use anonymous type syntax to specify arguments e.g. 'new { SampleArgument = "MyValue" }'.
Gets the name of the table the column should be added to.
Gets the details of the column being added.
Gets an operation that represents dropping the added column.
Represents a foreign key constraint being added to a table.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
Base class for changes that affect foreign key constraints.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
Initializes a new instance of the ForeignKeyOperation class.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
Additional arguments that may be processed by providers. Use anonymous type syntax to specify arguments e.g. 'new { SampleArgument = "MyValue" }'.
Gets or sets the name of the table that the foreign key constraint targets.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
Gets or sets the name of the table that the foreign key columns exist in.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
The names of the foreign key column(s).
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
Gets a value indicating if a specific name has been supplied for this foreign key constraint.
Gets or sets the name of this foreign key constraint.
If no name is supplied, a default name will be calculated.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
Initializes a new instance of the AddForeignKeyOperation class.
The PrincipalTable, PrincipalColumns, DependentTable and DependentColumns properties should also be populated.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
Additional arguments that may be processed by providers. Use anonymous type syntax to specify arguments e.g. 'new { SampleArgument = "MyValue" }'.
Gets an operation to create an index on the foreign key column(s).
An operation to add the index.
The names of the column(s) that the foreign key constraint should target.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
Gets or sets a value indicating if cascade delete should be configured on the foreign key constraint.
Gets an operation to drop the foreign key constraint.
Represents adding a primary key to a table.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
Common base class to represent operations affecting primary keys.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
Initializes a new instance of the PrimaryKeyOperation class.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
Additional arguments that may be processed by providers. Use anonymous type syntax to specify arguments e.g. 'new { SampleArgument = "MyValue" }'.
Gets or sets the name of the table that contains the primary key.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
Gets the column(s) that make up the primary key.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
Gets a value indicating if a specific name has been supplied for this primary key.
Gets or sets the name of this primary key.
If no name is supplied, a default name will be calculated.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
Initializes a new instance of the AddPrimaryKeyOperation class.
The Table and Columns properties should also be populated.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
Additional arguments that may be processed by providers. Use anonymous type syntax to specify arguments e.g. 'new { SampleArgument = "MyValue" }'.
Gets an operation to drop the primary key.
Gets or sets whether this is a clustered primary key.
Represents altering an existing column.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
Initializes a new instance of the AlterColumnOperation class.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
The name of the table that the column belongs to.
Details of what the column should be altered to.
Value indicating if this change will result in data loss.
Additional arguments that may be processed by providers. Use anonymous type syntax to specify arguments e.g. 'new { SampleArgument = "MyValue" }'.
Initializes a new instance of the AlterColumnOperation class.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
The name of the table that the column belongs to.
Details of what the column should be altered to.
Value indicating if this change will result in data loss.
An operation to revert this alteration of the column.
Additional arguments that may be processed by providers. Use anonymous type syntax to specify arguments e.g. 'new { SampleArgument = "MyValue" }'.
Gets the name of the table that the column belongs to.
Gets the new definition for the column.
Gets an operation that represents reverting the alteration.
The inverse cannot be automatically calculated,
if it was not supplied to the constructor this property will return null.
Represents information about a column.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
Initializes a new instance of the ColumnModel class.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
The data type for this column.
Initializes a new instance of the ColumnModel class.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
The data type for this column.
Additional details about the data type. This includes details such as maximum length, nullability etc.
Determines if this column is a narrower data type than another column.
Used to determine if altering the supplied column definition to this definition will result in data loss.
The column to compare to.
Details of the database provider being used.
True if this column is of a narrower data type.
Gets the CLR type corresponding to the database type of this column.
Gets the default value for the CLR type corresponding to the database type of this column.
Gets or sets a value indicating if this column can store null values.
Gets or sets a value indicating if values for this column will be generated by the database using the identity pattern.
Gets or sets a value indicating if this property model should be configured as a timestamp.
Represents creating a database index.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
Common base class for operations affecting indexes.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
Initializes a new instance of the IndexOperation class.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
Additional arguments that may be processed by providers. Use anonymous type syntax to specify arguments e.g. 'new { SampleArgument = "MyValue" }'.
Gets or sets the table the index belongs to.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
Gets the columns that are indexed.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
Gets a value indicating if a specific name has been supplied for this index.
Gets or sets the name of this index.
If no name is supplied, a default name will be calculated.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
Initializes a new instance of the CreateIndexOperation class.
The Table and Columns properties should also be populated.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
Additional arguments that may be processed by providers. Use anonymous type syntax to specify arguments e.g. 'new { SampleArgument = "MyValue" }'.
Gets or sets a value indicating if this is a unique index.
Gets an operation to drop this index.
Gets or sets whether this is a clustered index.
Represents creating a table.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
Initializes a new instance of the CreateTableOperation class.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
Name of the table to be created.
Additional arguments that may be processed by providers. Use anonymous type syntax to specify arguments e.g. 'new { SampleArgument = "MyValue" }'.
Gets the name of the table to be created.
Gets the columns to be included in the new table.
Gets or sets the primary key for the new table.
Gets an operation to drop the table.
Represents a column being dropped from a table.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
Initializes a new instance of the DropColumnOperation class.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
The name of the table the column should be dropped from.
The name of the column to be dropped.
Additional arguments that may be processed by providers. Use anonymous type syntax to specify arguments e.g. 'new { SampleArgument = "MyValue" }'.
Initializes a new instance of the DropColumnOperation class.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
The name of the table the column should be dropped from.
The name of the column to be dropped.
The operation that represents reverting the drop operation.
Additional arguments that may be processed by providers. Use anonymous type syntax to specify arguments e.g. 'new { SampleArgument = "MyValue" }'.
Gets the name of the table the column should be dropped from.
Gets the name of the column to be dropped.
Gets an operation that represents reverting dropping the column.
The inverse cannot be automatically calculated,
if it was not supplied to the constructor this property will return null.
Represents a foreign key constraint being dropped from a table.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
Initializes a new instance of the DropForeignKeyOperation class.
The PrincipalTable, DependentTable and DependentColumns properties should also be populated.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
Additional arguments that may be processed by providers. Use anonymous type syntax to specify arguments e.g. 'new { SampleArgument = "MyValue" }'.
Initializes a new instance of the DropForeignKeyOperation class.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc..
The operation that represents reverting dropping the foreign key constraint.
Additional arguments that may be processed by providers. Use anonymous type syntax to specify arguments e.g. 'new { SampleArgument = "MyValue" }'.
Gets an operation to drop the associated index on the foreign key column(s).
An operation to drop the index.
Gets an operation that represents reverting dropping the foreign key constraint.
The inverse cannot be automatically calculated,
if it was not supplied to the constructor this property will return null.
Represents dropping an existing index.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
Initializes a new instance of the DropIndexOperation class.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
Additional arguments that may be processed by providers. Use anonymous type syntax to specify arguments e.g. 'new { SampleArgument = "MyValue" }'.
Initializes a new instance of the DropIndexOperation class.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
The operation that represents reverting dropping the index.
Additional arguments that may be processed by providers. Use anonymous type syntax to specify arguments e.g. 'new { SampleArgument = "MyValue" }'.
Gets an operation that represents reverting dropping the index.
The inverse cannot be automatically calculated,
if it was not supplied to the constructor this property will return null.
Represents dropping a primary key from a table.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
Initializes a new instance of the DropPrimaryKeyOperation class.
The Table and Columns properties should also be populated.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
Additional arguments that may be processed by providers. Use anonymous type syntax to specify arguments e.g. 'new { SampleArgument = "MyValue" }'.
Gets an operation to add the primary key.
Used when altering the migrations history table so that the table can be rebuilt rather than just dropping and adding the primary key.
The create table operation for the migrations history table.
Represents dropping an existing table.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
Initializes a new instance of the DropTableOperation class.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
The name of the table to be dropped.
Additional arguments that may be processed by providers. Use anonymous type syntax to specify arguments e.g. 'new { SampleArgument = "MyValue" }'.
Initializes a new instance of the DropTableOperation class.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
The name of the table to be dropped.
An operation that represents reverting dropping the table.
Additional arguments that may be processed by providers. Use anonymous type syntax to specify arguments e.g. 'new { SampleArgument = "MyValue" }'.
Gets the name of the table to be dropped.
Gets an operation that represents reverting dropping the table.
The inverse cannot be automatically calculated,
if it was not supplied to the constructor this property will return null.
Operation representing DML changes to the migrations history table.
The migrations history table is used to store a log of the migrations that have been applied to the database.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
Initializes a new instance of the HistoryOperation class.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
A sequence of command trees representing the operations being applied to the history table.
Use anonymous type syntax to specify arguments e.g. 'new { SampleArgument = "MyValue" }'.
A sequence of commands representing the operations being applied to the history table.
Represents moving a table from one schema to another.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
Initializes a new instance of the MoveTableOperation class.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
Name of the table to be moved.
Name of the schema to move the table to.
Additional arguments that may be processed by providers. Use anonymous type syntax to specify arguments e.g. 'new { SampleArgument = "MyValue" }'.
Gets the name of the table to be moved.
Gets the name of the schema to move the table to.
Gets an operation that moves the table back to its original schema.
Used when altering the migrations history table so that data can be moved to the new table.
The context key for the model.
Gets a value that indicates whether this is a system table.
true if the table is a system table; otherwise, false.
Used when altering the migrations history table so that the table can be rebuilt rather than just dropping and adding the primary key.
The create table operation for the migrations history table.
Represents renaming an existing column.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
Initializes a new instance of the RenameColumnOperation class.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
Name of the table the column belongs to.
Name of the column to be renamed.
New name for the column.
Additional arguments that may be processed by providers. Use anonymous type syntax to specify arguments e.g. 'new { SampleArgument = "MyValue" }'.
Gets the name of the table the column belongs to.
Gets the name of the column to be renamed.
Gets the new name for the column.
Gets an operation that reverts the rename.
Represents renaming an existing table.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
Initializes a new instance of the RenameTableOperation class.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
Name of the table to be renamed.
New name for the table.
Additional arguments that may be processed by providers. Use anonymous type syntax to specify arguments e.g. 'new { SampleArgument = "MyValue" }'.
Gets the name of the table to be renamed.
Gets the new name for the table.
Gets an operation that reverts the rename.
Represents a provider specific SQL statement to be executed directly against the target database.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
Initializes a new instance of the SqlOperation class.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
The SQL to be executed.
Additional arguments that may be processed by providers. Use anonymous type syntax to specify arguments e.g. 'new { SampleArgument = "MyValue" }'.
Gets the SQL to be executed.
Gets or sets a value indicating whether this statement should be performed outside of
the transaction scope that is used to make the migration process transactional.
If set to true, this operation will not be rolled back if the migration process fails.
Common base class for providers that convert provider agnostic migration
operations into database provider specific SQL commands.
Converts a set of migration operations into database provider specific SQL.
The operations to be converted.
Token representing the version of the database being targeted.
A list of SQL statements to be executed to perform the migration operations.
Generates the SQL body for a stored procedure.
The command trees representing the commands for an insert, update or delete operation.
The rows affected parameter name.
The provider manifest token.
The SQL body for the stored procedure.
Represents a migration operation that has been translated into a SQL statement.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
Gets or sets the SQL to be executed to perform this migration operation.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
Gets or sets a value indicating whether this statement should be performed outside of
the transaction scope that is used to make the migration process transactional.
If set to true, this operation will not be rolled back if the migration process fails.
Gets or sets the batch terminator for the database provider.
Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources
(such as the end user of an application). If input is accepted from such sources it should be validated
before being passed to these APIs to protect against SQL injection attacks etc.
The batch terminator for the database provider.
Utility class to prep the user's config file to run in an AppDomain
Updates a config file by adding binding redirects for EntityFramework.dll.
This ensures that the user's code can be ran in an AppDomain and the exact
same version of the assembly will be used for both domains.
That path of the user's config file. Can also be null or a path to an non-existent file.
The path of the updated config file. It is the caller's responsibility to delete this.
Extension methods for .
Returns an implementation that stays in sync with the given
.
The element type.
The collection that the binding list will stay in sync with.
The binding list.
Represents data in a geodetic (round earth) coordinate system.
Creates a new value based on the specified well known binary value.
A new DbGeography value as defined by the well known binary value with the default geography coordinate system identifier (SRID)(
).
A byte array that contains a well known binary representation of the geography value.
Creates a new value based on the specified well known binary value and coordinate system identifier (SRID).
A new DbGeography value as defined by the well known binary value with the specified coordinate system identifier.
A byte array that contains a well known binary representation of the geography value.
The identifier of the coordinate system that the new DbGeography value should use.
Creates a new line value based on the specified well known binary value and coordinate system identifier (SRID).
A new DbGeography value as defined by the well known binary value with the specified coordinate system identifier.
A byte array that contains a well known binary representation of the geography value.
The identifier of the coordinate system that the new DbGeography value should use.
Creates a new point value based on the specified well known binary value and coordinate system identifier (SRID).
A new DbGeography value as defined by the well known binary value with the specified coordinate system identifier.
A byte array that contains a well known binary representation of the geography value.
The identifier of the coordinate system that the new DbGeography value should use.
Creates a new polygon value based on the specified well known binary value and coordinate system identifier (SRID).
A new DbGeography value as defined by the well known binary value with the specified coordinate system identifier.
A byte array that contains a well known binary representation of the geography value.
The identifier of the coordinate system that the new DbGeography value should use.
Returns the multiline value from a binary value.
The multiline value from a binary value.
The well-known binary value.
The coordinate system identifier.
Returns the multipoint value from a well-known binary value.
The multipoint value from a well-known binary value.
The well-known binary value.
The coordinate system identifier.
Returns the multi polygon value from a well-known binary value.
The multi polygon value from a well-known binary value.
The multi polygon well-known binary value.
The coordinate system identifier.
Creates a new collection value based on the specified well known binary value and coordinate system identifier (SRID).
A new DbGeography value as defined by the well known binary value with the specified coordinate system identifier.
A byte array that contains a well known binary representation of the geography value.
The identifier of the coordinate system that the new DbGeography value should use.
Creates a new value based on the specified Geography Markup Language (GML) value.
A new DbGeography value as defined by the GML value with the default geography coordinate system identifier (SRID) (
).
A string that contains a Geography Markup Language (GML) representation of the geography value.
Creates a new value based on the specified Geography Markup Language (GML) value and coordinate system identifier (SRID).
A new DbGeography value as defined by the GML value with the specified coordinate system identifier.
A string that contains a Geography Markup Language (GML) representation of the geography value.
The identifier of the coordinate system that the new DbGeography value should use.
Creates a new value based on the specified well known text value.
A new DbGeography value as defined by the well known text value with the default geography coordinate system identifier (SRID) (
).
A string that contains a well known text representation of the geography value.
Creates a new value based on the specified well known text value and coordinate system identifier (SRID).
A new DbGeography value as defined by the well known text value with the specified coordinate system identifier.
A string that contains a well known text representation of the geography value.
The identifier of the coordinate system that the new DbGeography value should use.
Creates a new line value based on the specified well known text value and coordinate system identifier (SRID).
A new DbGeography value as defined by the well known text value with the specified coordinate system identifier.
A string that contains a well known text representation of the geography value.
The identifier of the coordinate system that the new DbGeography value should use.
Creates a new point value based on the specified well known text value and coordinate system identifier (SRID).
A new DbGeography value as defined by the well known text value with the specified coordinate system identifier.
A string that contains a well known text representation of the geography value.
The identifier of the coordinate system that the new DbGeography value should use.
Creates a new polygon value based on the specified well known text value and coordinate system identifier (SRID).
A new DbGeography value as defined by the well known text value with the specified coordinate system identifier.
A string that contains a well known text representation of the geography value.
The identifier of the coordinate system that the new DbGeography value should use.
Returns the multiline value from a well-known text value.
The multiline value from a well-known text value.
The well-known text.
The coordinate system identifier.
Returns the multipoint value from a well-known text value.
The multipoint value from a well-known text value.
The well-known text value.
The coordinate system identifier.
Returns the multi polygon value from a well-known text value.
The multi polygon value from a well-known text value.
The multi polygon well-known text value.
The coordinate system identifier.
Creates a new collection value based on the specified well known text value and coordinate system identifier (SRID).
A new DbGeography value as defined by the well known text value with the specified coordinate system identifier.
A string that contains a well known text representation of the geography value.
The identifier of the coordinate system that the new DbGeography value should use.
Generates the well known text representation of this DbGeography value. Includes only Longitude and Latitude for points.
A string containing the well known text representation of this DbGeography value.
Generates the well known text representation of this DbGeography value. Includes Longitude, Latitude, Elevation (Z) and Measure (M) for points.
A string containing the well known text representation of this DbGeography value.
Generates the well known binary representation of this DbGeography value.
The well-known binary representation of this DbGeography value.
Generates the Geography Markup Language (GML) representation of this DbGeography value.
A string containing the GML representation of this DbGeography value.
Determines whether this DbGeography is spatially equal to the specified DbGeography argument.
true if other is spatially equal to this geography value; otherwise false.
The geography value that should be compared with this geography value for equality.
Determines whether this DbGeography is spatially disjoint from the specified DbGeography argument.
true if other is disjoint from this geography value; otherwise false.
The geography value that should be compared with this geography value for disjointness.
Determines whether this DbGeography value spatially intersects the specified DbGeography argument.
true if other intersects this geography value; otherwise false.
The geography value that should be compared with this geography value for intersection.
Returns a geography object that represents the union of all points whose distance from a geography instance is less than or equal to a specified value.
A geography object that represents the union of all points
The distance.
Computes the distance between the closest points in this DbGeography value and another DbGeography value.
A double value that specifies the distance between the two closest points in this geography value and other.
The geography value for which the distance from this value should be computed.
Computes the intersection of this DbGeography value and another DbGeography value.
A new DbGeography value representing the intersection between this geography value and other.
The geography value for which the intersection with this value should be computed.
Computes the union of this DbGeography value and another DbGeography value.
A new DbGeography value representing the union between this geography value and other.
The geography value for which the union with this value should be computed.
Computes the difference of this DbGeography value and another DbGeography value.
A new DbGeography value representing the difference between this geography value and other.
The geography value for which the difference with this value should be computed.
Computes the symmetric difference of this DbGeography value and another DbGeography value.
A new DbGeography value representing the symmetric difference between this geography value and other.
The geography value for which the symmetric difference with this value should be computed.
Returns an element of this DbGeography value from a specific position, if it represents a geography collection. <param name="index">The position within this geography value from which the element should be taken.</param><returns>The element in this geography value at the specified position, if it represents a collection of other geography values; otherwise null.</returns>
An element of this DbGeography value from a specific position
The index.
Returns an element of this DbGeography value from a specific position, if it represents a linestring or linear ring. <param name="index">The position within this geography value from which the element should be taken.</param><returns>The element in this geography value at the specified position, if it represents a linestring or linear ring; otherwise null.</returns>
An element of this DbGeography value from a specific position
The index.
Returns a string representation of the geography value.
A string representation of the geography value.
Gets the default coordinate system id (SRID) for geography values (WGS 84)
The default coordinate system id (SRID) for geography values (WGS 84)
Gets a representation of this DbGeography value that is specific to the underlying provider that constructed it.
A representation of this DbGeography value.
Gets the spatial provider that will be used for operations on this spatial type.
Gets or sets a data contract serializable well known representation of this DbGeography value.
A data contract serializable well known representation of this DbGeography value.
Gets the identifier associated with the coordinate system.
The identifier associated with the coordinate system.
Gets the dimension of the given value or, if the value is a collections, the largest element dimension.
The dimension of the given value.
Gets the spatial type name of the DBGeography.
The spatial type name of the DBGeography.
Gets a nullable Boolean value indicating whether this DbGeography value is empty.
True if this DbGeography value is empty; otherwise, false.
Gets the number of elements in this DbGeography value, if it represents a geography collection. <returns>The number of elements in this geography value, if it represents a collection of other geography values; otherwise null.</returns>
The number of elements in this DbGeography value.
Gets the Latitude coordinate of this DbGeography value, if it represents a point. <returns>The Latitude coordinate value of this geography value, if it represents a point; otherwise null.</returns>
The Latitude coordinate of this DbGeography value.
Gets the Longitude coordinate of this DbGeography value, if it represents a point. <returns>The Longitude coordinate value of this geography value, if it represents a point; otherwise null.</returns>
The Longitude coordinate of this DbGeography value.
Gets the elevation (Z coordinate) of this DbGeography value, if it represents a point. <returns>The elevation (Z coordinate) value of this geography value, if it represents a point; otherwise null.</returns>
The elevation (Z coordinate) of this DbGeography value.
Gets the M (Measure) coordinate of this DbGeography value, if it represents a point. <returns>The M (Measure) coordinate value of this geography value, if it represents a point; otherwise null.</returns>
The M (Measure) coordinate of this DbGeography value.
Gets a nullable double value that indicates the length of this DbGeography value, which may be null if this value does not represent a curve.
A nullable double value that indicates the length of this DbGeography value.
Gets a DbGeography value representing the start point of this value, which may be null if this DbGeography value does not represent a curve.
A DbGeography value representing the start point of this value.
Gets a DbGeography value representing the start point of this value, which may be null if this DbGeography value does not represent a curve.
A DbGeography value representing the start point of this value.
Gets a nullable Boolean value indicating whether this DbGeography value is closed, which may be null if this value does not represent a curve.
True if this DbGeography value is closed; otherwise, false.
Gets the number of points in this DbGeography value, if it represents a linestring or linear ring. <returns>The number of elements in this geography value, if it represents a linestring or linear ring; otherwise null.</returns>
The number of points in this DbGeography value.
Gets a nullable double value that indicates the area of this DbGeography value, which may be null if this value does not represent a surface.
A nullable double value that indicates the area of this DbGeography value.
A data contract serializable representation of a value.
Gets or sets the coordinate system identifier (SRID) of this value.
Gets or sets the well known text representation of this value.
Gets or sets the well known binary representation of this value.
Represents geometric shapes.
Creates a new value based on the specified well known binary value.
A new DbGeometry value as defined by the well known binary value with the default geometry coordinate system identifier (
).
A byte array that contains a well known binary representation of the geometry value.
wellKnownBinary
Creates a new value based on the specified well known binary value and coordinate system identifier (SRID).
A new DbGeometry value as defined by the well known binary value with the specified coordinate system identifier.
A byte array that contains a well known binary representation of the geometry value.
The identifier of the coordinate system that the new DbGeometry value should use.
wellKnownBinary
coordinateSystemId
Creates a new line value based on the specified well known binary value and coordinate system identifier (SRID).
A new DbGeometry value as defined by the well known binary value with the specified coordinate system identifier.
A byte array that contains a well known binary representation of the geometry value.
The identifier of the coordinate system that the new DbGeometry value should use.
lineWellKnownBinary
coordinateSystemId
Creates a new point value based on the specified well known binary value and coordinate system identifier (SRID).
A new DbGeometry value as defined by the well known binary value with the specified coordinate system identifier.
A byte array that contains a well known binary representation of the geometry value.
The identifier of the coordinate system that the new DbGeometry value should use.
pointWellKnownBinary
coordinateSystemId
Creates a new polygon value based on the specified well known binary value and coordinate system identifier (SRID).
A new DbGeometry value as defined by the well known binary value with the specified coordinate system identifier.
A byte array that contains a well known binary representation of the geometry value.
The identifier of the coordinate system that the new DbGeometry value should use.
polygonWellKnownBinary
coordinateSystemId
Returns the multiline value from a binary value.
The multiline value from a binary value.
The well-known binary value.
The coordinate system identifier.
Returns the multipoint value from a well-known binary value.
The multipoint value from a well-known binary value.
The well-known binary value.
The coordinate system identifier.
Returns the multi polygon value from a well-known binary value.
The multipoint value from a well-known text value.
The multi polygon well-known text value.
The coordinate system identifier.
Creates a new collection value based on the specified well known binary value and coordinate system identifier (SRID).
A new DbGeometry value as defined by the well known binary value with the specified coordinate system identifier.
A byte array that contains a well known binary representation of the geometry value.
The identifier of the coordinate system that the new DbGeometry value should use.
geometryCollectionWellKnownBinary
coordinateSystemId
Creates a new value based on the specified Geography Markup Language (GML) value.
A new DbGeometry value as defined by the GML value with the default geometry coordinate system identifier (SRID) (
).
A string that contains a Geography Markup Language (GML) representation of the geometry value.
geometryMarkup
Creates a new value based on the specified Geography Markup Language (GML) value and coordinate system identifier (SRID).
A new DbGeometry value as defined by the GML value with the specified coordinate system identifier.
A string that contains a Geography Markup Language (GML) representation of the geometry value.
The identifier of the coordinate system that the new DbGeometry value should use.
geometryMarkup
coordinateSystemId
Creates a new value based on the specified well known text value.
A new DbGeometry value as defined by the well known text value with the default geometry coordinate system identifier (SRID) (
).
A string that contains a well known text representation of the geometry value.
wellKnownText
Creates a new value based on the specified well known text value and coordinate system identifier (SRID).
A new DbGeometry value as defined by the well known text value with the specified coordinate system identifier.
A string that contains a well known text representation of the geometry value.
The identifier of the coordinate system that the new DbGeometry value should use.
wellKnownText
coordinateSystemId
Creates a new line value based on the specified well known text value and coordinate system identifier (SRID).
A new DbGeometry value as defined by the well known text value with the specified coordinate system identifier.
A string that contains a well known text representation of the geometry value.
The identifier of the coordinate system that the new DbGeometry value should use.
lineWellKnownText
coordinateSystemId
Creates a new point value based on the specified well known text value and coordinate system identifier (SRID).
A new DbGeometry value as defined by the well known text value with the specified coordinate system identifier.
A string that contains a well known text representation of the geometry value.
The identifier of the coordinate system that the new DbGeometry value should use.
pointWellKnownText
coordinateSystemId
Creates a new polygon value based on the specified well known text value and coordinate system identifier (SRID).
A new DbGeometry value as defined by the well known text value with the specified coordinate system identifier.
A string that contains a well known text representation of the geometry value.
The identifier of the coordinate system that the new DbGeometry value should use.
polygonWellKnownText
coordinateSystemId
Returns the multiline value from a well-known text value.
The multiline value from a well-known text value.
The well-known text.
The coordinate system identifier.
Returns the multipoint value from a well-known text value.
The multipoint value from a well-known text value.
The well-known text value.
The coordinate system identifier.
Returns the multi polygon value from a well-known binary value.
The multi polygon value from a well-known binary value.
The multi polygon well-known text value.
The coordinate system identifier.
Creates a new collection value based on the specified well known text value and coordinate system identifier (SRID).
A new DbGeometry value as defined by the well known text value with the specified coordinate system identifier.
A string that contains a well known text representation of the geometry value.
The identifier of the coordinate system that the new DbGeometry value should use.
geometryCollectionWellKnownText
coordinateSystemId
Generates the well known text representation of this DbGeometry value. Includes only X and Y coordinates for points.
A string containing the well known text representation of this DbGeometry value.
Generates the well known text representation of this DbGeometry value. Includes X coordinate, Y coordinate, Elevation (Z) and Measure (M) for points.
A string containing the well known text representation of this DbGeometry value.
Generates the well known binary representation of this DbGeometry value.
The well-known binary representation of this DbGeometry value.
Generates the Geography Markup Language (GML) representation of this DbGeometry value.
A string containing the GML representation of this DbGeometry value.
Determines whether this DbGeometry is spatially equal to the specified DbGeometry argument.
true if other is spatially equal to this geometry value; otherwise false.
The geometry value that should be compared with this geometry value for equality.
other
Determines whether this DbGeometry is spatially disjoint from the specified DbGeometry argument.
true if other is disjoint from this geometry value; otherwise false.
The geometry value that should be compared with this geometry value for disjointness.
other
Determines whether this DbGeometry value spatially intersects the specified DbGeometry argument.
true if other intersects this geometry value; otherwise false.
The geometry value that should be compared with this geometry value for intersection.
other
Determines whether this DbGeometry value spatially touches the specified DbGeometry argument.
true if other touches this geometry value; otherwise false.
The geometry value that should be compared with this geometry value.
other
Determines whether this DbGeometry value spatially crosses the specified DbGeometry argument.
true if other crosses this geometry value; otherwise false.
The geometry value that should be compared with this geometry value.
other
Determines whether this DbGeometry value is spatially within the specified DbGeometry argument.
true if this geometry value is within other; otherwise false.
The geometry value that should be compared with this geometry value for containment.
other
Determines whether this DbGeometry value spatially contains the specified DbGeometry argument.
true if this geometry value contains other; otherwise false.
The geometry value that should be compared with this geometry value for containment.
other
Determines whether this DbGeometry value spatially overlaps the specified DbGeometry argument.
true if this geometry value overlaps other; otherwise false.
The geometry value that should be compared with this geometry value for overlap.
other
Determines whether this DbGeometry value spatially relates to the specified DbGeometry argument according to the given Dimensionally Extended Nine-Intersection Model (DE-9IM) intersection pattern.
true if this geometry value relates to other according to the specified intersection pattern matrix; otherwise false.
The geometry value that should be compared with this geometry value for relation.
A string that contains the text representation of the (DE-9IM) intersection pattern that defines the relation.
othermatrix
Returns a geometry object that represents the union of all points whose distance from a geometry instance is less than or equal to a specified value.
A geometry object that represents the union of all points.
The distance.
Computes the distance between the closest points in this DbGeometry value and another DbGeometry value.
A double value that specifies the distance between the two closest points in this geometry value and other.
The geometry value for which the distance from this value should be computed.
other
Computes the intersection of this DbGeometry value and another DbGeometry value.
A new DbGeometry value representing the intersection between this geometry value and other.
The geometry value for which the intersection with this value should be computed.
other
Computes the union of this DbGeometry value and another DbGeometry value.
A new DbGeometry value representing the union between this geometry value and other.
The geometry value for which the union with this value should be computed.
other
Computes the difference between this DbGeometry value and another DbGeometry value.
A new DbGeometry value representing the difference between this geometry value and other.
The geometry value for which the difference with this value should be computed.
other
Computes the symmetric difference between this DbGeometry value and another DbGeometry value.
A new DbGeometry value representing the symmetric difference between this geometry value and other.
The geometry value for which the symmetric difference with this value should be computed.
other
Returns an element of this DbGeometry value from a specific position, if it represents a geometry collection. <param name="index">The position within this geometry value from which the element should be taken.</param><returns>The element in this geometry value at the specified position, if it represents a collection of other geometry values; otherwise null.</returns>
An element of this DbGeometry value from a specific position.
The index.
Returns an element of this DbGeometry value from a specific position, if it represents a linestring or linear ring. <param name="index">The position within this geometry value from which the element should be taken.</param><returns>The element in this geometry value at the specified position, if it represents a linestring or linear ring; otherwise null.</returns>
An element of this DbGeometry value from a specific position.
The index.
Returns an interior ring from this DbGeometry value at a specific position, if it represents a polygon. <param name="index">The position within this geometry value from which the interior ring should be taken.</param><returns>The interior ring in this geometry value at the specified position, if it represents a polygon; otherwise null.</returns>
An interior ring from this DbGeometry value at a specific position.
The index.
Returns a string representation of the geometry value.
A string representation of the geometry value.
Gets the default coordinate system id (SRID) for geometry values.
The default coordinate system id (SRID) for geometry values.
Gets a representation of this DbGeometry value that is specific to the underlying provider that constructed it.
A representation of this DbGeometry value.
Gets the spatial provider that will be used for operations on this spatial type.
Gets or sets a data contract serializable well known representation of this DbGeometry value.
A data contract serializable well known representation of this DbGeometry value.
Gets the coordinate system identifier of the DbGeometry object.
The coordinate system identifier of the DbGeometry object.
Gets the boundary of the DbGeometry objects.
The boundary of the DbGeometry objects.
Gets the dimension of the given value or, if the value is a collection, the dimension of its largest element.
The dimension of the given value.
Gets the envelope (minimum bounding box) of this DbGeometry value, as a geometry value.
The envelope (minimum bounding box) of this DbGeometry value.
Gets a spatial type name representation of this DbGeometry value.
A spatial type name representation of this DbGeometry value.
Gets a nullable Boolean value indicating whether this DbGeometry value is empty, which may be null if this value does not represent a curve.
True if this DbGeometry value is empty; otherwise, false.
Gets a nullable Boolean value indicating whether this DbGeometry value is simple.
True if this DbGeometry value is simple; otherwise, false.
Gets a nullable Boolean value indicating whether this DbGeometry value is valid.
True if this DbGeometry value is valid; otherwise, false.
Gets the convex hull of this DbGeometry value as another DbGeometry value.
The convex hull of this DbGeometry value as another DbGeometry value.
Gets the number of elements in this DbGeometry value, if it represents a geometry collection. <returns>The number of elements in this geometry value, if it represents a collection of other geometry values; otherwise null.</returns>
The number of elements in this DbGeometry value.
Gets the X coordinate of this DbGeometry value, if it represents a point. <returns>The X coordinate value of this geometry value, if it represents a point; otherwise null.</returns>
The X coordinate of this DbGeometry value.
Gets the Y coordinate of this DbGeometry value, if it represents a point. <returns>The Y coordinate value of this geometry value, if it represents a point; otherwise null.</returns>
The Y coordinate of this DbGeometry value.
Gets the elevation (Z coordinate) of this DbGeometry value, if it represents a point. <returns>The elevation (Z coordinate) of this geometry value, if it represents a point; otherwise null.</returns>
The elevation (Z coordinate) of this DbGeometry value.
Gets the Measure (M coordinate) of this DbGeometry value, if it represents a point. <returns>The Measure (M coordinate) value of this geometry value, if it represents a point; otherwise null.</returns>
The Measure (M coordinate) of this DbGeometry value.
Gets a nullable double value that indicates the length of this DbGeometry value, which may be null if this value does not represent a curve.
The length of this DbGeometry value.
Gets a DbGeometry value representing the start point of this value, which may be null if this DbGeometry value does not represent a curve.
A DbGeometry value representing the start point of this value.
Gets a DbGeometry value representing the start point of this value, which may be null if this DbGeometry value does not represent a curve.
A DbGeometry value representing the start point of this value.
Gets a nullable Boolean value indicating whether this DbGeometry value is closed, which may be null if this value does not represent a curve.
True if this DbGeometry value is closed; otherwise, false.
Gets a nullable Boolean value indicating whether this DbGeometry value is a ring, which may be null if this value does not represent a curve.
True if this DbGeometry value is a ring; otherwise, false.
Gets the number of points in this DbGeometry value, if it represents a linestring or linear ring. <returns>The number of elements in this geometry value, if it represents a linestring or linear ring; otherwise null.</returns>
The number of points in this DbGeometry value.
Gets a nullable double value that indicates the area of this DbGeometry value, which may be null if this value does not represent a surface.
A nullable double value that indicates the area of this DbGeometry value.
Gets the DbGeometry value that represents the centroid of this DbGeometry value, which may be null if this value does not represent a surface.
The DbGeometry value that represents the centroid of this DbGeometry value.
Gets a point on the surface of this DbGeometry value, which may be null if this value does not represent a surface.
A point on the surface of this DbGeometry value.
Gets the DbGeometry value that represents the exterior ring of this DbGeometry value, which may be null if this value does not represent a polygon.
The DbGeometry value that represents the exterior ring of this DbGeometry value.
Gets the number of interior rings in this DbGeometry value, if it represents a polygon. <returns>The number of elements in this geometry value, if it represents a polygon; otherwise null.</returns>
The number of interior rings in this DbGeometry value.
A data contract serializable representation of a value.
Gets or sets the coordinate system identifier (SRID) of this value.
Gets or sets the well known text representation of this value.
Gets or sets the well known binary representation of this value.
A provider-independent service API for geospatial (Geometry/Geography) type support.
When implemented in derived types, reads an instance of from the column at the specified column ordinal.
The instance of DbGeography at the specified column value
The ordinal of the column that contains the geography value
Asynchronously reads an instance of from the column at the specified column ordinal.
Providers should override with an appropriate implementation.
The default implementation invokes the synchronous method and returns
a completed task, blocking the calling thread.
The ordinal of the column that contains the geography value.
A to observe while waiting for the task to complete.
A task that represents the asynchronous operation.
The task result contains the instance of at the specified column value.
When implemented in derived types, reads an instance of from the column at the specified column ordinal.
The instance of DbGeometry at the specified column value
The ordinal of the data record column that contains the provider-specific geometry data
Asynchronously reads an instance of from the column at the specified column ordinal.
Providers should override with an appropriate implementation.
The default implementation invokes the synchronous method and returns
a completed task, blocking the calling thread.
The ordinal of the data record column that contains the provider-specific geometry data.
A to observe while waiting for the task to complete.
A task that represents the asynchronous operation.
The task result contains the instance of at the specified column value.
Returns whether the column at the specified column ordinal is of geography type
true if the column at the specified column ordinal is of geography type;
false otherwise.
Returns whether the column at the specified column ordinal is of geometry type
true if the column at the specified column ordinal is of geometry type;
false otherwise.
A provider-independent service API for geospatial (Geometry/Geography) type support.
This method is intended for use by derived implementations of
after suitable validation of the specified provider value to ensure it is suitable for use with the derived implementation.
A new instance that contains the specified providerValue and uses the specified spatialServices as its spatial implementation.
The spatial services instance that the returned value will depend on for its implementation of spatial functionality.
The provider value.
Creates a new value based on a provider-specific value that is compatible with this spatial services implementation.
A new value backed by this spatial services implementation and the specified provider value.
A provider-specific value that this spatial services implementation is capable of interpreting as a geography value.
A new DbGeography value backed by this spatial services implementation and the specified provider value.
is null.
is not compatible with this spatial services implementation.
Creates a provider-specific value compatible with this spatial services implementation based on the specified well-known
representation.
A provider-specific value that encodes the information contained in wellKnownValue in a fashion compatible with this spatial services implementation.
An instance of that contains the well-known representation of a geography value.
Creates an instance of that represents the specified
value using one or both of the standard well-known spatial formats.
The well-known representation of geographyValue, as a new
.
The geography value.
is null.
is not compatible with this spatial services implementation.
Creates a new value based on the specified well-known binary value.
A new value as defined by the well-known binary value with the default
coordinate system identifier (SRID) (
).
A byte array that contains a well-known binary representation of the geography value.
Creates a new value based on the specified well-known binary value and coordinate system identifier (SRID).
A new value as defined by the well-known binary value with the specified coordinate system identifier (SRID) (
).
A byte array that contains a well-known binary representation of the geography value.
The identifier of the coordinate system that the new value should use.
Creates a new line value based on the specified well-known binary value and coordinate system identifier (SRID).
A new value as defined by the well-known binary value with the specified coordinate system identifier (SRID) (
).
A byte array that contains a well-known binary representation of the geography value.
The identifier of the coordinate system that the new value should use.
Creates a new point value based on the specified well-known binary value and coordinate system identifier (SRID).
A new value as defined by the well-known binary value with the specified coordinate system identifier (SRID) (
).
A byte array that contains a well-known binary representation of the geography value.
The identifier of the coordinate system that the new value should use.
Creates a new polygon value based on the specified well-known binary value and coordinate system identifier (SRID).
A new value as defined by the well-known binary value with the specified coordinate system identifier (SRID) (
).
A byte array that contains a well-known binary representation of the geography value.
The identifier of the coordinate system that the new value should use.
Creates a new multiline value based on the specified well-known binary value and coordinate system identifier.
The new multiline value.
The well-known binary value.
The coordinate system identifier.
Creates a new multipoint value based on the specified well-known binary value and coordinate system identifier.
A new multipoint value.
The well-known binary value.
The coordinate system identifier.
Creates a new multi polygon value based on the specified well-known binary value and coordinate system identifier.
A new multi polygon value.
The well-known binary value.
The coordinate system identifier.
Creates a new collection value based on the specified well-known binary value and coordinate system identifier (SRID).
A new value as defined by the well-known binary value with the specified coordinate system identifier (SRID) (
).
A byte array that contains a well-known binary representation of the geography value.
The identifier of the coordinate system that the new value should use.
Creates a new value based on the specified well-known text value.
A new value as defined by the well-known text value with the default
coordinate system identifier (SRID) (
).
A string that contains a well-known text representation of the geography value.
Creates a new value based on the specified well-known text value and coordinate system identifier (SRID).
A new value as defined by the well-known text value with the specified coordinate system identifier (SRID) (
).
A string that contains a well-known text representation of the geography value.
The identifier of the coordinate system that the new value should use.
Creates a new line value based on the specified well-known text value and coordinate system identifier (SRID).
A new value as defined by the well-known text value with the specified coordinate system identifier (SRID) (
).
A string that contains a well-known text representation of the geography value.
The identifier of the coordinate system that the new value should use.
Creates a new point value based on the specified well-known text value and coordinate system identifier (SRID).
A new value as defined by the well-known text value with the specified coordinate system identifier (SRID) (
).
A string that contains a well-known text representation of the geography value.
The identifier of the coordinate system that the new value should use.
Creates a new polygon value based on the specified well-known text value and coordinate system identifier (SRID).
A new value as defined by the well-known text value with the specified coordinate system identifier (SRID) (
).
A string that contains a well-known text representation of the geography value.
The identifier of the coordinate system that the new value should use.
Creates a new multiline value based on the specified well-known text value and coordinate system identifier.
A new multiline value.
The well-known text value.
The coordinate system identifier.
Creates a new multipoint value based on the specified well-known text value and coordinate system identifier.
A new multipoint value.
The well-known text value.
The coordinate system identifier.
Creates a new multi polygon value based on the specified well-known text value and coordinate system identifier.
A new multi polygon value.
The well-known text value.
The coordinate system identifier.
Creates a new collection value based on the specified well-known text value and coordinate system identifier (SRID).
A new value as defined by the well-known text value with the specified coordinate system identifier (SRID) (
).
A string that contains a well-known text representation of the geography value.
The identifier of the coordinate system that the new value should use.
Creates a new value based on the specified Geography Markup Language (GML) value.
A new value as defined by the GML value with the default
coordinate system identifier (SRID) (
).
A string that contains a Geometry Markup Language (GML) representation of the geography value.
Creates a new value based on the specified Geography Markup Language (GML) value and coordinate system identifier (SRID).
A new value as defined by the GML value with the specified coordinate system identifier (SRID).
A string that contains a Geometry Markup Language (GML) representation of the geography value.
The identifier of the coordinate system that the new value should use.
Returns the coordinate system identifier of the given value.
The coordinate system identifier of the given value.
The geography value.
is null.
is not compatible with this spatial services implementation.
Gets the dimension of the given value or, if the value is a collections, the largest element dimension.
The dimension of geographyValue, or the largest element dimension if
is a collection.
The geography value for which the dimension value should be retrieved.
is null.
is not compatible with this spatial services implementation.
Returns a value that indicates the spatial type name of the given
value.
The spatial type name of the given value.
The geography value.
is null.
is not compatible with this spatial services implementation.
Returns a nullable Boolean value that whether the given value is empty.
True if the given value is empty; otherwise, false.
The geography value.
is null.
is not compatible with this spatial services implementation.
Gets the well-known text representation of the given value. This value should include only the Longitude and Latitude of points.
A string containing the well-known text representation of geographyValue.
The geography value for which the well-known text should be generated.
is null.
is not compatible with this spatial services implementation.
Returns a text representation of with elevation and measure.
A text representation of .
The geography value.
is null.
is not compatible with this spatial services implementation.
Gets the well-known binary representation of the given value.
The well-known binary representation of the given value.
The geography value for which the well-known binary should be generated.
is null.
is not compatible with this spatial services implementation.
Generates the Geography Markup Language (GML) representation of this
value.
A string containing the GML representation of this DbGeography value.
The geography value for which the GML should be generated.
is null.
is not compatible with this spatial services implementation.
Determines whether the two given values are spatially equal.
true if geographyValue is spatially equal to otherGeography; otherwise false.
The first geography value to compare for equality.
The second geography value to compare for equality.
or
is null.
or
is not compatible with this spatial services implementation.
Determines whether the two given values are spatially disjoint.
true if geographyValue is disjoint from otherGeography; otherwise false.
The first geography value to compare for disjointness.
The second geography value to compare for disjointness.
or
is null.
or
is not compatible with this spatial services implementation.
Determines whether the two given values spatially intersect.
true if geographyValue intersects otherGeography; otherwise false.
The first geography value to compare for intersection.
The second geography value to compare for intersection.
or
is null.
or
is not compatible with this spatial services implementation.
Creates a geography value representing all points less than or equal to distance from the given
value.
A new DbGeography value representing all points less than or equal to distance from geographyValue.
The geography value.
A double value specifying how far from geographyValue to buffer.
is null.
is not compatible with this spatial services implementation.
Computes the distance between the closest points in two values.
A double value that specifies the distance between the two closest points in geographyValue and otherGeography.
The first geography value.
The second geography value.
or
is null.
or
is not compatible with this spatial services implementation.
Computes the intersection of two values.
A new value representing the intersection of geographyValue and otherGeography.
The first geography value.
The second geography value.
or
is null.
or
is not compatible with this spatial services implementation.
Computes the union of two values.
A new value representing the union of geographyValue and otherGeography.
The first geography value.
The second geography value.
or
is null.
or
is not compatible with this spatial services implementation.
Computes the difference of two values.
A new DbGeography value representing the difference of geographyValue and otherGeography.
The first geography value.
The second geography value.
or
is null.
or
is not compatible with this spatial services implementation.
Computes the symmetric difference of two values.
A new value representing the symmetric difference of geographyValue and otherGeography.
The first geography value.
The second geography value.
or
is null.
or
is not compatible with this spatial services implementation.
Returns the number of elements in the given value, if it represents a geography collection.
The number of elements in geographyValue, if it represents a collection of other geography values; otherwise null.
The geography value, which need not represent a geography collection.
is null.
is not compatible with this spatial services implementation.
Returns an element of the given value, if it represents a geography collection.
The element in geographyValue at position index, if it represents a collection of other geography values; otherwise null.
The geography value, which need not represent a geography collection.
The position within the geography value from which the element should be taken.
is null.
is not compatible with this spatial services implementation.
Returns the Latitude coordinate of the given value, if it represents a point.
The Latitude coordinate of the given value.
The geography value, which need not represent a point.
is null.
is not compatible with this spatial services implementation.
Returns the Longitude coordinate of the given value, if it represents a point.
The Longitude coordinate of the given value.
The geography value, which need not represent a point.
is null.
is not compatible with this spatial services implementation.
Returns the elevation (Z coordinate) of the given value, if it represents a point.
The elevation (Z coordinate) of geographyValue, if it represents a point; otherwise null.
The geography value, which need not represent a point.
is null.
is not compatible with this spatial services implementation.
Returns the M (Measure) coordinate of the given value, if it represents a point.
The M (Measure) coordinate of the given value.
The geography value, which need not represent a point.
is null.
is not compatible with this spatial services implementation.
Returns a nullable double value that indicates the length of the given
value, which may be null if the value does not represent a curve.
The length of the given value.
The geography value, which need not represent a curve.
is null.
is not compatible with this spatial services implementation.
Returns a value that represents the start point of the given DbGeography value, which may be null if the value does not represent a curve.
The start point of the given value.
The geography value, which need not represent a curve.
is null.
is not compatible with this spatial services implementation.
Returns a value that represents the end point of the given DbGeography value, which may be null if the value does not represent a curve.
The end point of geographyValue, if it represents a curve; otherwise null.
The geography value, which need not represent a curve.
is null.
is not compatible with this spatial services implementation.
Returns a nullable Boolean value that whether the given value is closed, which may be null if the value does not represent a curve.
True if the given value is closed; otherwise, false.
The geography value, which need not represent a curve.
is null.
is not compatible with this spatial services implementation.
Returns the number of points in the given value, if it represents a linestring or linear ring.
The number of points in the given value.
The geography value, which need not represent a linestring or linear ring.
is null.
is not compatible with this spatial services implementation.
Returns a point element of the given value, if it represents a linestring or linear ring.
The point in geographyValue at position index, if it represents a linestring or linear ring; otherwise null.
The geography value, which need not represent a linestring or linear ring.
The position within the geography value from which the element should be taken.
is null.
is not compatible with this spatial services implementation.
Returns a nullable double value that indicates the area of the given
value, which may be null if the value does not represent a surface.
A nullable double value that indicates the area of the given value.
The geography value, which need not represent a surface.
is null.
is not compatible with this spatial services implementation.
This method is intended for use by derived implementations of
after suitable validation of the specified provider value to ensure it is suitable for use with the derived implementation.
A new instance that contains the specified providerValue and uses the specified spatialServices as its spatial implementation.
The spatial services instance that the returned value will depend on for its implementation of spatial functionality.
A provider value.
Creates a provider-specific value compatible with this spatial services implementation based on the specified well-known
representation.
A provider-specific value that encodes the information contained in wellKnownValue in a fashion compatible with this spatial services implementation.
An instance of that contains the well-known representation of a geometry value.
Creates an instance of that represents the specified
value using one or both of the standard well-known spatial formats.
The well-known representation of geometryValue, as a new
.
The geometry value.
is null.
is not compatible with this spatial services implementation.
Creates a new value based on a provider-specific value that is compatible with this spatial services implementation.
A new value backed by this spatial services implementation and the specified provider value.
A provider-specific value that this spatial services implementation is capable of interpreting as a geometry value.
is null.
is not compatible with this spatial services implementation.
Creates a new value based on the specified well-known binary value.
A new value as defined by the well-known binary value with the default
coordinate system identifier (SRID) (
).
A byte array that contains a well-known binary representation of the geometry value.
Creates a new value based on the specified well-known binary value and coordinate system identifier (SRID).
A new value as defined by the well-known binary value with the specified coordinate system identifier (SRID) (
).
A byte array that contains a well-known binary representation of the geometry value.
The identifier of the coordinate system that the new value should use.
Creates a new line value based on the specified well-known binary value and coordinate system identifier (SRID).
A new value as defined by the well-known binary value with the specified coordinate system identifier (SRID) (
).
A byte array that contains a well-known binary representation of the geometry value.
The identifier of the coordinate system that the new value should use.
Creates a new point value based on the specified well-known binary value and coordinate system identifier (SRID).
A new value as defined by the well-known binary value with the specified coordinate system identifier (SRID) (
).
A byte array that contains a well-known binary representation of the geometry value.
The identifier of the coordinate system that the new value should use.
Creates a new polygon value based on the specified well-known binary value and coordinate system identifier (SRID).
A new value as defined by the well-known binary value with the specified coordinate system identifier (SRID) (
).
A byte array that contains a well-known binary representation of the geometry value.
The identifier of the coordinate system that the new value should use.
Creates a new multiline value based on the specified well-known binary value and coordinate system identifier.
The new multiline value
The well-known binary value.
The coordinate system identifier.
Creates a new multipoint value based on the specified well-known binary value and coordinate system identifier.
A new multipoint value.
The well-known binary value.
The coordinate system identifier.
Creates a new multi polygon value based on the specified well-known binary value and coordinate system identifier.
A new multi polygon value.
The well-known binary value.
The coordinate system identifier.
Creates a new collection value based on the specified well-known binary value and coordinate system identifier (SRID).
A new value as defined by the well-known binary value with the specified coordinate system identifier (SRID) (
).
A byte array that contains a well-known binary representation of the geometry value.
The identifier of the coordinate system that the new value should use.
Creates a new value based on the specified well-known text value.
A new value as defined by the well-known text value with the default
coordinate system identifier (SRID) (
).
A string that contains a well-known text representation of the geometry value.
Creates a new value based on the specified well-known text value and coordinate system identifier (SRID).
A new value as defined by the well-known text value with the specified coordinate system identifier (SRID) (
).
A string that contains a well-known text representation of the geometry value.
The identifier of the coordinate system that the new value should use.
Creates a new line value based on the specified well-known text value and coordinate system identifier (SRID).
A new value as defined by the well-known text value with the specified coordinate system identifier (SRID) (
).
A string that contains a well-known text representation of the geometry value.
The identifier of the coordinate system that the new value should use.
Creates a new point value based on the specified well-known text value and coordinate system identifier (SRID).
A new value as defined by the well-known text value with the specified coordinate system identifier (SRID) (
).
A string that contains a well-known text representation of the geometry value.
The identifier of the coordinate system that the new value should use.
Creates a new polygon value based on the specified well-known text value and coordinate system identifier (SRID).
A new value as defined by the well-known text value with the specified coordinate system identifier (SRID) (
).
A string that contains a well-known text representation of the geometry value.
The identifier of the coordinate system that the new value should use.
Creates a new multiline value based on the specified well-known text value and coordinate system identifier.
A new multiline value
The well-known text value.
The coordinate system identifier.
Creates a new multipoint value based on the specified well-known text value and coordinate system identifier.
A new multipoint value.
The well-known text value.
The coordinate system identifier.
Creates a new multi polygon value based on the specified well-known text value and coordinate system identifier.
A new multi polygon value.
The well-known text value.
The coordinate system identifier.
Creates a new collection value based on the specified well-known text value and coordinate system identifier (SRID).
A new value as defined by the well-known text value with the specified coordinate system identifier (SRID) (
).
A string that contains a well-known text representation of the geometry value.
The identifier of the coordinate system that the new value should use.
Creates a new value based on the specified Geography Markup Language (GML) value.
A new value as defined by the GML value with the default
coordinate system identifier (SRID) (
).
A string that contains a Geography Markup Language (GML) representation of the geometry value.
Creates a new value based on the specified Geography Markup Language (GML) value and coordinate system identifier (SRID).
A new value as defined by the GML value with the specified coordinate system identifier (SRID).
A string that contains a Geography Markup Language (GML) representation of the geometry value.
The identifier of the coordinate system that the new value should use.
Returns the coordinate system identifier of the given value.
The coordinate system identifier of the given value.
The geometry value.
is null.
is not compatible with this spatial services implementation.
Returns a nullable double value that indicates the boundary of the given
value.
The boundary of the given value.
The geometry value.
is null.
is not compatible with this spatial services implementation.
Gets the dimension of the given value or, if the value is a collections, the largest element dimension.
The dimension of geometryValue, or the largest element dimension if
is a collection.
The geometry value for which the dimension value should be retrieved.
Gets the envelope (minimum bounding box) of the given value, as a geometry value.
The envelope of geometryValue, as a value.
The geometry value for which the envelope value should be retrieved.
is null.
is not compatible with this spatial services implementation.
Returns a value that indicates the spatial type name of the given
value.
The spatial type name of the given value.
The geometry value.
is null.
is not compatible with this spatial services implementation.
Returns a nullable Boolean value that whether the given value is empty.
True if the given value is empty; otherwise, false.
The geometry value.
is null.
is not compatible with this spatial services implementation.
Returns a nullable Boolean value that whether the given value is simple.
True if the given value is simple; otherwise, false.
The geometry value.
is null.
is not compatible with this spatial services implementation.
Returns a nullable Boolean value that whether the given value is valid.
True if the given value is valid; otherwise, false.
The geometry value.
is null.
is not compatible with this spatial services implementation.
Gets the well-known text representation of the given value, including only X and Y coordinates for points.
A string containing the well-known text representation of geometryValue.
The geometry value for which the well-known text should be generated.
is null.
is not compatible with this spatial services implementation.
Returns a text representation of with elevation and measure.
A text representation of with elevation and measure.
The geometry value.
is null.
is not compatible with this spatial services implementation.
Gets the well-known binary representation of the given value.
The well-known binary representation of the given value.
The geometry value for which the well-known binary should be generated.
is null.
is not compatible with this spatial services implementation.
Generates the Geography Markup Language (GML) representation of this
value.
A string containing the GML representation of this DbGeometry value.
The geometry value for which the GML should be generated.
is null.
is not compatible with this spatial services implementation.
Determines whether the two given values are spatially equal.
true if geometryValue is spatially equal to otherGeometry; otherwise false.
The first geometry value to compare for equality.
The second geometry value to compare for equality.
or
is null.
or
is not compatible with this spatial services implementation.
Determines whether the two given values are spatially disjoint.
true if geometryValue is disjoint from otherGeometry; otherwise false.
The first geometry value to compare for disjointness.
The second geometry value to compare for disjointness.
or
is null.
or
is not compatible with this spatial services implementation.
Determines whether the two given values spatially intersect.
true if geometryValue intersects otherGeometry; otherwise false.
The first geometry value to compare for intersection.
The second geometry value to compare for intersection.
or
is null.
or
is not compatible with this spatial services implementation.
Determines whether the two given values spatially touch.
true if geometryValue touches otherGeometry; otherwise false.
The first geometry value.
The second geometry value.
or
is null.
or
is not compatible with this spatial services implementation.
Determines whether the two given values spatially cross.
true if geometryValue crosses otherGeometry; otherwise false.
The first geometry value.
The second geometry value.
or
is null.
or
is not compatible with this spatial services implementation.
Determines whether one value is spatially within the other.
true if geometryValue is within otherGeometry; otherwise false.
The first geometry value.
The second geometry value.
or
is null.
or
is not compatible with this spatial services implementation.
Determines whether one value spatially contains the other.
true if geometryValue contains otherGeometry; otherwise false.
The first geometry value.
The second geometry value.
or
is null.
or
is not compatible with this spatial services implementation.
Determines whether the two given values spatially overlap.
true if geometryValue overlaps otherGeometry; otherwise false.
The first geometry value.
The second geometry value.
or
is null.
or
is not compatible with this spatial services implementation.
Determines whether the two given values are spatially related according to the given Dimensionally Extended Nine-Intersection Model (DE-9IM) intersection pattern.
true if this geometryValue value relates to otherGeometry according to the specified intersection pattern matrix; otherwise false.
The first geometry value.
The geometry value that should be compared with the first geometry value for relation.
A string that contains the text representation of the (DE-9IM) intersection pattern that defines the relation.
,
or
is null.
or
is not compatible with this spatial services implementation.
Creates a geometry value representing all points less than or equal to distance from the given
value.
A new DbGeometry value representing all points less than or equal to distance from geometryValue.
The geometry value.
A double value specifying how far from geometryValue to buffer.
is null.
is not compatible with this spatial services implementation.
Computes the distance between the closest points in two values.
A double value that specifies the distance between the two closest points in geometryValue and otherGeometry.
The first geometry value.
The second geometry value.
or
is null.
or
is not compatible with this spatial services implementation.
Returns a nullable double value that indicates the convex hull of the given
value.
The convex hull of the given value.
The geometry value.
is null.
is not compatible with this spatial services implementation.
Computes the intersection of two values.
A new value representing the intersection of geometryValue and otherGeometry.
The first geometry value.
The second geometry value.
or
is null.
or
is not compatible with this spatial services implementation.
Computes the union of two values.
A new value representing the union of geometryValue and otherGeometry.
The first geometry value.
The second geometry value.
or
is null.
or
is not compatible with this spatial services implementation.
Computes the difference between two values.
A new DbGeometry value representing the difference between geometryValue and otherGeometry.
The first geometry value.
The second geometry value.
or
is null.
or
is not compatible with this spatial services implementation.
Computes the symmetric difference between two values.
A new value representing the symmetric difference between geometryValue and otherGeometry.
The first geometry value.
The second geometry value.
or
is null.
or
is not compatible with this spatial services implementation.
Returns the number of elements in the given value, if it represents a geometry collection.
The number of elements in geometryValue, if it represents a collection of other geometry values; otherwise null.
The geometry value, which need not represent a geometry collection.
is null.
is not compatible with this spatial services implementation.
Returns an element of the given value, if it represents a geometry collection.
The element in geometryValue at position index, if it represents a collection of other geometry values; otherwise null.
The geometry value, which need not represent a geometry collection.
The position within the geometry value from which the element should be taken.
is null.
is not compatible with this spatial services implementation.
Returns the X coordinate of the given value, if it represents a point.
The X coordinate of the given value.
The geometry value, which need not represent a point.
is null.
is not compatible with this spatial services implementation.
Returns the Y coordinate of the given value, if it represents a point.
The Y coordinate of the given value.
The geometry value, which need not represent a point.
is null.
is not compatible with this spatial services implementation.
Returns the elevation (Z) of the given value, if it represents a point.
The elevation (Z) of geometryValue, if it represents a point; otherwise null.
The geometry value, which need not represent a point.
is null.
is not compatible with this spatial services implementation.
Returns the M (Measure) coordinate of the given value, if it represents a point.
The M (Measure) coordinate of the given value.
The geometry value, which need not represent a point.
is null.
is not compatible with this spatial services implementation.
Returns a nullable double value that indicates the length of the given
value, which may be null if the value does not represent a curve.
The length of the given value.
The geometry value, which need not represent a curve.
is null.
is not compatible with this spatial services implementation.
Returns a value that represents the start point of the given DbGeometry value, which may be null if the value does not represent a curve.
The start point of the given value.
The geometry value, which need not represent a curve.
is null.
is not compatible with this spatial services implementation.
Returns a value that represents the end point of the given DbGeometry value, which may be null if the value does not represent a curve.
The end point of geometryValue, if it represents a curve; otherwise null.
The geometry value, which need not represent a curve.
is null.
is not compatible with this spatial services implementation.
Returns a nullable Boolean value that whether the given value is closed, which may be null if the value does not represent a curve.
True if the given value is closed; otherwise, false.
The geometry value, which need not represent a curve.
is null.
is not compatible with this spatial services implementation.
Returns a nullable Boolean value that whether the given value is a ring, which may be null if the value does not represent a curve.
True if the given value is a ring; otherwise, false.
The geometry value, which need not represent a curve.
is null.
is not compatible with this spatial services implementation.
Returns the number of points in the given value, if it represents a linestring or linear ring.
The number of points in the given value.
The geometry value, which need not represent a linestring or linear ring.
is null.
is not compatible with this spatial services implementation.
Returns a point element of the given value, if it represents a linestring or linear ring.
The point in geometryValue at position index, if it represents a linestring or linear ring; otherwise null.
The geometry value, which need not represent a linestring or linear ring.
The position within the geometry value from which the element should be taken.
is null.
is not compatible with this spatial services implementation.
Returns a nullable double value that indicates the area of the given
value, which may be null if the value does not represent a surface.
A nullable double value that indicates the area of the given value.
The geometry value, which need not represent a surface.
is null.
is not compatible with this spatial services implementation.
Returns a value that represents the centroid of the given DbGeometry value, which may be null if the value does not represent a surface.
The centroid of geometryValue, if it represents a surface; otherwise null.
The geometry value, which need not represent a surface.
is null.
is not compatible with this spatial services implementation.
Returns a value that represents a point on the surface of the given DbGeometry value, which may be null if the value does not represent a surface.
A value that represents a point on the surface of the given DbGeometry value.
The geometry value, which need not represent a surface.
is null.
is not compatible with this spatial services implementation.
Returns a value that represents the exterior ring of the given DbGeometry value, which may be null if the value does not represent a polygon.
A DbGeometry value representing the exterior ring on geometryValue, if it represents a polygon; otherwise null.
The geometry value, which need not represent a polygon.
is null.
is not compatible with this spatial services implementation.
Returns the number of interior rings in the given value, if it represents a polygon.
The number of elements in geometryValue, if it represents a polygon; otherwise null.
The geometry value, which need not represent a polygon.
is null.
is not compatible with this spatial services implementation.
Returns an interior ring from the given value, if it represents a polygon.
The interior ring in geometryValue at position index, if it represents a polygon; otherwise null.
The geometry value, which need not represent a polygon.
The position within the geometry value from which the element should be taken.
is null.
is not compatible with this spatial services implementation.
Gets the default services for the .
The default services.
Override this property to allow the spatial provider to fail fast when native types or other
resources needed for the spatial provider to function correctly are not available.
The default value is true
which means that EF will continue with the assumption
that the provider has the necessary types/resources rather than failing fast.
The same as but works in partial trust and adds explicit caching of
generated indentation string and also recognizes writing a string that contains just \r\n or \n as a write-line to ensure
we indent the next line properly.
Specifies the default tab string. This field is constant.
Specifies the culture what will be used by the underlying TextWriter. This static property is read-only.
Note that any writer passed to one of the constructors of must use this
same culture. The culture is .
Initializes a new instance of the IndentedTextWriter class using the specified text writer and default tab string.
Note that the writer passed to this constructor must use the specified by the
property.
The to use for output.
Initializes a new instance of the IndentedTextWriter class using the specified text writer and tab string.
Note that the writer passed to this constructor must use the specified by the
property.
The to use for output.
The tab string to use for indentation.
Closes the document being written to.
Flushes the stream.
Outputs the tab string once for each level of indentation according to the
property.
Builds a string representing the current indentation level for a new line.
Does NOT check if tabs are currently pending, just returns a string that would be
useful in replacing embedded newline characters.
An empty string, or a string that contains .Indent level's worth of specified tab-string.
Writes the specified string to the text stream.
The string to write.
Writes the text representation of a Boolean value to the text stream.
The Boolean value to write.
Writes a character to the text stream.
The character to write.
Writes a character array to the text stream.
The character array to write.
Writes a subarray of characters to the text stream.
The character array to write data from.
Starting index in the buffer.
The number of characters to write.
Writes the text representation of a Double to the text stream.
The double to write.
Writes the text representation of a Single to the text stream.
The single to write.
Writes the text representation of an integer to the text stream.
The integer to write.
Writes the text representation of an 8-byte integer to the text stream.
The 8-byte integer to write.
Writes the text representation of an object to the text stream.
The object to write.
Writes out a formatted string, using the same semantics as specified.
The formatting string.
The object to write into the formatted string.
Writes out a formatted string, using the same semantics as specified.
The formatting string to use.
The first object to write into the formatted string.
The second object to write into the formatted string.
Writes out a formatted string, using the same semantics as specified.
The formatting string to use.
The argument array to output.
Writes the specified string to a line without tabs.
The string to write.
Writes the specified string, followed by a line terminator, to the text stream.
The string to write.
Writes a line terminator.
Writes the text representation of a Boolean, followed by a line terminator, to the text stream.
The Boolean to write.
Writes a character, followed by a line terminator, to the text stream.
The character to write.
Writes a character array, followed by a line terminator, to the text stream.
The character array to write.
Writes a subarray of characters, followed by a line terminator, to the text stream.
The character array to write data from.
Starting index in the buffer.
The number of characters to write.
Writes the text representation of a Double, followed by a line terminator, to the text stream.
The double to write.
Writes the text representation of a Single, followed by a line terminator, to the text stream.
The single to write.
Writes the text representation of an integer, followed by a line terminator, to the text stream.
The integer to write.
Writes the text representation of an 8-byte integer, followed by a line terminator, to the text stream.
The 8-byte integer to write.
Writes the text representation of an object, followed by a line terminator, to the text stream.
The object to write.
Writes out a formatted string, followed by a line terminator, using the same semantics as specified.
The formatting string.
The object to write into the formatted string.
Writes out a formatted string, followed by a line terminator, using the same semantics as specified.
The formatting string to use.
The first object to write into the formatted string.
The second object to write into the formatted string.
Writes out a formatted string, followed by a line terminator, using the same semantics as specified.
The formatting string to use.
The argument array to output.
Writes the text representation of a UInt32, followed by a line terminator, to the text stream.
A UInt32 to output.
Gets the encoding for the text writer to use.
An that indicates the encoding for the text writer to use.
Gets or sets the new line character to use.
The new line character to use.
Gets or sets the number of spaces to indent.
The number of spaces to indent.
Gets the to use.
The to use.
Used for generating values that are always in sequential
order for the calling thread.
Returns the value of unless this value would be the same as the
last value returned by this thread calling this method, in which case the thread pushes the value
a little bit into the future. The comparison is in terms of the form used to store migration ID
in the database--i.e. to the 1/10 second.
There should never be any pushing to the future involved for normal use of migrations, but when
this method is called in rapid succession while testing or otherwise calling the DbMigrator APIs
there may be occasional sleeping.
Same as UtcNow method bur returns the time in the timestamp format used in migration IDs.
Convention to apply column ordering specified via
or the API. This convention throws if a duplicate configured column order
is detected.
Convention to apply column ordering specified via
or the API.
Validates the ordering configuration supplied for columns.
This base implementation is a no-op.
The name of the table that the columns belong to.
The definition of the table.
Validates the ordering configuration supplied for columns to ensure
that the same ordinal was not supplied for two columns.
The name of the table that the columns belong to.
The definition of the table.
Strongly-typed and parameterized string resources.
A string like "Applying automatic migration: {0}."
A string like "Reverting automatic migration: {0}."
A string like "Applying explicit migration: {0}."
A string like "Reverting explicit migration: {0}."
A string like "Applying explicit migrations: [{1}]."
A string like "Reverting migrations: [{1}]."
A string like "Target database is already at version {0}."
A string like "Target database is: {0}."
A string like "'{1}' (DataSource: {0}, Provider: {2}, Origin: {3})"
A string like "The specified target migration '{0}' does not exist. Ensure that target migration refers to an existing migration id."
A string like "The Foreign Key on table '{0}' with columns '{1}' could not be created because the principal key columns could not be determined. Use the AddForeignKey fluent API to fully specify the Foreign Key."
A string like "'{0}' is not a valid target migration. When targeting a previously applied automatic migration, use the full migration id including timestamp."
A string like "'{0}' is not a valid migration. Explicit migrations must be used for both source and target when scripting the upgrade between them."
A string like "The target context '{0}' is not constructible. Add a default constructor or provide an implementation of IDbContextFactory."
A string like "The specified migration name '{0}' is ambiguous. Specify the full migration id including timestamp instead."
A string like "The migrations configuration type '{0}' was not be found in the assembly '{1}'."
A string like "More than one migrations configuration type '{0}' was found in the assembly '{1}'. Specify the fully qualified name of the one to use."
A string like "No migrations configuration type was found in the assembly '{0}'. (In Visual Studio you can use the Enable-Migrations command from Package Manager Console to add a migrations configuration)."
A string like "More than one migrations configuration type was found in the assembly '{0}'. Specify the name of the one to use."
A string like "In VB.NET projects, the migrations namespace '{0}' must be under the root namespace '{1}'. Update the migrations project's root namespace to allow classes under the migrations namespace to be added."
A string like "No MigrationSqlGenerator found for provider '{0}'. Use the SetSqlGenerator method in the target migrations configuration class to register additional SQL generators."
A string like "Could not load assembly '{0}'. (If you are using Code First Migrations inside Visual Studio this can happen if the startUp project for your solution does not reference the project that contains your migrations. You can either change the startUp project for your solution or use the -StartUpProjectName parameter.)"
A string like "The argument '{0}' cannot be null, empty or contain only white space."
A string like "The type '{0}' has already been configured as a complex type. It cannot be reconfigured as an entity type."
A string like "The type '{0}' has already been configured as an entity type. It cannot be reconfigured as a complex type."
A string like "The key component '{0}' is not a declared property on type '{1}'. Verify that it has not been explicitly excluded from the model and that it is a valid primitive property."
A string like "The foreign key component '{0}' is not a declared property on type '{1}'. Verify that it has not been explicitly excluded from the model and that it is a valid primitive property."
A string like "The property '{0}' is not a declared property on type '{1}'. Verify that the property has not been explicitly excluded from the model by using the Ignore method or NotMappedAttribute data annotation. Make sure that it is a valid primitive property."
A string like "The navigation property '{0}' is not a declared property on type '{1}'. Verify that it has not been explicitly excluded from the model and that it is a valid navigation property."
A string like "The expression '{0}' is not a valid property expression. The expression should represent a property: C#: 't => t.MyProperty' VB.Net: 'Function(t) t.MyProperty'."
A string like "The expression '{0}' is not a valid property expression. The expression should represent a property: C#: 't => t.MyProperty' VB.Net: 'Function(t) t.MyProperty'. Use dotted paths for nested properties: C#: 't => t.MyProperty.MyProperty' VB.Net: 'Function(t) t.MyProperty.MyProperty'."
A string like "The properties expression '{0}' is not valid. The expression should represent a property: C#: 't => t.MyProperty' VB.Net: 'Function(t) t.MyProperty'. When specifying multiple properties use an anonymous type: C#: 't => new {{ t.MyProperty1, t.MyProperty2 }}' VB.Net: 'Function(t) New With {{ t.MyProperty1, t.MyProperty2 }}'."
A string like "The properties expression '{0}' is not valid. The expression should represent a property: C#: 't => t.MyProperty' VB.Net: 'Function(t) t.MyProperty'. When specifying multiple properties use an anonymous type: C#: 't => new {{ t.MyProperty1, t.MyProperty2 }}' VB.Net: 'Function(t) New With {{ t.MyProperty1, t.MyProperty2 }}'."
A string like "Conflicting configuration settings were specified for property '{0}' on type '{1}': {2}"
A string like "Conflicting configuration settings were specified for column '{0}' on table '{1}': {2}"
A string like "{0} = {1} conflicts with {2} = {3}"
A string like "The type '{0}' was not mapped. Check that the type has not been explicitly excluded by using the Ignore method or NotMappedAttribute data annotation. Verify that the type was defined as a class, is not primitive or generic, and does not inherit from ComplexObject."
A string like "The type '{0}' was not mapped. Check that the type has not been explicitly excluded by using the Ignore method or NotMappedAttribute data annotation. Verify that the type was defined as a class, is not primitive or generic, and does not inherit from EntityObject."
A string like "The type '{0}' and the type '{1}' both have the same simple name of '{2}' and so cannot be used in the same model. All types in a given model must have unique simple names. Use 'NotMappedAttribute' or call Ignore in the Code First fluent API to explicitly exclude a property or type from the model."
A string like "The navigation property '{0}' declared on type '{1}' cannot be the inverse of itself."
A string like "The navigation property '{0}' declared on type '{1}' has been configured with conflicting foreign keys."
A string like "Values of incompatible types ('{1}' and '{2}') were assigned to the '{0}' discriminator column. Values of the same type must be specified. To explicitly specify the type of the discriminator column use the HasColumnType method."
A string like "The navigation property '{0}' declared on type '{1}' has been configured with conflicting mapping information."
A string like "The navigation property '{0}' declared on type '{1}' has been configured with conflicting cascade delete operations using 'WillCascadeOnDelete'."
A string like "The navigation property '{0}' declared on type '{1}' has been configured with conflicting multiplicities."
A string like "The MaxLengthAttribute on property '{0}' on type '{1} is not valid. The Length value must be greater than zero. Use MaxLength() without parameters to indicate that the string or array can have the maximum allowable length."
A string like "The StringLengthAttribute on property '{0}' on type '{1}' is not valid. The maximum length must be greater than zero. Use MaxLength() without parameters to indicate that the string or array can have the maximum allowable length."
A string like "Unable to determine composite primary key ordering for type '{0}'. Use the ColumnAttribute or the HasKey method to specify an order for composite primary keys."
A string like "The ForeignKeyAttribute on property '{0}' on type '{1}' is not valid. Name must not be empty."
A string like "The ForeignKeyAttribute on property '{0}' on type '{1}' is not valid. The foreign key name '{2}' was not found on the dependent type '{3}'. The Name value should be a comma separated list of foreign key property names."
A string like "The ForeignKeyAttribute on property '{0}' on type '{1}' is not valid. The navigation property '{2}' was not found on the dependent type '{1}'. The Name value should be a valid navigation property name."
A string like "Unable to determine a composite foreign key ordering for foreign key on type {0}. When using the ForeignKey data annotation on composite foreign key properties ensure order is specified by using the Column data annotation or the fluent API."
A string like "The InversePropertyAttribute on property '{2}' on type '{3}' is not valid. The property '{0}' is not a valid navigation property on the related type '{1}'. Ensure that the property exists and is a valid reference or collection navigation property."
A string like "A relationship cannot be established from property '{0}' on type '{1}' to property '{0}' on type '{1}'. Check the values in the InversePropertyAttribute to ensure relationship definitions are unique and reference from one navigation property to its corresponding inverse navigation property."
A string like "{0}: {1}: {2}"
A string like "A key is registered for the derived type '{0}'. Keys can only be registered for the root type '{1}'."
A string like "The type '{0}' has already been mapped to table '{1}'. Specify all mapping aspects of a table in a single Map call."
A string like "Map was called more than once for type '{0}' and at least one of the calls didn't specify the target table name."
A string like "The derived type '{0}' has already been mapped using the chaining syntax. A derived type can only be mapped once using the chaining syntax."
A string like "An "is not null" condition cannot be specified on property '{0}' on type '{1}' because this property is not included in the model. Check that the property has not been explicitly excluded from the model by using the Ignore method or NotMappedAttribute data annotation."
A string like "Values of type '{0}' cannot be used as type discriminator values. Supported types include byte, signed byte, bool, int16, int32, int64, and string."
A string like "Unable to add the convention '{0}'. Could not find an existing convention of type '{1}' in the current convention set."
A string like "Not all properties for type '{0}' have been mapped. Either map those properties or explicitly excluded them from the model."
A string like "Unable to determine the provider name for provider factory of type '{0}'. Make sure that the ADO.NET provider is installed or registered in the application config."
A string like "Unable to determine the DbProviderFactory type for connection of type '{0}'. Make sure that the ADO.NET provider is installed or registered in the application config."
A string like "Properties for type '{0}' can only be mapped once. Ensure the MapInheritedProperties method is only used during one call to the Map method."
A string like "Properties for type '{0}' can only be mapped once. Ensure the Properties method is used and that repeated calls specify each non-key property only once."
A string like "Properties for type '{0}' can only be mapped once. The non-key property '{1}' is mapped more than once. Ensure the Properties method specifies each non-key property only once."
A string like "The property '{1}' on type '{0}' cannot be mapped because it has been explicitly excluded from the model or it is of a type not supported by the DbModelBuilderVersion being used."
A string like "The entity types '{0}' and '{1}' cannot share table '{2}' because they are not in the same type hierarchy or do not have a valid one to one foreign key relationship with matching primary keys between them."
A string like "You cannot use Ignore method on the property '{0}' on type '{1}' because this type inherits from the type '{2}' where this property is mapped. To exclude this property from your model, use NotMappedAttribute or Ignore method on the base type."
A string like "The property '{0}' cannot be used as a key property on the entity '{1}' because the property type is not a valid key type. Only scalar types, string and byte[] are supported key types."
A string like "The specified table '{0}' was not found in the model. Ensure that the table name has been correctly specified."
A string like "The specified association foreign key columns '{0}' are invalid. The number of columns specified must match the number of primary key columns."
A string like "Unable to determine the principal end of an association between the types '{0}' and '{1}'. The principal end of this association must be explicitly configured using either the relationship fluent API or data annotations."
A string like "The abstract type '{0}' has no mapped descendants and so cannot be mapped. Either remove '{0}' from the model or add one or more types deriving from '{0}' to the model. "
A string like "The type '{0}' cannot be mapped as defined because it maps inherited properties from types that use entity splitting or another form of inheritance. Either choose a different inheritance mapping strategy so as to not map inherited properties, or change all types in the hierarchy to map inherited properties and to not use splitting. "
A string like "The table '{0}' was configured but is not used in any mappings. Verify the mapping configuration for '{0}' is correct."
A string like "Both property '{0}' on type '{1}' and property '{2}' on type '{3}' map to column '{4}' on table '{5}' but the configuration of the column for property '{1}.{0}' is incompatible with the configuration of the column for property '{3}.{2}'. The column type and configuration must be the same for all properties that map to a given column in a TPH table. {6}"
A string like "The configured column orders for the table '{0}' contains duplicates. Ensure the specified column order values are distinct."
A string like "The enum or spatial property '{1}' on type '{0}' cannot be mapped. Use DbModelBuilderVersion 'V5_0' or later to map enum or spatial properties."
A string like "Multiple potential primary key properties named '{0}' but differing only by case were found on entity type '{1}'. Configure the primary key explicitly using the HasKey fluent API or the KeyAttribute data annotation."
A string like "Cannot get value for property '{0}' from entity of type '{1}' because the property has no get accessor."
A string like "Cannot set value for property '{0}' on entity of type '{1}' because the property has no set accessor."
A string like "Cannot set value for property '{0}' on entity of type '{1}' because the property has no set accessor and is in the '{2}' state."
A string like "Member '{0}' cannot be called for property '{1}' on entity of type '{2}' because the property is not part of the Entity Data Model."
A string like "Cannot call the {0} method for an entity of type '{1}' on a DbSet for entities of type '{2}'. Only entities of type '{2}' or derived from type '{2}' can be added, attached, or removed."
A string like "Cannot call the Create method for the type '{0}' on a DbSet for entities of type '{1}'. Only entities of type '{1}' or derived from type '{1}' can be created."
A string like "The property '{0}' on type '{1}' is a collection navigation property. The Collection method should be used instead of the Reference method."
A string like "The property '{0}' on type '{1}' is a reference navigation property. The Reference method should be used instead of the Collection method."
A string like "The property '{0}' on type '{1}' is not a navigation property. The Reference and Collection methods can only be used with navigation properties. Use the Property or ComplexProperty method."
A string like "The property '{0}' on type '{1}' is not a primitive or complex property. The Property method can only be used with primitive or complex properties. Use the Reference or Collection method."
A string like "The property '{0}' on type '{1}' is not a complex property. The ComplexProperty method can only be used with complex properties. Use the Property, Reference or Collection method."
A string like "The property '{0}' on type '{1}' is not a primitive property, complex property, collection navigation property, or reference navigation property."
A string like ""The property '{0}' from the property path '{1}' is not a complex property on type '{2}'. Property paths must be composed of complex properties for all except the final property.""
A string like ""The property path '{0}' cannot be used for navigation properties. Property paths can only be used to access primitive or complex properties.""
A string like "The navigation property '{0}' on entity type '{1}' cannot be used for entities of type '{2}' because it refers to entities of type '{3}'."
A string like "The generic type argument '{0}' cannot be used with the Member method when accessing the collection navigation property '{1}' on entity type '{2}'. The generic type argument '{3}' must be used instead."
A string like "The property '{0}' on entity type '{1}' cannot be used for objects of type '{2}' because it is a property for objects of type '{3}'."
A string like "The expression passed to method {0} must represent a property defined on the type '{1}'."
A string like "{0} cannot be used for entities in the {1} state."
A string like "Cannot set non-nullable property '{0}' of type '{1}' to null on object of type '{2}'."
A string like "The property '{0}' in the entity of type '{1}' is null. Store values cannot be obtained for an entity with a null complex property."
A string like "Cannot assign value of type '{0}' to property '{1}' of type '{2}' in property values for type '{3}'."
A string like "The '{0}' property does not exist or is not mapped for the type '{1}'."
A string like "Cannot copy values from DbPropertyValues for type '{0}' into DbPropertyValues for type '{1}'."
A string like "Cannot copy from property values for object of type '{0}' into property values for object of type '{1}'."
A string like "The value of the complex property '{0}' on entity of type '{1}' is null. Complex properties cannot be set to null and values cannot be set for null complex properties."
A string like "The value of the nested property values property '{0}' on the values for entity of type '{1}' is null. Nested property values cannot be set to null and values cannot be set for null complex properties."
A string like "Cannot set the value of the nested property '{0}' because value of the complex property '{1}' to which it belongs is null."
A string like "Cannot set the original value of the nested property '{0}' because the original value of the complex property '{1}' to which it belongs is null."
A string like "The model backing the '{0}' context has changed since the database was created. Consider using Code First Migrations to update the database (http://go.microsoft.com/fwlink/?LinkId=238269)."
A string like "Migrations is enabled for context '{0}' but the database does not exist or contains no mapped tables. Use Migrations to create the database and its tables, for example by running the 'Update-Database' command from the Package Manager Console."
A string like "Database '{0}' cannot be created because it already exists."
A string like "Failed to set database initializer of type '{0}' for DbContext type '{1}' specified in the application configuration. See inner exception for details."
A string like "Configuration for DbContext type '{0}' is specified multiple times in the application configuration. Each context can only be configured once."
A string like "Failed to set Database.DefaultConnectionFactory to an instance of the '{0}' type as specified in the application configuration. See inner exception for details."
A string like "The connection string '{0}' in the application's configuration file does not contain the required providerName attribute.""
A string like "The entity found was of type {0} when an entity of type {1} was requested."
A string like "The type '{0}' is mapped as a complex type. The Set method, DbSet objects, and DbEntityEntry objects can only be used with entity types, not complex types."
A string like "The type '{0}' is not attributed with EdmEntityTypeAttribute but is contained in an assembly attributed with EdmSchemaAttribute. POCO entities that do not use EdmEntityTypeAttribute cannot be contained in the same assembly as non-POCO entities that use EdmEntityTypeAttribute."
A string like "The entity type {0} is not part of the model for the current context."
A string like "No connection string named '{0}' could be found in the application config file."
A string like "The collection navigation property '{0}' on the entity of type '{1}' cannot be set because the entity type does not define a navigation property with a set accessor."
A string like "Multiple object sets per type are not supported. The object sets '{0}' and '{1}' can both contain instances of type '{2}'."
A string like "The context type '{0}' must have a public constructor taking an EntityConnection."
A string like "An unexpected exception was thrown during validation of '{0}' when invoking {1}.IsValid. See the inner exception for details."
A string like "An unexpected exception was thrown during validation of '{0}' when invoking {1}.Validate. See the inner exception for details."
A string like "The database name '{0}' is not supported because it is an MDF file name. A full connection string must be provided to attach an MDF file."
A string like "The context factory type '{0}' must have a public default constructor."
A string like "The namespace '{0}' is a system namespace and cannot be used by other schemas. Choose another namespace name."
A string like "Role '{0}' in AssociationSets '{1}' and '{2}' refers to the same EntitySet '{3}' in EntityContainer '{4}'. Make sure that if two or more AssociationSets refer to the same AssociationType, the ends do not refer to the same EntitySet."
A string like "The referenced EntitySet '{0}' for End '{1}' could not be found in the containing EntityContainer."
A string like "Type '{0}' is derived from type '{1}' that is the type for EntitySet '{2}'. Type '{0}' defines new concurrency requirements that are not allowed for subtypes of base EntitySet types."
A string like "EntitySet '{0}' is based on type '{1}' that has no keys defined."
A string like "The end name '{0}' is already defined."
A string like "The key specified in EntityType '{0}' is not valid. Property '{1}' is referenced more than once in the Key element."
A string like "Property '{0}' has a CollectionKind specified but is not a collection property."
A string like "Property '{0}' has a CollectionKind specified. CollectionKind is only supported in version 1.1 EDM models."
A string like "ComplexType '{0}' is marked as abstract. Abstract ComplexTypes are only supported in version 1.1 EDM models."
A string like "ComplexType '{0}' has a BaseType specified. ComplexType inheritance is only supported in version 1.1 EDM models."
A string like "Key part '{0}' for type '{1}' is not valid. All parts of the key must be non-nullable."
A string like "The property '{0}' in EntityType '{1}' is not valid. All properties that are part of the EntityKey must be of PrimitiveType."
A string like "Key usage is not valid. The {0} class cannot define keys because one of its base classes ('{1}') defines keys."
A string like "EntityType '{0}' has no key defined. Define the key for this EntityType."
A string like "NavigationProperty is not valid. Role '{0}' or Role '{1}' is not defined in Relationship '{2}'."
A string like "End '{0}' on relationship '{1}' cannot have an operation specified because its multiplicity is '*'. Operations cannot be specified on ends with multiplicity '*'."
A string like "Each Name and PluralName in a relationship must be unique. '{0}' is already defined."
A string like "In relationship '{0}', the Principal and Dependent Role of the referential constraint refer to the same Role in the relationship type."
A string like "Multiplicity is not valid in Role '{0}' in relationship '{1}'. Valid values for multiplicity for the Principal Role are '0..1' or '1'."
A string like "Multiplicity is not valid in Role '{0}' in relationship '{1}'. Because all the properties in the Dependent Role are nullable, multiplicity of the Principal Role must be '0..1'."
A string like "Multiplicity conflicts with the referential constraint in Role '{0}' in relationship '{1}'. Because at least one of the properties in the Dependent Role is non-nullable, multiplicity of the Principal Role must be '1'."
A string like "Multiplicity conflicts with the referential constraint in Role '{0}' in relationship '{1}'. Because all of the properties in the Dependent Role are non-nullable, multiplicity of the Principal Role must be '1'."
A string like "Properties referred by the Dependent Role '{0}' must be a subset of the key of the EntityType '{1}' referred to by the Dependent Role in the referential constraint for relationship '{2}'."
A string like "Multiplicity is not valid in Role '{0}' in relationship '{1}'. Because the Dependent Role refers to the key properties, the upper bound of the multiplicity of the Dependent Role must be '1'."
A string like "Multiplicity is not valid in Role '{0}' in relationship '{1}'. Because the Dependent Role properties are not the key properties, the upper bound of the multiplicity of the Dependent Role must be '*'."
A string like "The types of all properties in the Dependent Role of a referential constraint must be the same as the corresponding property types in the Principal Role. The type of property '{0}' on entity '{1}' does not match the type of property '{2}' on entity '{3}' in the referential constraint '{4}'."
A string like "There is no property with name '{0}' defined in the type referred to by Role '{1}'."
A string like "A nullable ComplexType is not supported. Property '{0}' must not allow nulls."
A string like "A property cannot be of type '{0}'. The property type must be a ComplexType or a PrimitiveType."
A string like "Each member name in an EntityContainer must be unique. A member with name '{0}' is already defined."
A string like "Each type name in a schema must be unique. Type name '{0}' is already defined."
A string like "Name '{0}' cannot be used in type '{1}'. Member names cannot be the same as their enclosing type."
A string like "Each property name in a type must be unique. Property name '{0}' is already defined."
A string like "A cycle was detected in the type hierarchy of '{0}'."
A string like "A property cannot be of type '{0}'. The property type must be a ComplexType, a PrimitiveType, or a CollectionType."
A string like "A property cannot be of type {0}. The property type must be a ComplexType, a PrimitiveType or an EnumType."
A string like "The specified name must not be longer than 480 characters: '{0}'."
A string like "The specified name is not allowed: '{0}'."
A string like "'{0}' is not valid data space for EdmModel. EdmModel supports only DataSpace.CSpace and DataSpace.SSpace."
A string like "The field {0} must be a string or array type with a maximum length of '{1}'."
A string like "The field {0} must be a string or array type with a minimum length of '{1}'."
A string like "No connection string named '{0}' could be found in the application config file."
A string like "The EntitySet '{0}' obtained from the metadata workspace is incompatible with the EntitySet required by this EntityKey."
A string like "The provided list of key-value pairs contains an incorrect number of entries. There are {1} key fields defined on type '{0}', but {2} were provided."
A string like "The type of the key field '{0}' is expected to be '{1}', but the value provided is actually of type '{2}'."
A string like "No corresponding object layer type found for the key field '{0}' whose type in the conceptual layer is '{1}'."
A string like "The required entry '{0}' was not found in the provided input. This entry is required by the key fields defined on type '{1}'."
A string like "The requested operation could not be completed, because a mismatched EntityKey was returned from the EntityKey property on an object of type '{0}'."
A string like "The name '{0}' contains characters that are not valid."
A string like "The key field '{0}' cannot have a value of null. A non-null value is required for the key fields defined on type '{1}'."
A string like "The function or function import '{0}' is not composable. A non-composable function or function import cannot be called in a query expression."
A string like "Some required information is missing from the connection string. The '{0}' keyword is always required."
A string like "The '{0}' keyword is not supported."
A string like "Parameters must have a unique ParameterName. A second instance of '{0}' was discovered."
A string like "The connection string of the named connection '{0}' cannot contain a 'Name' keyword in the configuration."
A string like "The ADO.NET provider with invariant name '{0}' is either not registered in the machine or application config file, or could not be loaded. See the inner exception for details."
A string like "Execution of the command requires an open and available connection. The connection's current state is {0}."
A string like "The store data provider failed to return information for the {0} request. See the inner exception for details."
A string like "The parameter name '{0}' is not valid. A valid parameter name must begin with a letter and contain only letters, numbers, and underscores."
A string like "A null was returned after calling the '{0}' method on a store provider instance of type '{1}'. The store provider might not be functioning correctly."
A string like "The parameter '{0}' is not an input-only parameter. The EntityClient provider only allows input-only parameters when the CommandType property is set to CommandText."
A string like "The EntityParameter '{0}' must have a value from which the DbType can be inferred, or a supported DbType must be set as the value of the EntityParameter.DbType property."
A string like "The DbType '{0}' is not valid for the EntityParameter.DbType property on the '{1}' object."
A string like "The declared type of navigation property {0}.{1} is not compatible with the result of the specified navigation. "
A string like "The underlying provider failed on {0}."
A string like "The container '{0}' specified for the FunctionImport could not be found in the current workspace."
A string like "The FunctionImport '{1}' could not be found in the container '{0}'."
A string like "The function import '{0}' is composable. Only non-composable function imports can be executed as stored procedures."
A string like "The function import '{0}' cannot be executed because it is not mapped to a store function."
A string like "MetadataWorkspace must have {0} pre-registered."
A string like "The DbConnection parameter '{0}' contains no ProviderFactory."
A string like "The EdmType '{0}' is not a scalar type."
A string like "The EdmType '{0}' is not consistent with the DbType provided for parameter '{1}'."
A string like "The LINQ expression node type '{0}' is not supported in LINQ to Entities."
A string like "The ObjectContext parameter ('{0}') in a compiled query can only be used as the source for queries."
A string like "The parameter '{0}' was not bound in the specified LINQ to Entities query expression."
A string like "LINQ to Entities does not recognize the method '{0}' method, and this method cannot be translated into a store expression."
A string like "The method '{0}' cannot be translated into a LINQ to Entities store expression. Consider using the method '{1}' instead."
A string like "The specified type member '{0}' is not supported in LINQ to Entities. Only initializers, entity members, and entity navigation properties are supported."
A string like "The specified method '{0}' on the type '{1}' cannot be translated into a LINQ to Entities store expression."
A string like "The specified method '{0}' on the type '{1}' cannot be translated into a LINQ to Entities store expression because one or more passed arguments match more than one function overload."
A string like "The specified method '{0}' on the type '{1}' cannot be translated into a LINQ to Entities store expression because no overload matches the passed arguments."
A string like "The specified member '{0}' on the type '{1}' cannot be translated into a LINQ to Entities store expression."
A string like "The specified member '{0}' on the type '{1}' cannot be translated into a valid provider-specific LINQ to Entities store expression equivalent."
A string like "The specified LINQ expression of type '{0}' cannot be translated into a LINQ to Entities store expression."
A string like "The specified LINQ expression of type '{0}' cannot be translated into a valid provider-specific LINQ to Entities store expression equivalent."
A string like "Unable to process the type '{0}', because it has no known mapping to the value layer."
A string like "Unable to create a null constant value of type '{0}'. Only entity types, enumeration types or primitive types are supported in this context."
A string like "Unable to create a constant value of type '{0}'. Only primitive types or enumeration types are supported in this context."
A string like "Unable to cast the type '{0}' to type '{1}'. LINQ to Entities only supports casting EDM primitive or enumeration types."
A string like "The '{0}' expression with an input of type '{1}' and a check of type '{2}' is not supported. Only entity types and complex types are supported in LINQ to Entities queries."
A string like "'{0}' is not a valid metadata type for type filtering operations. Type filtering is only valid on entity types and complex types."
A string like "The entity or complex type '{0}' cannot be constructed in a LINQ to Entities query."
A string like "A type that implements IEnumerable '{0}' cannot be initialized in a LINQ to Entities query."
A string like "The type '{0}' appears in two structurally incompatible initializations within a single LINQ to Entities query. A type can be initialized in two places in the same query, but only if the same properties are set in both places and those properties are set in the same order."
A string like "The key selector type for the call to the '{0}' method is not comparable in the underlying store provider."
A string like "The method '{0}' is not supported when called on an instance of type '{1}'."
A string like "A navigation property of type '{0}' is not valid. '{1}' or a single implementation of '{2}' was expected, but '{3}' was found."
A string like "The member '{0}' is not a property or a field."
A string like "The method '{0}' is only supported in LINQ to Entities when the argument '{1}' is a non-negative integer constant."
A string like "The method '{0}' is only supported in LINQ to Entities when there are no trim characters specified as arguments."
A string like "The method '{0}' is only supported in LINQ to Entities when the argument '{1}' is a constant."
A string like "The method '{0}' is not supported in LINQ to Entities when the argument '{1}' has the value '{2}'."
A string like "The method '{0}' is only supported in LINQ to Entities when the argument is a string variable or literal."
A string like "Cannot compare elements of type '{0}'. Only primitive types, enumeration types and entity types are supported."
A string like "Cannot compare EntityKeys referring to types '{0}' and '{1}' because they do not share a common super-type."
A string like "Cannot compare '{0}'. Only primitive types, enumeration types and entity types are supported."
A string like "member '{0}' of "
A string like "type '{0}'"
A string like "Unknown LINQ expression of type '{0}'."
A string like "Unknown LINQ binding of type '{0}'."
A string like "The specified method '{0}' on the type '{1}' cannot be translated into a LINQ to Entities store expression because its return type does not match the return type of the function specified by its DbFunction attribute."
A string like "The specified parameter type '{0}' is not valid. Only scalar parameters (such as Int32, Decimal, and Guid) are supported."
A string like "The specified parameter '{0}' of type '{1}' is not valid. Only scalar parameters (such as Int32, Decimal, and Guid) are supported."
A string like "The specified use of parameter '{0}' to produce a value of type '{1}' is not supported by LINQ to Entities in a compiled query."
A string like "Internal error. An unsupported expression kind ({0}) encountered in update mapping view by the ({1}) visitor."
A string like "Internal error. An unsupported type ({0}) was used as an argument to cast an expression in the update mapping view. The argument must be a scalar."
A string like "Internal error. EntitySet ({0}) has unsupported type ({1}). Only EntitySets and AssociationSets can be processed in the update pipeline."
A string like "Internal error. An unsupported join type is in update mapping view ({0}). Only binary inner or left outer joins are supported."
A string like "Internal error. Unsupported projection expression type ({0}). Only DBNewInstanceExpression projections are supported in update mapping views."
A string like "Store update, insert, or delete statement affected an unexpected number of rows ({0}). Entities may have been modified or deleted since entities were loaded. Refresh ObjectStateManager entries."
A string like "In order to update the AssociationSet '{0}', the corresponding entity from EntitySet '{1}' must be available in the ObjectStateManager."
A string like "Entities in '{0}' participate in the '{1}' relationship. '{2}' related '{3}' were found. Between {4} and {5} '{3}' are expected."
A string like "A relationship from the '{0}' AssociationSet is in the '{1}' state. Given multiplicity constraints, a corresponding '{2}' must also in the '{1}' state."
A string like "At most, '{0}' relationships may be in the '{1}' state for the '{2}' relationship from End '{3}' to an instance of End '{4}'. '{5}' instances were found."
A string like "Modifications to tables where a primary key column has property '{0}' set to '{1}' are not supported. Use '{2}' pattern instead. Key column: '{3}'. Table: '{4}'."
A string like "A function mapping for EntitySet '{0}' requires that corresponding Associations in AssociationSet '{1}' are loaded. Load the AssociationSet before saving changes to this EntitySet."
A string like "A function mapping specifies a result column '{0}' that the result set does not contain."
A string like "A null store-generated value was returned for a non-nullable member '{0}' of type '{1}'."
A string like "A store-generated value of type '{0}' could not be converted to a value of type '{1}' required for member '{2}' of type '{3}'."
A string like "Unable to determine rows affected. The value of parameter '{0}' is not convertible to '{1}'."
A string like "Update Mapping not found for EntitySet '{0}'."
A string like "Modifying a column with the '{0}' pattern is not supported. Column: '{1}'. Table: '{2}'."
A string like "A dependent property in a ReferentialConstraint is mapped to a store-generated column. Column: '{0}'."
A string like "Null value for non-nullable member. Member: '{0}'."
A string like "Entities in '{0}' participate in the '{1}' relationship. {2} related '{3}' were found. {4} '{3}' is expected."
A string like "Cannot find the {0}FunctionMapping for {1} '{2}' in the mapping file."
A string like "Unable to determine the principal end of the '{0}' relationship. Multiple added entities may have the same primary key."
A string like "Unable to insert or update an entity because the principal end of the '{0}' relationship is deleted."
A string like "Values other than [{0}]"
A string like "Insufficient or contradictory mapping. Cannot generate query views for entities in {0} when:"
A string like "No mapping specified for instances of the EntitySet and AssociationSet in the EntityContainer {0}."
A string like "No mapping specified for the following types - {0}."
A string like "No mapping specified for the following EntitySet/AssociationSet - {0}."
A string like "Cannot define new concurrency token member {0} in the derived class {1} of EntitySet {2}."
A string like "Concurrency token(s) [{0}] in EntitySet {1} must not have a condition."
A string like "Must specify mapping for all key properties ({0}) of table {1}."
A string like "Must specify mapping for all key properties ({0}) of the EntitySet {1}."
A string like "Must specify mapping for all key properties ({0}) of End {1} in Relationship {2}."
A string like "No mapping specified for properties {0} in {1} {2}."
A string like "Must specify mapping for all types in {0} {1}."
A string like "Insufficient mapping: It is possible to have {0} within {1} that are not mapped."
A string like "Column {1} in table {0} must be mapped: It has no default value and is not nullable."
A string like "Column {0} has no default value and is not nullable. A column value is required to store entity data."
A string like "Potential runtime violation of table {0}'s keys ({2}): Columns ({1}) are mapped to EntitySet {3}'s properties ({4}) on the conceptual side but they do not form the EntitySet's key properties ({5})."
A string like "All the key properties ({0}) of the EntitySet {1} must be mapped to all the key properties ({2}) of table {3}."
A string like "At least one of the key properties of AssociationSet {0} must be mapped to all the key properties ({1}) of table {2}."
A string like "Given the cardinality of Association End Member {0}, it should be mapped to key columns of the table {1}. Either fix the mapping or change the multiplicity of this end."
A string like "Each of the following columns in table {0} is mapped to multiple conceptual side properties:"
A string like "Property {0} with 'IsNull=false' condition must be mapped."
A string like "Conditions specified on member {0} in this fragment are not allowed."
A string like "Column(s) [{0}] are being mapped in both fragments to different conceptual side properties."
A string like "Data loss or key constraint violation is possible in table {0}."
A string like "Data loss is possible in {0}."
A string like "Problem in mapping fragments starting at line {0}:"
A string like "Problem in mapping fragments starting at lines {0}:"
A string like "Missing table mapping: {0} no mapping specified for the table {1}."
A string like "{0} The columns of table {1} are mapped to AssociationSet {2}'s End {3} but the key columns of table {4} are not mapped to the keys of the EntitySet {5} corresponding to this End."
A string like "Foreign key constraint '{0}' from table {1} ({2}) to table {3} ({4}):"
A string like " {0} is mapped to AssociationSet {1} - for this mapping to be correct, the upper multiplicity bound of end {2} needs to be 1."
A string like " {0} is mapped to AssociationSet {1} - for this mapping to be correct, the lower multiplicity bound of end {2} needs to be 1."
A string like " {0}: Insufficient mapping: Foreign key must be mapped to some AssociationSet or EntitySets participating in a foreign key association on the conceptual side."
A string like "The foreign key '{0}' is not being enforced in the model. An Association or inheritance relationship needs to be created to enforce this constraint."
A string like "Incorrect mapping of composite key columns. {0} Columns ({1}) in table {2} are mapped to properties ({3}) in {4} and columns ({5}) in table {6} are mapped to properties ({7}) in {8}. The order of the columns through the mappings is not preserved."
A string like " {0} plays Role '{1}' in AssociationSet '{2}'"
A string like " {0} does NOT play Role '{1}' in AssociationSet '{2}'"
A string like " {0} is in '{1}' EntitySet"
A string like " {0} is NOT in '{1}' EntitySet"
A string like "An Entity with Key ({0}) will not round-trip when:"
A string like "The current model no longer matches the model used to pre-generate the mapping views, as indicated by the {0}.MappingHashValue property. Pre-generated mapping views must be either regenerated using the current model or removed if mapping views generated at runtime should be used instead. See http://go.microsoft.com/fwlink/?LinkId=318050 for more information on Entity Framework mapping views."
A string like "Ensure that mapping fragments for EntitySet {0} do not map entities with the same primary key to different rows of the same table."
A string like "Could not validate mapping for EntitySet {0}. Check that the mapping constraints are possible in the presence of store side constraints. Having an 'IsNull=True' condition in the mapping for a non-nullable column is an example of an impossible constraint."
A string like "Non-nullable column {1} in table {0} is mapped to a nullable entity property."
A string like "Condition member '{0}' with a condition other than 'IsNull=False' is mapped. Either remove the condition on {0} or remove it from the mapping."
A string like "Condition members {0} have duplicate condition values."
A string like "EntitySets '{1}' and '{2}' are both mapped to table '{0}'. Their primary keys may collide."
A string like "Column {0} is used in a Not Null condition but it is mapped to a property {1} which is nullable. Consider making this property non-nullable."
A string like "EntityTypes {0} are being mapped to the same rows in table {1}. Mapping conditions can be used to distinguish the rows that these types are mapped to."
A string like "When there is a mapping fragment between EntitySet '{0}' and Table '{1}' with MakeColumnsDistinct attribute marked to 'true', there can be no additional mapping fragments between '{0}' and '{1}'."
A string like "The type '{0}' doesn't have any key members. A RelationshipType or EntityType must either have key members or a BaseType with key members."
A string like "EntityKeyProperty and IsNullable cannot both be true in the EdmScalarPropertyAttribute for property '{0}' on type '{1}'. Properties that are part of the key cannot be nullable."
A string like "The property '{0}' on type '{1}' has the return type '{2}', which is not a recognized EntityType or enumeration of instances of EntityType."
A string like "The property '{0}' on type '{1}' is attributed with EdmScalarPropertyAttribute but returns the type '{2}', which is not a primitive type or a recognized enumeration type."
A string like "The property '{0}' on type '{1}' is attributed with EdmComplexPropertyAttribute but returns the type '{2}', which is not a recognized ComplexType."
A string like "Multiple types with the name '{0}' exist in the EdmItemCollection in different namespaces. Convention based mapping requires unique names without regard to namespace in the EdmItemCollection."
A string like "The property '{0}' on the type '{1}' has a property type of '{2}' which cannot be mapped to a primitive type."
A string like "The required property '{0}' does not exist on the type '{1}'."
A string like "The base type '{0}' of type '{1}' does not match the model base type '{2}'."
A string like "No corresponding object layer type could be found for the conceptual type '{0}'."
A string like "The relationship '{0}' was not loaded because the type '{1}' is not available."
A string like "The types in the assembly '{0}' cannot be loaded because the assembly contains the EdmSchemaAttribute, and the closure of types is being loaded by name. Loading by both name and attribute is not allowed."
A string like "The property '{0}' of type '{1}' in the assembly '{2}' cannot be used as a scalar property because it does not have both a getter and setter."
A string like "The mapping of CLR type to EDM type is ambiguous because multiple CLR types match the EDM type '{0}'. Previously found CLR type '{1}', newly found CLR type '{2}'."
A string like "The EntityType or ComplexType '{0}' cannot be mapped by convention to the value type '{1}'. Value types are not allowed to be mapped to EntityTypes or ComplexTypes."
A string like "The type '{0}' was not loaded because the base type '{1}' is not available."
A string like "Type '{0}' defined in the object layer is not compatible with type '{1}' defined in the conceptual model. An enumeration type cannot be mapped to a non-enumeration type."
A string like "The type '{0}' is not a supported underlying type for enumeration types."
A string like "Error in Function '{0}'. Aggregate Functions should take exactly one input parameter."
A string like "Type of parameter '{0}' in function '{1}' is not valid. The aggregate function parameter type must be of CollectionType."
A string like "Schema specified is not valid. Errors: {0}"
A string like "The namespace '{0}' is a system namespace and cannot be used by other schemas. Choose another namespace name."
A string like "The space '{0}' has no associated collection."
A string like "The specified key Member '{0}' does not exist in the Members collection."
A string like "Specified file '{0}' has extension '{1}' that is not valid. The valid extension is {2}."
A string like "The type '{0}' that is being loaded conflicts with the type '{1}' that is already loaded because they have the same namespace and name."
A string like "'{0}' is only valid in metadata file paths when running inside ASP.NET."
A string like "Unable to find type '{0}' in assembly '{1}'."
A string like "The assembly '{0}' specified does not exist in the assemblies enumeration."
A string like "The EDMVersion of the item collection {0} is not an EDMVersion that the runtime supports. The supported versions are {1}."
A string like "Unable to resolve assembly '{0}'."
A string like "The parameters of Function '{0}' are converted to conceptual side type '{1}', and the function with the same conceptual side type parameters already exists. Please make sure that function overloads are not ambiguous."
A string like "The EntitySet '{0}' that was passed in does not belong to the conceptual model."
A string like "The type '{0}' specified is not the declared type '{1}' or a derivation of the type of the EntitySet '{2}'."
A string like "The type '{0}' specified is not the declared type '{1}' or a derivation of the type of the AssociationSet '{2}'."
A string like "The {0} could not be registered with the MetadataWorkspace because its version ('{1}') is different from the version ('{2}') already associated with the MetadataWorkspace."
A string like "ItemCollection is not valid. For '{0}' space, the CollectionType should be MappingItemCollection."
A string like "Argument '{0}' is not valid. A minimum of one .ssdl artifact must be supplied. "
A string like "Argument '{0}' is not valid. The set contains a null value."
A string like "The RelationshipSet with the specified name '{0}' does not exist in the EntityContainer."
A string like "The EntitySet with the specified name '{0}' does not exist in the EntityContainer."
A string like "The function '{0}' is not marked as FunctionImport and cannot be added to the EntityContainer"
A string like "The member with identity '{0}' does not exist in the metadata collection."
A string like "The item with identity '{0}' already exists in the metadata collection."
A string like "More than one item in the metadata collection match the identity '{0}'."
A string like "Missing default value for '{0}' in type '{1}'. Default value must be specified because the '{0}' is specified as constant."
A string like "Minimum and maximum value must not be specified for '{0}' in type '{1}' since '{0}' is specified as constant."
A string like "Both minimum and maximum values must be provided for '{0}' in type '{1}' since '{0}' is not specified as a constant."
A string like "Minimum and maximum values cannot be identical for '{0}' in type '{1}' because '{0}' is not specified as constant."
A string like "Minimum and maximum values must be greater than or equal to zero for '{0}' in type '{1}'."
A string like "Minimum value '{0}' specified for '{1}' in type '{2} is not valid. Minimum value must be always less than the maximum value."
A string like "Both Ends on the EdmRelationshipAttribute for relationship '{0}' have the same Role name '{1}'. The ends of a relationship type must have different Role names."
A string like "The property for the relationship '{0}' contains a Role '{1}' has a type '{2}' that is not valid for a relationship End. Change the End Role to an EntityType."
A string like "EdmRelationshipNavigationPropertyAttribute for RelationshipType '{3}' on NavigationProperty '{0}' in EntityType '{1}' has a TargetRole name '{2}' that is not valid. Make sure that TargetRole name is a valid name. "
A string like "EdmRelationshipNavigationPropertyAttribute on NavigationProperty '{0}' in EntityType '{1}' has a RelationshipName '{2}' that is not valid. Make sure the RelationshipName is valid."
A string like "Type '{0}' in Assembly '{1}' is a nested class. Nested classes are not supported."
A string like "The EdmRelationshipAttribute for the relationship '{1}' has a null parameter '{0}'."
A string like "The RelationshipName parameter of an EdmRelationshipAttribute in the assembly '{0}' is null."
A string like "The EntityType '{0}' that the NavigationProperty '{1}' is declared on is not the same type '{4}' referred by the end '{3}' of the RelationshipType '{2}' that this NavigationProperty represents."
A string like "All SSDL artifacts must target the same provider. The Provider '{0}' is different from '{1}' that was encountered earlier."
A string like "All SSDL artifacts must target the same provider. The ProviderManifestToken '{0}' is different from '{1}' that was encountered earlier."
A string like "Could not find the CLR type for '{0}'."
A string like "Could not find the conceptual model type for '{0}'."
A string like "Could not find the CLR type for '{0}'."
A string like "EdmComplexTypeAttribute and EdmEntityTypeAttribute can not be used on the generic type '{0}'."
A string like "The EDM version {0} is not supported by the runtime."
A string like "The EntityContainer '{0}' for the conceptual model specified as part of this MSL does not exist in MetadataWorkspace."
A string like "The EntityContainer '{0}' for the storage model specified as part of this MSL does not exist in MetadataWorkspace."
A string like "The EntityContainer '{0}' for the storage model has already been mapped."
A string like "The EntitySet '{0}' specified as part of this MSL does not exist in MetadataWorkspace."
A string like "The EntityType '{0}' specified as part of this MSL does not exist in MetadataWorkspace."
A string like "The EntityType '{0}' is Abstract and cannot be mapped using Function Mapping."
A string like "The EntityType '{0}' is Abstract and can be mapped only using IsTypeOf."
A string like "The EntityType '{0}' used in IsTypeOf does not have any concrete descendants."
A string like "The EntityType '{0}' specified is not the declared type '{1}' or a derivation of the type of the EntitySet '{2}'."
A string like "The AssociationType '{0}' specified is not the declared type '{1}' of the AssociationSet '{2}'."
A string like "The Table '{0}' specified as part of this MSL does not exist in MetadataWorkspace."
A string like "The Complex Type '{0}' specified as part of this MSL does not exist in MetadataWorkspace."
A string like "The AssociationSet '{0}' specified as part of this MSL does not exist in MetadataWorkspace."
A string like "The AssociationSet '{0}' cannot have a Condition because it does not provide maps for the End elements."
A string like "AssociationType '{0}' has a referential integrity constraint and cannot be mapped."
A string like "AssociationType '{0}' has a primary key to primary key referential integrity constraint. Any mappings for it will be ignored."
A string like "The AssociationType '{0}' specified as part of this MSL does not exist in MetadataWorkspace."
A string like "The property '{0}' is not a key member of the EntityType. Only key members can be mapped as part of the EndProperty mapping."
A string like "Content not valid. The conceptual side Member or Property '{0}' specified as part of this MSL does not exist in MetadataWorkspace."
A string like "The Column '{0}' specified as part of this MSL does not exist in MetadataWorkspace."
A string like "The End property '{0}' specified as part of this MSL does not exist in MetadataWorkspace."
A string like "The conceptual side Member or Property '{0}' has multiple mappings specified as part of the same mapping fragment."
A string like "The Member or Property '{0}' has multiple conditions specified as part of the same mapping fragment."
A string like "Condition can not be specified on values of member '{0}'. Value conditions are not supported for type '{1}'."
A string like "Member '{0}' specified in Condition does not exist."
A string like "Condition cannot be specified for Column member '{0}' because it is marked with a 'Computed' or 'Identity' StoreGeneratedPattern."
A string like "At least one property must be mapped in the set mapping for '{0}'."
A string like "The Member '{0}' in the conceptual model type '{1}' is not present in the CLR type '{2}'."
A string like "The Member '{0}' in the CLR type '{1}' is not present in the conceptual model type '{2}'."
A string like "The type '{0}' of the member '{1}' in the conceptual side type '{2}' does not match with the type '{3}' of the member '{4}' on the object side type '{5}'."
A string like "The '{0}' property on the conceptual model type '{1}' is of type '{2}'. The property '{3}' on the CLR type '{4}' is of type '{5}'. The property types must match."
A string like "The multiplicity '{0}' on End '{1}' in the conceptual side Association '{2}' doesn't match with multiplicity '{3}' on end '{4}' on the object side Association '{5}'."
A string like "The number of members in the conceptual type '{0}' does not match with the number of members on the object side type '{1}'. Make sure the number of members are the same."
A string like "The type '{0}'('{1}') of the member '{2}' in the conceptual type '{3}' doesn't match with the type '{4}'('{5}') of the member '{6}' on the object side type '{7}'."
A string like "The underlying type '{0}' of the enumeration type '{1}' defined in the conceptual model does not match the underlying type '{2}' of the enumeration type '{3}' defined in the object layer."
A string like "The enumeration type '{0}' defined in the object layer does not have a member that corresponds to the member '{1}' whose value is '{2}' of the enumeration type '{3}' defined in the conceptual model."
A string like "The mapping for EntityContainer '{0}' was not found in Workspace."
A string like "The conceptual AssociationSet '{0}' cannot be mapped multiple times."
A string like "Invalid root element found in the mapping file. Make sure that the root element's local name is 'Mapping' and the namespaceURI is '{0}', '{1}' or '{2}'."
A string like "The Storage Map can be looked up only from the type in conceptual model. It cannot be looked up from type in the following space: {0}."
A string like "Member Mapping specified is not valid. The type '{0}' of member '{1}' in type '{2}' is not compatible with '{3}' of member '{4}' in type '{5}'."
A string like "The property '{0}' on the conceptual side is not a scalar property."
A string like "The type '{0}' has been mapped more than once."
A string like "More than one property map found for property '{0}' when using case-insensitive search."
A string like "Non-empty enumeration value must be specified for condition mapping for enumeration '{0}'."
A string like "Enumeration value '{0}' specified in condition mapping is not valid."
A string like "XML parsing failed for mapping schema. Schema Error Information : {0}."
A string like "XML Schema validation failed for mapping schema. Schema Error Information : {0}."
A string like "Object mapping could not be found for Type with identity '{0}'."
A string like "The connection is not of type '{0}'."
A string like "No views were found in assemblies or could be generated for {0} '{1}'."
A string like "Store EntitySet name should not be specified on set mapping for Set '{0}' because a query view is being specified."
A string like "The query view specified for EntitySet '{0}' is empty."
A string like "The IsTypeOf({0}) query view specified for EntitySet '{1}' is empty."
A string like "The query view specified for EntitySet '{0}' for EntityType '{1}' is empty."
A string like "Property maps cannot be specified for EntitySet '{0}' because a query view has been specified."
A string like "The query view generated for the EntitySet '{0}' is not valid. The query parser threw the following error : {1}."
A string like "The query view specified for the EntitySet '{0}' is not valid. The query parser threw the following error : {1}."
A string like "The ResultType of the query view expression specified for the EntitySet '{0}' is not assignable to the element type of the EntitySet."
A string like "The EntitySetMapping in EntityContainerMapping for EntityContainer '{0}' must contain only mapping fragments and no query view. The EntitySetMapping contains only query views and the view for this EntityContainerMapping will not be generated."
A string like "A single QueryView is defined for multiple types within EntitySet {0}."
A string like "IsTypeOf( ) QueryView is already defined for EntitySet {0} and TypeName {1}."
A string like "QueryView is already defined for EntitySet {0} and TypeName {1}."
A string like "TypeName property must be defined for all but the first QueryViews within mapping for EntitySet {0}."
A string like "IsTypeOf({0}) QueryView should not be specified for {1} EntitySet's element type {0}."
A string like "The query view specified for '{0}' EntitySet's type(s) '{1}' contains an unsupported expression of kind '{2}'."
A string like "The query view specified for the EntitySet '{0}' includes a call to the Function '{1}'. Only storage Functions may be referenced in a query view."
A string like "The query view specified for the EntitySet '{0}' includes a scan of the '{1}' EntitySet. Only storage EntitySets may be referenced in a query view."
A string like "The query view specified for the EntitySet '{0}' contains a reference to member '{1}' of kind '{2}'. Only columns may be referenced."
A string like "The query view specified for the EntitySet '{0}' initializes an instance of type '{1}'. Only types assignable to the element type of the EntitySet are permitted."
A string like "The EntitySet '{0}' used for creating the Ref expression does not match the EntitySet '{1}' declared on the AssociationSetEnd '{2}' of the AssociationSet '{3}'."
A string like "If an EntitySet or AssociationSet includes a query view, all related entity and association sets in the EntityContainer must also define query views. The following sets require query views: {0}."
A string like "The context type '{0}' must derive from the System.Data.Entity.DbContext type or the System.Data.Entity.Core.Objects.ObjectContext type."
A string like "The DbMappingViewCache type '{0}' specified in the DbMappingViewCacheTypeAttribute constructor could not be loaded. Make sure that the assembly-qualified name is used and that the assembly is available to the running application."
A string like "Multiple instances of DbMappingViewCacheTypeAttribute that specify the same context type '{0}' are not allowed."
A string like "The type that contains generated views '{0}' must derive from the System.Data.Entity.Infrastructure.DbMappingViewCache type."
A string like "The EntitySet '{0}' for which the view has been specified could not be found in the workspace."
A string like "GlobalItem with name '{0}' exists both in conceptual model and storage model. Make sure that every item has a unique name across conceptual model and storage model."
A string like "Type '{0}' in conceptual side cannot be mapped to type '{1}' on the object side. Both the types must be abstract or both must be concrete types."
A string like "Type '{0}' defined in the conceptual model cannot be mapped to type '{1}' from the object layer. An enumeration type cannot be mapped to a non-enumeration type."
A string like "Storage EntityContainer name '{0}' specified in this mapping schema doesn't match with the storage EntityContainer name '{1}' specified in the previous mapping schema(s) for EntityContainer '{2}' in the conceptual model. Make sure that you specify exactly one mapping per EntityContainer, or if you want to specify partial mapping, make sure that they map to the same storage EntityContainer."
A string like "An EdmType cannot be mapped to CLR classes multiple times. The EdmType '{0}' is mapped more than once."
A string like "A mapping function binding specifies an unknown function {0}."
A string like "A mapping function binding specifies an ambiguous function {0} with more than one overload."
A string like "A mapping function binding specifies a function {0} that is not supported. Only functions that cannot be composed are supported."
A string like "A mapping function binding specifies a function {0} with an unsupported parameter: {1}. Output parameters may only be mapped through the {2} property. Use result bindings to return values from a function invocation."
A string like "A mapping function bindings specifies a function {0} but does not map the following function parameters: {1}."
A string like "An association End mapping specifies an AssociationSet {0} that does not exist in the current container."
A string like "An association End mapping specifies a Role {0} that does not exist in the current AssociationSet."
A string like "An association End mapping defines a from Role {0} that is not bound to the current EntitySet."
A string like "An association End mapping has a 'to' Role {0} with multiplicity greater than one. A maximum multiplicity of one is supported."
A string like "Unable to find ComplexType {0} in the current MetadataWorkspace."
A string like "The Complex Type {0} does not match the type of the current property {1}."
A string like "The function parameter {0} is not defined in the function {1}."
A string like "The property {0} does not exist in the type {1}."
A string like "The property {0} is not a key of {1}. Association End mappings may only include key properties."
A string like "The parameter {0} is bound multiple times."
A string like "The EntityType {0} is mapped to functions more than once."
A string like "If some of the EntitySet or the AssociationSet mapped to the same store EntitySet, and one of the sets includes a function mapping, all related entity and AssociationSets in the EntityContainer must also define function mappings. The following sets require function mappings: {0}."
A string like "If an EntitySet mapping includes a function binding, function bindings must be included for all types. The following types do not have function bindings: {0}."
A string like "Parameter Mapping specified is not valid. The type '{0}' of member '{1}' in type '{2}' is not compatible with '{3}' of parameter '{4}' in function '{5}'."
A string like "AssociationSet instances may only be mapped using functions in one EntitySetMapping or AssociationSetMapping. The following AssociationSet instances are mapped in multiple locations: {0}."
A string like "A function mapping includes parameter bindings for two different Ends of the same AssociationSet. Only one End of a particular AssociationSet may be mapped within a single function mapping. End Roles: {0}, {1}. AssociationSet: {2}."
A string like "A function mapping includes multiple result bindings for a single property. Property name: {0}. Column names: {1}."
A string like "The EntitySet '{0}' includes function mappings for AssociationSet '{1}', but none exists in element '{2}' for type '{3}'. AssociationSets must be consistently mapped for all operations."
A string like "The EntityType '{0}' includes function mappings for AssociationSet '{1}' that requires type '{2}'."
A string like "A function mapping for 'to' role {0} is not permitted because it is a foreign key association."
A string like "The conceptual side property '{0}' has already been mapped to a storage property with type '{1}'. If the conceptual side property is mapped to multiple properties in the storage model, make sure that all the properties in the storage model have the same type."
A string like "The store provider did not return a valid EdmType for '{0}'."
A string like "The storage function '{0}' does not exist."
A string like "The FunctionImport '{0}' does not exist in container '{1}'."
A string like "The FunctionImport '{0}' has already been mapped."
A string like "The non-composable function import '{0}' is mapped to the composable store function '{1}'. Non-composable function imports can be mapped only to stored procedures."
A string like "The composable function import '{0}' is mapped to the non-composable store function '{1}'. Composable function imports can be mapped only to composable table-valued store functions."
A string like "Storage function has a parameter '{0}' but no corresponding parameter was found in the FunctionImport."
A string like "Import function has a parameter '{0}' but no corresponding parameter was found in the storage function."
A string like "Parameter '{0}' has mode '{1}' in the storage function but mode '{2}' in the FunctionImport."
A string like "Parameter '{0}' has type '{1}' in the storage that is not compatible with type '{2}' declared for the FunctionImport."
A string like "The storage function parameter '{0}' of type '{1}' does not match the corresponding FunctionImport parameter of enumeration type '{2}' with underlying type '{3}'. The underlying type of the enumeration parameter for a function defined in the conceptual model must match the corresponding storage function parameter type."
A string like "Rows affected parameter '{0}' does not exist in function '{1}'."
A string like "Rows affected parameter '{0}' is of type '{1}'. Must be an integer numeric type."
A string like "Rows affected parameter '{0}' has mode '{1}'. Must have mode '{2}' or '{3}'."
A string like "An {0} element can only be declared for a FunctionImport declaring an EntitySet. FunctionImport '{1}' does not declare an EntitySet."
A string like "The EntityType '{0}' specified is not the declared type '{1}' nor a derivation of the type of the EntitySet '{2}' for FunctionImport '{3}'."
A string like "The condition value specified for {0} is not compatible with the type returned by the storage provider. Column name: '{1}', ResultType: '{2}'. "
A string like "The type returned by the storage provider is not supported for type conditions. Column name: '{0}', ResultType: '{1}'."
A string like "The number of ResultMapping elements for the FunctionImport '{0}' does not match the number of specified ReturnType elements."
A string like "Mapping of the function import '{0}' is not valid. Mapped type '{1}' is not compatible with the return type of the function import."
A string like "Mapping of the function import '{0}' is not valid. ComplexTypeMapping is supported only for function imports returning a collection of ComplexType."
A string like "Mapping of the function import '{0}' is not valid. EntityTypeMapping is supported only for function imports returning a collection of EntityType."
A string like "Mapping of the function import '{0}' is not valid. Storage function return type is expected to be a collection of rows."
A string like "No mapping specified for the conceptual property '{0}' of type '{1}' in the result mapping of the function import '{2}'."
A string like "The return type '{0}' of the function import '{1}' is abstract and cannot be mapped implicitly."
A string like "The function import '{0}' can be mapped only to a store function that returns rows with one column. The store function '{1}' returns rows with multiple columns."
A string like "The return type '{0}' of the function import '{1}' is not compatible with the return type '{2}' of the store function '{3}'."
A string like "The function import mapping cannot produce an entity of type '{0}'. Ensure that conditions unambiguously imply the type. See line(s) '{1}'."
A string like "The function import mapping cannot produce an entity from the '{0}' type hierarchy. Ensure that conditions unambiguously imply some type in the hierarchy. See line(s) '{1}'."
A string like "Unable to resolve to a specific overload of the function '{0}'."
A string like "The key properties of all entity types returned by the function import '{0}' must be mapped to the same non-nullable columns returned by the storage function."
A string like "Nullable complex types are not supported. The complex property '{0}' must not allow nulls."
A string like "The property '{0}' could not be reported as changing. This occurred because EntityComplexMemberChanging was called with a property name that is not a complex property. For more information, see the Entity Framework documentation."
A string like "Property '{0}' is not a valid property on the object referenced by this ObjectStateEntry."
A string like "The property '{0}' is part of the object's key information and cannot be modified. "
A string like "{0} cannot be called because the object is not in a modified or unchanged state."
A string like "The property '{0}' does not have a valid entity mapping on the entity object. For more information, see the Entity Framework documentation."
A string like "The property '{0}' does not have a valid entity mapping on the complex type. For more information, see the Entity Framework documentation."
A string like "The change cannot be tracked because the state of the object changed from '{0}' to '{1}' since the previous call to EntityMemberChanging or EntityComplexMemberChanging on the same change tracker with the same property name. For information about properly reporting changes, see the Entity Framework documentation. "
A string like "The entity of type '{0}' references the same complex object of type '{1}' more than once. Complex objects cannot be referenced multiple times by the same entity."
A string like "The original value for the property '{0}' cannot be set because it is a complex property. Individual scalar properties can be set on a complex type if the type is first obtained as a OriginalValueRecord from the entity's original values."
A string like "The original value for the property '{0}' cannot be set to null because the '{1}' member on the entity type '{2}' is not nullable."
A string like "The original value for the property '{0}' cannot be set because the property is part of the entity's key."
A string like "The ObjectStateManager does not contain an ObjectStateEntry with a reference to an object of type '{0}'."
A string like "An object with the same key already exists in the ObjectStateManager. The existing object is in the {0} state. An object can only be added to the ObjectStateManager again if it is in the added state."
A string like "EntityType '{0}' does not exist in the EntitySet '{1}'."
A string like "Conflicting changes to the role '{0}' of the relationship '{1}' have been detected."
A string like "The following objects have not been refreshed because they were not found in the store: {0}."
A string like "The specified default EntityContainer name '{0}' could not be found in the mapping and metadata information."
A string like "The element at index {0} in the collection of objects to refresh is in the added state. Objects in this state cannot be refreshed."
A string like "The element at index {0} in the collection of objects to refresh is a duplicate of an object that is already in the collection."
A string like "The element at index {0} in the collection of objects to refresh is null."
A string like "The element at index {0} in the collection of objects to refresh has a null EntityKey property value or is not attached to this ObjectStateManager."
A string like "The EntitySet name '{0}' could not be found."
A string like "The EntityContainer name '{0}' could not be found."
A string like "Mapping and metadata information could not be found for EntityType '{0}'."
A string like "The EntitySet name '{0}.{1}' from the object's EntityKey does not match the expected EntitySet name, '{2}.{3}'."
A string like "The type parameter '{0}' in ExecuteFunction is incompatible with the type '{1}' returned by the function. "
A string like "The stored procedure or function '{1}' returned the type '{0}'. ExecuteFunction only supports stored procedures and functions that return collections of entity objects or collections of complex objects. "
A string like "The stored procedure or function '{0}' does not have a return type. ExecuteFunction only supports stored procedures and functions that have a return type. "
A string like "The parameter at index {0} in the parameters array is null."
A string like "The object in the ObjectContext is of type '{0}', but the modified object provided is of type '{1}'. The two objects must be of the same EntityType for changes to be applied. "
A string like "The existing object in the ObjectContext is in the {0} state. Changes can only be applied when the existing object is in an unchanged or modified state."
A string like "The existing object in the ObjectContext is in the {0} state. Original values can be changed when the existing object is in an unchanged, modified or deleted state."
A string like "The changes to the database were committed successfully, but an error occurred while updating the object context. The ObjectContext might be in an inconsistent state. Inner exception message: {0}"
A string like "The EntitySet, '{0}', from the entity's EntityKey does not match the entity's type, '{1}'."
A string like "The specified entity type, '{0}', does not match the type '{1}' from the EntitySet '{2}'."
A string like "The EntitySet name '{0}.{1}' from the entity's EntityKey does not match the expected EntitySet name '{2}.{3}' from the '{4}' parameter."
A string like "Cannot explicitly load {0} for entities that are detached. Objects loaded using the NoTracking merge option are always detached."
A string like "Cannot load {0} using a context different than that with which the object was loaded."
A string like "There are no EntitySets defined for the specified entity type '{0}'. If '{0}' is a derived type, use the base type instead."
A string like "The specified entity cannot be deleted from the ObjectSet because the entity is a member of the EntitySet '{0}.{1}' instead of the EntitySet '{2}.{3}' that is referenced by the ObjectSet. Use the DeleteObject method on the ObjectSet that contains the entity, or use the ObjectContext.DeleteObject method if you want to delete the entity without validating its EntitySet."
A string like "The specified entity cannot be detached from the ObjectSet because the entity is a member of the EntitySet '{0}.{1}' instead of the EntitySet '{2}.{3}' that is referenced by the ObjectSet. Use the Detach method on the ObjectSet that contains the entity, or use the ObjectContext.Detach method if you want to delete the entity without validating its EntitySet."
A string like "The specified EntitySet '{0}.{1}' does not contain results of type '{2}'."
A string like "The result type '{0}' may not be abstract and must include a default constructor."
A string like "The '{0}' column is mapped to multiple properties '{1}'. Ensure a separate column exists for each property."
A string like "The object at index {0} in the specified collection of objects is null."
A string like "The object at index {0} in the specified collection of objects is not attached to the same ObjectContext as source object of this EntityCollection."
A string like "The object at index {0} in the specified collection of objects is in an added or deleted state. Relationships cannot be created for objects in this state."
A string like "The {0} object could not be serialized. This type of object cannot be serialized when the RelationshipManager belongs to an entity object that does not implement IEntityWithRelationships."
A string like "An item cannot be added to a fixed size Array of type '{0}'."
A string like "An item cannot be removed from a fixed size Array of type '{0}'."
A string like "The property '{0}' cannot be set to a null value."
A string like "The '{2}' property on '{1}' could not be set to a '{3}' value. You must set this property to a non-null value of type '{0}'. "
A string like "The specified cast from a materialized '{0}' type to the '{1}' type is not valid."
A string like "The specified cast from a materialized '{0}' type to a nullable '{1}' type is not valid."
A string like "The cast to value type '{0}' failed because the materialized value is null. Either the result type's generic parameter or the query must use a nullable type."
A string like "All objects in the EntitySet '{0}' must have unique primary keys. However, an instance of type '{1}' and an instance of type '{2}' both have the same primary key value, '{3}'. "
A string like "An object with a key value '{0}' already exists in an added state. An object in this state cannot be merged."
A string like "The relationship '{0}' does not match any relationship defined in the conceptual model."
A string like "An EntityCollection of {0} objects could not be returned for role name '{1}' in relationship '{2}'. Make sure that the EdmRelationshipAttribute that defines this relationship has the correct RelationshipMultiplicity for this role name. For more information, see the Entity Framework documentation."
A string like "The Load method cannot return the {0} when the related object is in a deleted state."
A string like "The RelatedEnd with role name '{0}' from relationship '{1}' has already been loaded. This can occur when using a NoTracking merge option. Try using a different merge option when querying for the related object."
A string like "An EntityReference of type '{0}' could not be returned for role name '{1}' in relationship '{2}'. Make sure that the EdmRelationshipAttribute that defines this relationship has the correct RelationshipMultiplicity for this role name. For more information, see the Entity Framework documentation."
A string like "Multiplicity constraint violated. The role '{0}' of the relationship '{1}' has multiplicity 1 or 0..1."
A string like "The {0} could not be loaded because it is not attached to an ObjectContext."
A string like "An object of type '{0}' cannot be added, attached, or removed from an EntityCollection that contains objects of type '{1}'."
A string like "An object of type '{0}' cannot be set or removed from the Value property of an EntityReference of type '{1}'."
A string like "The object in the '{0}' role cannot be automatically added to the context because it was retrieved using the NoTracking merge option. Explicitly attach the entity to the ObjectContext before defining the relationship."
A string like "Related objects cannot be loaded using the {0} merge option. Relationships cannot be created when one object was retrieved using a NoTracking merge option and the other object was retrieved using a different merge option."
A string like "The relationship cannot be defined because the EntitySet name '{0}.{1}' is not valid for the role '{2}' in association set name '{3}.{4}'."
A string like "Metadata information for the relationship '{0}' could not be retrieved. If mapping attributes are used, make sure that the EdmRelationshipAttribute for the relationship has been defined in the assembly. When using convention-based mapping, metadata information for relationships between detached entities cannot be determined."
A string like "The relationship '{0}' does not contain the role '{1}'. Make sure that EdmRelationshipAttribute that defines this relationship has the correct role names. For more information, see the Entity Framework documentation."
A string like "The relationship manager was defined with an owner of type '{0}', which is not compatible with the type '{1}' for the source role '{2}' in the specified relationship, '{3}'."
A string like "The EntityReference has already been initialized. {0}"
A string like "The EntityReference could not be initialized, because the relationship manager for object to which the entity reference belongs is already attached to an ObjectContext. {0}"
A string like "The EntityCollection has already been initialized. {0}"
A string like "The EntityCollection could not be initialized because the relationship manager for the object to which the EntityCollection belongs is already attached to an ObjectContext. {0}"
A string like "The specified navigation property {0} could not be found."
A string like "The object could not be added to the bound collection. The specific EntitySet for the object of type '{0}' could not be determined."
A string like "The class '{0}' has no parameterless constructor."
A string like "Unable to set field/property {0} on entity type {1}. See InnerException for details."
A string like "The navigation property of type '{0}' is not a single implementation of '{1}'."
A string like "function '{0}()'"
A string like "type '{0}' constructor"
A string like "Cannot convert literal '{0}' to '{1}'. Numeric literal specification is not valid."
A string like "'{0}' is a reserved keyword and cannot be used as an alias, unless it is escaped."
A string like "The escaped identifier '{0}' is not valid."
A string like "The escaped identifier '{0}' has a mismatch of opening ('[') and closing (']') delimiters."
A string like "The simple identifier '{0}' is not valid."
A string like "The simple identifier '{0}' must contain basic Latin characters only. To use UNICODE characters, use an escaped identifier."
A string like "The alias '{0}' was already used."
A string like "The name '{0}' is ambiguous. '{0}' is defined in both the '{1}' namespace and the '{2}' namespace. To disambiguate, either use a fully qualified name or define a namespace alias."
A string like "The argument types '{0}' and '{1}' are incompatible for this operation."
A string like "The BETWEEN lower limit type '{0}' is not compatible with the upper limit type '{1}'."
A string like "The BETWEEN lower limit type '{0}' is not order-comparable with the upper limit type '{1}'."
A string like "The BETWEEN value type '{0}' is not order-comparable with the limits common type '{1}'."
A string like "'{0}' cannot be instantiated because it is defined as an abstract type."
A string like "'{0}' cannot be resolved into a valid type or function."
A string like "'{0}' could not be resolved in the current scope or context. Make sure that all referenced variables are in scope, that required schemas are loaded, and that namespaces are referenced correctly."
A string like "The CREATEREF type '{0}' is not a sub-type or super-type of the EntitySet EntityType '{1}'."
A string like "The CREATEREF type must specify an EntityType. The type specification '{0}' represents '{1}'."
A string like "The DEREF argument must be a reference type. The passed argument is a '{0}' type."
A string like "The inline function '{0}' with the same parameters already exists. Make sure that function overloads are not ambiguous."
A string like "The entity set or function import '{0}' is not defined in the entity container '{1}'."
A string like "The OFTYPE collection element type must refer to an EntityType. The passed type is {0} '{1}'."
A string like "The OFTYPE collection element type must refer to a nominal type. The passed type is {0} '{1}'."
A string like "{0} must refer to an EntityType. The passed type is {1} '{2}'."
A string like "{0} must refer to a nominal type. The passed type is {1} '{2}'."
A string like "Could not resolve the aggregate function '{0}' in this context."
A string like "A '{0}' exception occurred while processing the query. See the inner exception."
A string like "The type '{0}' is not supported in the UNION expression."
A string like "The CAST expression is not valid. There is no valid conversion from type '{0}' to type '{1}'."
A string like "The complex member '{0}' in type '{1}' and the complex member '{2}' in type '{3}' are incompatible because they have a different number of members."
A string like "The argument type '{0}' is not compatible with the property '{1}' of formal type '{2}'."
A string like "It is not valid to use the type constructor on type '{0}'. This type must have one of the following constructors: Entity, ComplexType, or RelationType."
A string like "The DateTimeOffset literal '{0}' exceeds the range of DateTimeOffset values."
A string like "The day '{0}' is not valid in DateTime literal '{1}'."
A string like "The day '{0}' is not valid for the month '{1}' in DateTime literal '{2}'."
A string like "'{0}' is not a member of type '{1}'. Type '{1}' is the result of dereferencing an expression of type '{2}'."
A string like "The EntityType objects '{0}' and '{1}' are incompatible because they do not share a common super-type."
A string like "The entity '{0}' in type '{1}' and the entity '{2}' in type '{3}' are incompatible because they do not share a common super-type."
A string like "The expression has been classified as a {0}; a {1} was expected."
A string like "The identifier '{0}' is not valid because it is not contained either in an aggregate function or in the GROUP BY clause."
A string like "Hour '{0}' is not valid in DateTime literal '{1}'."
A string like "The 'from' end could not be inferred in the relationship '{0}'."
A string like "The 'to' end could not be inferred in the relationship '{0}'."
A string like "The element type '{0}' and the CollectionType '{1}' are not compatible. The IN expression only supports entity, scalar and reference types. "
A string like "The KEY argument expression must be of reference type. The passed type is '{0}'."
A string like "COLLATE can only be used with sort keys of string type. The passed type is '{0}'."
A string like "The {0} literal value '{1}' is not valid."
A string like "Minute '{0}' is not valid in DateTime literal '{1}'."
A string like "Month '{0}' is not valid in DateTime literal '{1}'."
A string like "The non-nullable member '{0}' of type '{1}' cannot be initialized with a NULL value."
A string like "The command parameter syntax '@{0}' is not valid."
A string like "{0} member '{1}' and {2} member '{3}' are incompatible because they do not have a common type."
A string like "{0} member '{1}' in type '{2}' and {3} member '{4}' in type '{5}' are incompatible because they do not have a common type."
A string like "'{0}' is not a valid member of the '{1}' relationship. "
A string like "'{0}' has been resolved as a {1}; a {2} was expected."
A string like "Complex type '{0}' and complex type '{1}' are incompatible because they have different number of members."
A string like "Row type '{0}' and row type '{1}' are incompatible because they have a different number of columns."
A string like "Row member '{0}' in type '{1}' and row member '{2}' in type '{3}' are incompatible because they have a different number of columns."
A string like "Second '{0}' is not valid in DateTime literal '{1}'."
A string like "The '{0}' argument must be of CollectionType."
A string like "The unsigned type '{0}' cannot be promoted to a signed type."
A string like "Year '{0}' is not valid in DateTime literal '{1}'."
A string like "The multiplicity '{1}' is not valid for the relationship end '{0}'."
A string like "The query is not valid because it contains the association type '{0}', which cannot be projected."
A string like "The key expression '{0}' must have at least one reference to the immediate input scope."
A string like "There is no EDM type that corresponds to the literal type '{0}'."
A string like "The parameter '{0}' was defined more than once in the parameter collection."
A string like "The variable '{0}' was defined more than once in the variable collection."
A string like "The namespace alias '{0}' was used in a previous USING directive."
A string like "The namespace '{0}' was already imported."
A string like "The nested aggregate {0} cannot be used inside of the aggregate {1}."
A string like "No overload of aggregate function '{0}.{1}' is compatible with argument types in '{2}'."
A string like "No overload of canonical aggregate function '{0}.{1}' is compatible with the argument types in '{2}'. Consult provider-specific function documentation for store functions with similar functionality."
A string like "No overload of canonical function '{0}.{1}' is compatible with the argument types in '{2}'. Consult provider-specific function documentation for potential store functions with similar functionality."
A string like "No overload of function '{0}.{1}' is compatible with the argument types in '{2}'."
A string like "'{0}' is not a member of '{1}'. To extract a property of a collection element, use a sub-query to iterate over the collection."
A string like "'{0}' is not a member of type '{1}' in the currently loaded schemas."
A string like "Type '{0}' is neither a sub-type nor a super-type of '{1}'."
A string like "The type constructor argument '{0}' is missing."
A string like "The number of arguments passed to the type '{0}' constructor exceeds its formal specification."
A string like "The OFTYPE ONLY type argument is not valid because '{0}' is an abstract type."
A string like "The command parameter '{0}' of type '{1}' is not supported."
A string like "The command parameter '{0}' was not defined."
A string like "The {0} expression type must be promotable to an Edm.Int64 type. The passed type is '{1}'."
A string like "The {0} expression must be a command parameter or an integral numeric literal."
A string like "The {0} expression value must be greater than or equal to zero."
A string like "The {0} operand of {1} is not valid because its type '{2}' cannot be compared for equality. Only primitive, enumeration, entity, row, and reference types can be compared for equality."
A string like "The precision '{0}' must be greater than the scale '{1}'. "
A string like "The REF argument must be of EntityType. The passed type is '{0}'."
A string like "The REF argument must specify an EntityType. The type specification '{0}' represents '{1}'."
A string like "The related end expression type '{0}' must be promotable to the 'to' end type '{1}'."
A string like "The specified type '{0}' must be a relationship type."
A string like "The target end '{0}' must be unique."
A string like "The relationship source type '{0}' must be promotable to the 'from' end type '{1}'."
A string like "'{0}' does not support type specification."
A string like "'{0}' does not support '{1}' specification."
A string like "The type specification has an incorrect number of arguments. The '{0}' type has {1} parameters."
A string like "'{0}' is less than the minimum supported value."
A string like "'{0}' is greater than the maximum supported value."
A string like "{0} member '{1}' and {2} member '{3}' are not compatible for this operation, because they are not the same kind of type."
A string like "The '{0}' type argument must specify an EntityType. The passed type is {1} '{2}'."
A string like "The '{0}' type argument must specify a nominal type, The passed type is {1} '{2}'."
A string like "Type '{0}' could not be found. Make sure that the required schemas are loaded and that the namespaces are imported correctly."
A string like "INTERNAL ERROR: The literal type '{0}' is not supported."
A string like "INTERNAL ERROR: The expression resolution has an unknown class '{0}'."
A string like "The expression '{0}' is of an unsupported type. "
A string like "The specified type is not polymorphic: '{0}'. "
A string like "{0} requires an expression argument with a polymorphic result type that is compatible with the type argument."
A string like "The name '{2}' was specified twice, at index {0} and index {1}. Duplicate names are not allowed."
A string like "The ResultType of the specified expression is not compatible with the required type. The expression ResultType is '{0}' but the required type is '{1}'. "
A string like "The EntityContainer '{0}' was not found in the destination MetadataWorkspace. "
A string like "The EntitySet '{0}.{1}' was not found in the destination MetadataWorkspace. "
A string like "The function '{0}' was not found in the destination MetadataWorkspace."
A string like "A property named '{0}' is not declared by the type '{1}' from the destination MetadataWorkspace. "
A string like "A navigation property named '{0}' is not declared by the type '{1}' from the destination MetadataWorkspace. "
A string like "A relationship end named '{0}' is not declared by the relationship type '{1}' from the destination MetadataWorkspace."
A string like "The destination MetadataWorkspace does not contain the type '{0}'."
A string like "The specified parameter name is not valid: '{0}'."
A string like "The specified expression contains multiple references to the parameter '{0}' that have different result types."
A string like "The specified expression contains {0} metadata from a workspace other than the target workspace."
A string like "The specified expression contains {0} metadata from a data space other than the target, '{1}'."
A string like "No property with the name '{0}' is declared by the type '{1}'."
A string like "The method result type '{0}' is not supported for this method argument. A method that produces an instance of a DbExpression-derived type or an anonymous type with DbExpression-derived properties is required."
A string like "{0} requires arguments with compatible collection ResultTypes."
A string like "{0} requires a collection argument."
A string like "The unsigned type '{0}' cannot be promoted to a signed type."
A string like "The requested cast is not allowed: from type '{0}' to type '{1}'."
A string like "The specified value is not an instance of type '{0}'."
A string like "Only enumeration or primitive types may be used as constant value types. DbConstantExpression cannot be created using an instance of type '{0}'."
A string like "The type '{0}' does not match the EDM enumeration type '{1}' or its underlying type '{2}'."
A string like "No function named 'Edm.{0}' having the specified argument types was found."
A string like "The specified argument result types matched more than one overload of the function 'Edm.{0}'."
A string like "The specified group key is not valid because equality comparison cannot be performed on its ResultType: '{0}'."
A string like "An aggregate named '{0}' cannot be used because the specified group keys include a key with the same name."
A string like "The specified DbCrossJoinExpression inputs contain expression bindings with a duplicate variable name, '{2}'. The first occurrence is at index {0}, the second is at index {1}. "
A string like "A collection of '{0}' is not a valid argument for {1}."
A string like "DbNewInstanceExpression cannot create an instance of the memberless type '{0}'."
A string like "DbNewInstanceExpression cannot create an instance of the abstract type '{0}'."
A string like "The specified navigation requires a navigation source of a type that is compatible with '{0}'."
A string like "An error occurred while preparing definition of the function '{0}'. See the inner exception for details."
A string like "Definition of the function '{0}' contains a direct or indirect reference to itself. Recursive function definitions are not supported."
A string like "The result type '{0}' specified in the declaration of the function '{1}' does not match the result type '{2}' of the function definition."
A string like "The function '{0}' has no defining expression. A user-defined function needs a defining expression for successful execution."
A string like "The referenced variable '{0}' is not defined in the current scope."
A string like "The ResultType of the referenced variable '{0}' does not match the type specified in this variable reference expression."
A string like "The specified Op is of an unsupported type: {0}"
A string like "Calling '{0}' when the data reader is closed is not a valid operation."
A string like "The data reader is incompatible with the specified '{0}'. A member of the type, '{1}', does not have a corresponding column in the data reader with the same name."
A string like "The data reader is incompatible with the function mapping '{1}'. The column with the name '{0}' does not exist."
A string like "Cannot create a value for property '{0}' of type '{1}'. Only properties of primitive or enumeration types are supported."
A string like "The query attempted to call '{0}' over a nested query, but '{0}' did not have the appropriate keys."
A string like "The nested query is not supported. Operation1='{0}' Operation2='{1}'"
A string like "No query mapping view exists for the specified set '{0}.{1}'."
A string like "Internal .NET Framework Data Provider error {0}."
A string like "The {0} enumeration value, {1}, is not valid."
A string like "Buffer offset '{1}' plus the bytes available '{0}' is greater than the length of the passed in buffer."
A string like "Data length '{0}' is less than 0."
A string like "The parameter data type of {0} is not valid."
A string like "Destination buffer is not valid (size of {0}) offset: {1}"
A string like "Source buffer is not valid (size of {0}) offset: {1}"
A string like "At dataOffset '{0}' {2} attempt is not valid. With CommandBehavior.SequentialAccess, you may only read from dataOffset '{1}' or greater."
A string like "Attempt to read from column ordinal '{0}' is not valid. With CommandBehavior.SequentialAccess, you may only read from column ordinal '{1}' or greater."
A string like "Unable to handle an unknown TypeCode {0} returned by Type {1}."
A string like "The element in the collection parameter '{0}' cannot be null."
A string like "The element in the collection parameter '{0}' cannot be null or empty."
A string like "An EntityParameter with ParameterName '{0}' is not contained by this EntityParameterCollection."
A string like "Invalid index {0} for this EntityParameterCollection with {1} elements."
A string like "The EntityParameterCollection only accepts non-null EntityParameter type objects, not objects of type {0}."
A string like "Format of the initialization string does not conform to specification starting at index {0}."
A string like "Invalid parameter Size value '{0}'. The value must be greater than or equal to 0."
A string like "Keyword not supported: '{0}'."
A string like "Facet '{0}' must not be specified for type '{1}'."
A string like "Annotation '{0}' is already defined in '{1}'."
A string like "{0} does not contain a schema definition, or the XmlReader provided started at the end of the file."
A string like "{0} is not valid."
A string like "{1} ({0}) is not valid."
A string like "Unrecognized schema attribute: {0}."
A string like "Unrecognized schema element: {0}."
A string like "The current schema element does not support text ({0})."
A string like "Unexpected XmlNode type: {0}."
A string like "Malformed XML. Element starting at ({0},{1}) has no closing tag."
A string like "{1} value ({0}) was not understood."
A string like "The EntityContainer name must be unique. An EntityContainer with the name '{0}' is already defined."
A string like "Each type name in a schema must be unique. Type name '{0}' was already defined."
A string like "Each property name in a type must be unique. Property name '{0}' was already defined."
A string like "Each member name in an EntityContainer must be unique. The member '{0}' is already defined in EntityContainer '{1}'. Because EntityContainer '{2}' extends EntityContainer '{1}', you cannot have a member with the same name in EntityContainer '{2}'."
A string like "Each member name in an EntityContainer must be unique. A member with name '{0}' is already defined."
A string like "{0} property is not valid. A type is already defined for this property."
A string like "MaxLength '{0}' is not valid. Length must be between '{1}' and '{2}' for '{3}' type."
A string like "SRID '{0}' is not valid. Its value must be between '{1}' and '{2}' for '{3}' type."
A string like "Unknown namespace or alias ({0})."
A string like "BaseType ({0}) is not valid. The BaseType for {1} must be a structured type."
A string like "A property cannot be of type {0}. The property type must be an inline type, a scalar type, or an enumeration type."
A string like "BaseType ({0}) is not valid. The BaseType for {1} must be another EntityType."
A string like "BaseType ({0}) is not valid. The BaseType for {1} must be another ComplexType."
A string like "{0} facet isn't allowed for properties of type {1}."
A string like "Facet '{0}' must be specified for '{1}' typed properties."
A string like "Default value ({0}) is not valid for Binary. Value must be of form 0x123 where 123 stands for a non-empty sequence of hex digits."
A string like "Default value ({0}) is not valid. Expected an integer between {1} and {2}."
A string like "Default value ({0}) is not valid for DateTime. The value must be in the form '{1}'."
A string like "Default value ({0}) is not valid for Time. The value must be in the form '{1}'."
A string like "Default value ({0}) is not valid for DateTimeOffset. The value must be in the form '{1}'."
A string like "Default value ({0}) is not compatible with the facets specified for Decimal. The value must be a decimal number with scale less than or equal to {1} and precision less than or equal to {2}."
A string like "Default value ({0}) is not valid. The value must be a floating point number between {1} and {2}."
A string like "Default value ({0}) is not valid for GUID. The value must be enclosed in single quotes in the form 'dddddddd-dddd-dddd-dddd-dddddddddddd'."
A string like "Default value ({0}) is not valid for Boolean. The value must be true or false."
A string like "A member named {0} cannot be defined in class {1}. It is defined in ancestor class {2}."
A string like "Precision and Scale combination is not valid. Precision ({0}) must be greater than or equal to Scale ({1})."
A string like "No schema encountered with '{0}' namespace. Make sure the namespace is correct or the schema defining the namespace is specified."
A string like "NavigationProperty is not valid. {0} is not a Relationship."
A string like "NavigationProperty is not valid. The role {0} is not defined in Relationship {1}."
A string like "NavigationProperty '{0}' is not valid. Type '{1}' of FromRole '{2}' in AssociationType '{3}' must exactly match with the type '{4}' on which this NavigationProperty is declared on."
A string like "Name {0} cannot be used in type {1}. Member names cannot be the same as their enclosing type."
A string like "Key usage is not valid. {0} cannot define keys because one of its base classes ({1}) defines keys."
A string like "Key Part: '{0}' for type {1} is not valid. All parts of the key must be non nullable."
A string like "Key: {0} is not valid. {1} is not a valid property name."
A string like "EntityType '{0}' has no key defined. Define the key for this EntityType."
A string like "Value {0} is not valid. Expected a non-negative value."
A string like "{0} is out of range."
A string like "URI {0} is not acceptable. URIs must be absolute or specify a file."
A string like "Element of unexpected type {0} was found at index {1}."
A string like "Each alias in a schema must be unique. Alias '{0}' was already used in this schema."
A string like "The namespace '{0}' is a system namespace and is implicitly referred by every schema. You cannot specify an explicit reference to this namespace."
A string like "'{0}' is a system namespace and cannot be used as an Alias. Use some other Alias."
A string like "The EntitySet {0} is based on type {1} that has no keys defined."
A string like "The EntitySet '{0}' has both a Table or Schema attribute and a DefiningQuery element. The Table and Schema attributes on EntitySet are mutually exclusive with the DefiningQuery element. Use only the Table and Schema attributes or the DefiningQuery element."
A string like "The element {1} in namespace {0} was unexpected for the root element. The expected Schema in one of the following namespaces: {2}."
A string like "The element {1} was unexpected for the root element. The expected Schema in one of the following namespaces: {2}."
A string like "Each parameter name in a function must be unique. The parameter name '{0}' was already defined."
A string like "Type '{0}' is not valid in function '{1}'. The function must have return type and parameters expressed in primitive types."
A string like "Type '{0}' is not valid in function '{1}'. The function must have return type and parameters expressed in conceptual side primitive types."
A string like "Return type is not valid in FunctionImport '{0}'. The FunctionImport must return a collection of scalar values or a collection of entities."
A string like "Return type is not valid in FunctionImport '{0}'. The FunctionImport must return Scalar, Entity, or ComplexType."
A string like "Return type is not valid in FunctionImport '{0}'. The FunctionImport can have no return type or return a collection of scalar values, a collection of complex types or a collection of entities."
A string like "EntitySet '{0}' is not valid in FunctionImport '{1}'. Unable to find an EntitySet with the name."
A string like "FunctionImport '{0}' returns entities but does not specify an EntitySet."
A string like "The function import '{0}' returns entities of type '{1}' that cannot exist in the declared EntitySet '{2}'."
A string like "The function import '{0}' specifies an entity set but does not return entities."
A string like "The function import '{0}' specifies an entity set and an entity set path. A function import may only specify one of these values but not both."
A string like "The function import '{0}' is declared as composable and side-effecting. A function import can be either composable or side-effecting, but not both."
A string like "The function import '{0}' has a parameter of a collection or reference type. Parameters of a collection or reference type are not allowed in function imports."
A string like "The function import '{0}' has a non-nullable parameter. Only nullable parameters are allowed in function imports."
A string like "The EntitySet '{0}' with schema '{1}' and table '{2}' was already defined. Each EntitySet must refer to a unique schema and table."
A string like "Type '{0}' is derived from the type '{1}' that is the type for EntitySet '{2}'. Type '{0}' defines new concurrency requirements that are not allowed for sub types of base EntitySet types."
A string like "In EntityContainer '{4}', Role '{0}' in '{1}' and '{2}' AssociationSet refers to the same EntitySet '{3}'. Make sure that if two or more AssociationSet refer to the same AssociationType, the ends must not refer to the same EntitySet."
A string like "Relationship {0} is not valid. Multiplicity ({1}) is not valid. Multiplicity must be: '*', '0..1', or '1'."
A string like "Each Name and PluralName in a relationship must be unique. '{0}' was already defined."
A string like "Relationship {0} is not valid. End type ({1}) is not valid. The End type must be an EntityType."
A string like "The parameter {0} in function '{1}' in schema '{2}' has an invalid parameter direction {3}. Valid parameter directions are: In, Out, and InOut."
A string like "The parameter {0} in function '{1}' in schema '{2}' has an invalid parameter direction {3}. The only valid value for this parameter is In."
A string like "The Action {0} on {1} is not recognized. Valid actions are 'None' or 'Cascade'."
A string like "Only one {0} element is allowed per relationship."
A string like "Type {0} is not defined in namespace {1} (Alias={2})."
A string like "The Type {0} is not qualified with a namespace or alias. Only primitive types can be used without qualification."
A string like "Type {0} is not defined in namespace {1}."
A string like "The value {0} is not valid for ParameterTypeSemantics attribute. Valid values are 'ExactMatchOnly', 'AllowImplicitPromotion' or 'AllowImplicitConversion'."
A string like "Key specified in EntityType '{0}' is not valid. Property '{1}' is referenced more than once in the Key element."
A string like "An EntitySet cannot be of type {0}. The property type must be an EntityType, or an AssociationEntityType."
A string like "A RelationshipSet cannot be of type {0}. The property type must be a Relationship."
A string like "No EntityContainer found with name '{0}'."
A string like "'{0}' is not a valid namespace or alias name. You must use the current schema namespace or alias to qualify the type."
A string like "Precision '{0}' is not valid. Precision must be between '{1}' and '{2}' for '{3}' type."
A string like "Scale '{0}' is not valid. Scale must be between '{1}' and '{2}' for '{3}' type."
A string like "The referenced EntitySet {0} for End {1} could not be found in the containing EntityContainer."
A string like "The End {0} does not match any Ends on the {1} type."
A string like "The End Name {0} is already defined."
A string like "The EntitySet for the End '{0}' in AssociationSet '{1}'was not specified, and cannot be inferred because the EntitySet is ambiguous. More than one EntitySet could be used; an explicit End element with an EntitySet attribute must be specified."
A string like "The EntitySet for the End '{0}' in AssociationSet '{1}' was not specified, and cannot be inferred because none of the EntitySet elements are of the correct type."
A string like "The End {0} has a different Type than the EntitySet it refers to."
A string like "In EntityContainer '{4}', the Role for the End with the EntitySet '{0}', in the AssociationSet '{1}' was not supplied, and there were no Ends in the Relationship '{2}' that matched the type '{3}'."
A string like "In EntityContainer '{4}', the Role for the End with the EntitySet '{0}' in the AssociationSet '{1}' was not supplied, and there is more than one End in the Relationship '{2}' that could match the type '{3}'. Provide the Role attribute to disambiguate the End."
A string like "The Role for the End with the EntitySet {0} in the AssociationSet {1} was not supplied and the End found matches one that is already defined. Change the EntitySet to one which has a type of a different End of the Relationship."
A string like "The Association {0} is not valid. Associations may only contain two End elements."
A string like "There is no Role with name '{0}' defined in relationship '{1}'. Check and try again."
A string like "Properties referred by the Principal Role {0} must be exactly identical to the key of the EntityType {1} referred to by the Principal Role in the relationship constraint for Relationship {2}. Make sure all the key properties are specified in the Principal Role."
A string like "Properties referred by the Dependent Role {0} must be a subset of the key of the EntityType {1} referred to by the Dependent Role in the referential constraint for Relationship {2}."
A string like "There is no property with name '{0}' defined in type referred by Role '{1}'."
A string like "The types of all properties in the Dependent Role of a referential constraint must be the same as the corresponding property types in the Principal Role. The type of property '{0}' on entity '{1}' does not match the type of property '{2}' on entity '{3}' in the referential constraint '{4}'."
A string like "Multiplicity is not valid in role '{0}' in relationship '{1}'. Valid values for multiplicity for Principal Role are '0..1' or '1'."
A string like "Multiplicity conflicts with the referential constraint in Role '{0}' in relationship '{1}'. Because one/all of the properties in the Dependent Role is non-nullable, multiplicity of the Principal Role must be '1'."
A string like "Multiplicity conflicts with the referential constraint in Role '{0}' in relationship '{1}'. Because all of the properties in the Dependent Role are non-nullable, multiplicity of the Principal Role must be '1'."
A string like "Multiplicity is not valid in Role '{0}' in relationship '{1}'. Because all the properties in the Dependent Role are nullable, multiplicity of the Principal Role must be '0..1'."
A string like "Multiplicity is not valid in Role '{0}' in relationship '{1}'. The Lower Bound of the multiplicity must be 0."
A string like "Multiplicity is not valid in Role '{0}' in relationship '{1}'. Because the Dependent Role refers to the key properties, the upper bound of the multiplicity of the Dependent Role must be 1."
A string like "Multiplicity is not valid in Role '{0}' in relationship '{1}'. Because the Dependent Role properties are not the key properties, the upper bound of the multiplicity of the Dependent Role must be *."
A string like "The relationship '{0}' does not contain the required referential constraint."
A string like "In relationship '{0}', the Principal and Dependent Role of the referential constraint refers to the same Role in the relationship type."
A string like "The value '{0}' is not a valid PrimitiveTypeKind."
A string like "The property '{0}' in EntityType '{1}' is not valid. All properties that are part of the EntityKey must be of enumeration or primitive type."
A string like "The property '{0}' in EntityType '{1}' is not valid. Type '{2}' of the property maps to '{3}' and EntityKey properties that are of type '{4}' are currently not supported."
A string like "The property '{0}' in EntityType '{1}' is not valid. EntityKey properties that are of type '{2}' are currently not supported."
A string like "The type '{0}' is of PrimitiveTypeKind {1} which must have the facet description {2}."
A string like "End '{0}' on relationship '{1}' cannot have operation specified since its multiplicity is '*'. Operations cannot be specified on ends with multiplicity '*'."
A string like "End '{0}' on relationship '{1}' must specify multiplicity."
A string like "EntityContainer '{0}' cannot extend itself. Specify some other EntityContainer name."
A string like "Argument '{0}' is invalid. The specified function is not marked as composable."
A string like "Function '{0}' with the same {1} space type parameters already exists. Make sure that function overloads are not ambiguous."
A string like "Function '{0}' and {1} space type '{0}' cannot have the same fully qualified name."
A string like "A cycle was detected in the type hierarchy of '{0}'."
A string like "The function import '{0}' cannot have ComplexType ReturnType '{1}' and an EntitySet specified at the same time."
A string like "Nested ComplexType property '{0}' in the ReturnType '{1}' of the function '{2}' is not supported, please consider flattening the nested ComplexType property."
A string like "Facets cannot be specified for non-scalar type '{0}'."
A string like "ReferenceType element can only refer to an EntityType. '{0}' is not declared as an EntityType."
A string like "The '{0}' namespace is reserved for the Entity Framework code generation."
A string like "The value '{0}' of the enumeration type member '{1}' cannot be converted to '{2}' type."
A string like "'{0}' is not a valid type for type filtering operations. Type filtering is only valid on entity types and complex types."
A string like "The specified query name '{0}' is not valid. Query names must begin with a letter and can only contain letters, numbers, and underscores."
A string like "The array type '{0}' cannot be initialized in a query result. Consider using '{1}' instead."
A string like "The specified parameter name '{0}' is not valid. Parameter names must begin with a letter and can only contain letters, numbers, and underscores."
A string like "The specified parameter type '{0}' is not valid. Only scalar types, such as System.Int32, System.Decimal, System.DateTime, and System.Guid, are supported."
A string like "A parameter named '{0}' was not found in the parameter collection."
A string like "A parameter '{0}' already exists in the parameter collection. Parameters must be unique in the parameter collection."
A string like "A parameter named '{0}' already exists in the parameter collection. Parameter names must be unique in the parameter collection."
A string like "The provider returned null for the informationType '{0}'."
A string like "A specified Include path is not valid. The EntityType '{0}' does not declare a navigation property with the name '{1}'."
A string like "The property '{0}' on type '{1}' cannot be set because the collection is already set to an EntityCollection."
A string like "There is no metadata information available for the proxy type for '{0}'. This exception can be caused when a proxy type for an entity is detached from an ObjectContext. See InnerException for details."
A string like "There is already a generated proxy type for the object layer type '{0}'. This occurs when the same object layer type is mapped by two or more different models in an AppDomain."
A string like "No Entity Framework provider found for the ADO.NET provider with invariant name '{0}'. Make sure the provider is registered in the 'entityFramework' section of the application config file. See http://go.microsoft.com/fwlink/?LinkId=260882 for more information."
A string like "The Entity Framework provider type '{0}' registered in the application config file for the ADO.NET provider with invariant name '{1}' could not be loaded. Make sure that the assembly-qualified name is used and that the assembly is available to the running application. See http://go.microsoft.com/fwlink/?LinkId=260882 for more information."
A string like "The Entity Framework provider type '{0}' did not have a static property or field named 'Instance'. Entity Framework providers must declare a static property or field named 'Instance' that returns the singleton instance of the provider."
A string like "The 'Instance' member of the Entity Framework provider type '{0}' did not return an object that inherits from 'System.Data.Entity.Core.Common.DbProviderServices'. Entity Framework providers must inherit from this class and the 'Instance' member must return the singleton instance of the provider. This may be because the provider does not support Entity Framework 6 or later; see http://go.microsoft.com/fwlink/?LinkId=260882 for more information."
A string like "The provider for invariant name '{0}' is specified multiple times in the application configuration. The invariant name must be unique for each configured provider."
A string like "No name was passed to the IDbDependencyResolver.GetService method. The provider invariant name must be supplied when attempting to resolve a '{0}' dependency."
A string like "No '{0}' instance was passed to the IDbDependencyResolver.GetService method. A '{0}' instance must be supplied when attempting to resolve an '{1}' dependency."
A string like "The default DbConfiguration instance was used by the Entity Framework before an attempt was made to set an instance of '{0}'. The '{0}' instance must be set at application start before using any Entity Framework features or must be registered in the application's config file. See http://go.microsoft.com/fwlink/?LinkId=260883 for more information."
A string like "An instance of '{0}' cannot be set because an instance of '{1}' is already being used. Only one DbConfiguration type can be used in an application. See http://go.microsoft.com/fwlink/?LinkId=260883 for more information."
A string like "The default DbConfiguration instance was used by the Entity Framework before the '{0}' type was discovered. An instance of '{0}' must be set at application start before using any Entity Framework features or must be registered in the application's config file. See http://go.microsoft.com/fwlink/?LinkId=260883 for more information."
A string like "An instance of '{0}' was set but this type was not discovered in the same assembly as the '{1}' context. Either put the DbConfiguration type in the same assembly as the DbContext type, use DbConfigurationTypeAttribute on the DbContext type to specify the DbConfiguration type, or set the DbConfiguration type in the config file. See http://go.microsoft.com/fwlink/?LinkId=260883 for more information."
A string like "The assembly '{0}' contains more than one type derived from '{1}'. Either use DbConfigurationTypeAttribute on the DbContext type to specify the DbConfiguration type, define the DbConfiguration type to use in the application's config file, or ensure that the assembly contains at most one type derived from '{1}'."
A string like "The type '{0}' does not inherit from '{1}'. Migrations configuration types must extend from '{1}'."
A string like "The type '{0}' does not inherit from '{1}'. Migrations SQL generator implementations must extend from '{1}'."
A string like "The type '{0}' does not inherit from '{1}'. Entity Framework code-based configuration classes must inherit from '{1}'."
A string like "The DbConfiguration type '{0}' specified in the application config file could not be loaded. Make sure that the assembly-qualified name is used and that the assembly is available to the running application. See http://go.microsoft.com/fwlink/?LinkId=260883 for more information."
A string like "The DbConfiguration type '{0}' specified in the DbConfigurationTypeAttribute constructor could not be loaded. Make sure that the assembly-qualified name is used and that the assembly is available to the running application. See http://go.microsoft.com/fwlink/?LinkId=260883 for more information."
A string like "Failed to create instance of type '{0}'. The type must have a public parameterless constructor."
A string like "Failed to create instance of type '{0}'. The type must not be abstract."
A string like "Failed to create instance of type '{0}'. The type must not be generic."
A string like "The call to DbConfiguration.{0} failed because the configuration is locked. The protected methods and properties of DbConfiguration are intended to be called only from the constructor of a class derived from DbConfiguration and cannot be called after the DbConfiguration object is in use."
A string like "To enable migrations for '{0}', use Enable-Migrations -ContextTypeName {0}."
A string like "More than one context type was found in the assembly '{0}'."
A string like "More than one context type '{0}' was found in the assembly '{1}'. Specify the fully qualified name of the context."
A string like "No context type was found in the assembly '{0}'."
A string like "The context type '{0}' was not found in the assembly '{1}'."
A string like "The source IQueryable doesn't implement IDbAsyncEnumerable{0}. Only sources that implement IDbAsyncEnumerable can be used for Entity Framework asynchronous operations. For more details see http://go.microsoft.com/fwlink/?LinkId=287068."
A string like "An instance of '{0}' could not be created because it does not define a parameterless constructor. Every type derived from EntityTypeConfiguration in an assembly must have a parameterless constructor when using AddFromAssembly to add Code First configurations from that assembly."
A string like "The '{0}' collection used in the call to '{1}' must contain at least one element."
A string like "The type '{0}' does not inherit from DbContext. The DbMigrationsConfiguration.ContextType property must be set to a type that inherits from DbContext."
A string like "The 'MigrationsDirectory' property of 'DbMigrationsConfiguration' was set to the absolute path '{0}'. The migrations directory must be set to a relative path for a sub-directory under the Visual Studio project root."
A string like "The type '{0}' cannot be used to filter properties. Only scalar types, string, and byte[] are supported."
A string like "The property '{0}' cannot be configured. Only scalar properties can be configured using the Property method."
A string like "Unable to generate an explicit migration because the following explicit migrations are pending: [{0}]. Apply the pending explicit migrations before attempting to generate a new explicit migration."
A string like "The configured execution strategy '{0}' does not support user initiated transactions. See http://go.microsoft.com/fwlink/?LinkId=309381 for additional information."
A string like "The minimum delay of '{0}' must be less than or equal to the maximum delay of '{1}'."
A string like "The delay '{0}' is invalid. Delay must be greater than or equal to zero."
A string like "Maximum number of retries ({0}) exceeded while executing database operations with '{1}'. See inner exception for the most recent failure."
A string like "The base type '{0}' must be mapped to functions because its derived type '{1}' is mapped to functions. When mapping an inheritance hierarchy to functions, ensure that the root type of the hierarchy is also mapped to functions."
A string like "'{0}' is not a valid resource name."
A string like "A parameter binding to the property '{0}' was not found on the modification function '{1}'. Ensure that the parameter is valid for this modification operation and that it is not database generated."
A string like "The current migration SQL generator ({0}) is unable to generate SQL for operations of type '{1}'. Call SetSqlGenerator on your migrations configuration class to use a different SQL generator. To create a custom SQL generator that can handle this type of operation, add a new class that derives from {0} and override Generate(MigrationOperation)."
A string like "An original value parameter binding to the property '{0}' was not found on the modification function '{1}'. Ensure that the parameter is a concurrency token."
A string like "A result binding for the property '{0}' was not found on the modification function '{1}'. Ensure that the property is database generated."
A string like "The navigation property '{0}' declared on type '{1}' has been configured with conflicting modification function mapping information."
A string like "Streaming queries are not supported by the configured execution strategy '{0}'. See http://go.microsoft.com/fwlink/?LinkId=309381 for additional information."
A string like "A property cannot be of type '{0}'. The property type must be a ComplexType, a PrimitiveType or an EnumType."
A string like "Argument '{0}' is not valid. The specified mapping already exists or property paths are empty."
A string like "Could not apply auto-migration '{0}' because it includes modification function creation operations. When using auto-migrations, modification function creation operations are only supported when migrating to the current model."
A string like "Calling '{0}' is not valid for type '{1}' because it is configured as a complex type. '{0}' is only allowed when configuring entity types."
A string like "Calling '{0}' is not valid for type '{1}' because it has been excluded from the model."
A string like "Attempt to add member {0} to structural type {1} failed. Member has DataSpace {2}, structural type has DataSpace {3}. They must be the same."
A string like "The entity type '{0}' on which the navigation property '{1}' is declared is not the same as the type '{2}' referred to by the inverse navigation property '{3}'."
A string like "The entity type '{0}' to which the navigation property '{1}' refers is not the same as the type '{2}' on which the inverse navigation property '{3}' is declared."
A string like "Duplicate parameter name: {0}"
A string like "-- Failed in {0} ms with error: {1}{2}"
A string like "-- Canceled in {0} ms{1}"
A string like "-- Completed in {0} ms with result: {1}{2}"
A string like "-- Executing asynchronously at {0}{1}"
A string like "-- Executing at {0}{1}"
A string like "The type '{0}' passed to DbConfiguration.LoadConfiguration does not derive from DbContext. Only DbContext types can be used for DbConfiguration discovery."
A string like "An error occurred while attempting to generate the body SQL of the stored procedure '{0}' for entity type '{1}'. This can happen if the entity type has both a self-referencing association and a store-generated key. See the inner exception for details."
A string like "Multiplicity '{0}' is not compatible with the property '{1}' of type '{2}'."
A string like "Multiplicity '{0}' is not valid. Multiplicity must be: '*', '0..1', or '1'."
A string like "The property '{0}' of type '{1}' cannot be marked as optional because it cannot be assigned a null value."
A string like "The member '{0}' has not been implemented on type '{1}' which inherits from '{2}'. Test doubles for '{2}' must provide implementations of methods and properties that are used."
A string like "The property '{0}' on type '{1}' cannot be configured as a navigation property because type '{2}' was configured as a complex type."
A string like "The specified convention of type '{0}' is not a valid convention. Conventions must derive from Convention or implement IStoreConvention or IConceptualConvention."
A string like "Scale cannot be configured for the DateTime property '{0}', only precision can be configured for DateTime properties."
A string like "Only precision was configured for Decimal property '{0}'. Both precision and scale must be configured for Decimal properties."
A string like "Precision without scale has been configured for property '{0}'. Precision without scale can only be configured for DateTime properties."
A string like "Precision and scale have been configured for property '{0}'. Precision and scale can only be configured for Decimal properties."
A string like "The property '{0}' is not a Byte array. IsRowVersion can only be configured for Byte array properties."
A string like "The property '{0}' is not a String. IsUnicode can only be configured on String properties."
A string like "The property '{0}' is not a String or Byte array. Length can only be configured for String and Byte array properties."
A string like "AutomaticMigration"
A string like "BootstrapMigration"
A string like "InitialCreate"
A string like "Automatic migration was not applied because it would result in data loss."
A string like "Running Seed method."
A string like "No pending explicit migrations."
A string like "Explicit"
A string like "Upgrading history table."
A string like "Cannot scaffold the next migration because the target database was created with a version of Code First earlier than EF 4.3 and does not contain the migrations history table. To start using migrations against this database, ensure the current model is compatible with the target database and execute the migrations Update process. (In Visual Studio you can use the Update-Database command from Package Manager Console to execute the migrations Update process)."
A string like "Unable to update database to match the current model because there are pending changes and automatic migration is disabled. Either write the pending model changes to a code-based migration or enable automatic migration. Set DbMigrationsConfiguration.AutomaticMigrationsEnabled to true to enable automatic migration."
A string like "Scripting the downgrade between two specified migrations is not supported."
A string like "Direct column renaming is not supported by SQL Server Compact. To rename a column in SQL Server Compact, you will need to recreate it."
A string like "One or more validation errors were detected during model generation:"
A string like "A circular ComplexType hierarchy was detected. Self-referencing ComplexTypes are not supported."
A string like "Connection to the database failed. The connection string is configured with an invalid LocalDB server name. This may have been set in 'global.asax' by a pre-release version of MVC4. The default connection factory is now set in web.config so the line in 'global.asax' starting with 'Database.DefaultConnectionFactory = ' should be removed. See http://go.microsoft.com/fwlink/?LinkId=243166 for details."
A string like "An error occurred while getting provider information from the database. This can be caused by Entity Framework using an incorrect connection string. Check the inner exceptions for details and ensure that the connection string is correct."
A string like "An error occurred while saving entities that do not expose foreign key properties for their relationships. The EntityEntries property will return null because a single entity cannot be identified as the source of the exception. Handling of exceptions while saving can be made easier by exposing foreign key properties in your entity types. See the InnerException for details."
A string like "The set of property value names is read-only."
A string like "A property of a complex type must be set to an instance of the generic or non-generic DbPropertyValues class for that type."
A string like "Model compatibility cannot be checked because the DbContext instance was not created using Code First patterns. DbContext instances created from an ObjectContext or using an EDMX file cannot be checked for compatibility."
A string like "Model compatibility cannot be checked because the database does not contain model metadata. Model compatibility can only be checked for databases created using Code First or Code First Migrations."
A string like "The context cannot be used while the model is being created. This exception may be thrown if the context is used inside the OnModelCreating method or if the same context instance is accessed by multiple threads concurrently. Note that instance members of DbContext and related classes are not guaranteed to be thread safe."
A string like "The DbContext class cannot be used with models that have multiple entity sets per type (MEST)."
A string like "The operation cannot be completed because the DbContext has been disposed."
A string like "The provider factory returned a null connection."
A string like "The DbConnectionFactory instance returned a null connection."
A string like "The number of primary key values passed must match number of primary key values defined on the entity."
A string like "The type of one of the primary key values did not match the type defined in the entity. See inner exception for details."
A string like "Multiple entities were found in the Added state that match the given primary key values."
A string like "Data binding directly to a store query (DbSet, DbQuery, DbSqlQuery, DbRawSqlQuery) is not supported. Instead populate a DbSet with data, for example by calling Load on the DbSet, and then bind to local data. For WPF bind to DbSet.Local. For WinForms bind to DbSet.Local.ToBindingList()."
A string like "The Include path expression must refer to a navigation property defined on the type. Use dotted paths for reference navigation properties and the Select operator for collection navigation properties."
A string like "Cannot initialize a DbContext from an entity connection string or an EntityConnection instance together with a DbCompiledModel. If an entity connection string or EntityConnection instance is used, then the model will be created from the metadata in the connection. If a DbCompiledModel is used, then the connection supplied should be a standard database connection (for example, a SqlConnection instance) rather than an entity connection."
A string like "Using the same DbCompiledModel to create contexts against different types of database servers is not supported. Instead, create a separate DbCompiledModel for each type of server being used."
A string like "Validation failed for one or more entities. See 'EntityValidationErrors' property for more details."
A string like "An exception occurred while initializing the database. See the InnerException for details."
A string like "Creating a DbModelBuilder or writing the EDMX from a DbContext created using an existing ObjectContext is not supported. EDMX can only be obtained from a Code First DbContext created without using an existing DbCompiledModel."
A string like "Creating a DbModelBuilder or writing the EDMX from a DbContext created using Database First or Model First is not supported. EDMX can only be obtained from a Code First DbContext created without using an existing DbCompiledModel."
A string like "Code generated using the T4 templates for Database First and Model First development may not work correctly if used in Code First mode. To continue using Database First or Model First ensure that the Entity Framework connection string is specified in the config file of executing application. To use these classes, that were generated from Database First or Model First, with Code First add any additional configuration using attributes or the DbModelBuilder API and then remove the code that throws this exception."
A string like "The generic 'Set' method cannot be called with a proxy type. Either use the actual entity type or call the non-generic 'Set' method."
A string like "NavigationProperty is not valid. The FromRole and ToRole are the same."
A string like "OnDelete can be specified on only one End of an EdmAssociation."
A string like "The number of properties in the Dependent and Principal Roles in a relationship constraint must be identical."
A string like "Composable function imports are not supported for version 1.0 or 2.0 EDM Models."
A string like "The name is missing or not valid."
A string like "AssociationEnd must not be null."
A string like "DependentEnd must not be null."
A string like "ToProperties must not be empty."
A string like "Association must not be null."
A string like "ResultEnd must not be null."
A string like "EntityType must not be null."
A string like "ElementType must not be null."
A string like "ElementType must not be null."
A string like "SourceSet must not be null."
A string like "TargetSet must not be null."
A string like "The type is not a valid EdmTypeReference."
A string like "The data space of the item does not match the data space of the EdmModel."
A string like "Serializer can only serialize an EdmModel that has one EdmNamespace and one EdmEntityContainer."
A string like "MaxLengthAttribute must have a Length value that is greater than zero. Use MaxLength() without parameters to indicate that the string or array can have the maximum allowable length."
A string like "MinLengthAttribute must have a Length value that is zero or greater."
A string like "The connection can not be overridden because this context was created from an existing ObjectContext."
A string like "Can not override the connection for this context with a standard DbConnection because the original connection was an EntityConnection."
A string like "Can not override the connection for this context with an EntityConnection because the original connection was a standard DbConnection."
A string like "The key-value pairs that define an EntityKey cannot be null or empty."
A string like "The requested operation could not be completed, because a null EntityKey property value was returned by the object."
A string like "An EntityKey must have at least one key name and value."
A string like "The EntitySet name cannot be null or empty, and must be qualified with an EntityContainer name that is not null or empty."
A string like "The EntityKey does not contain a valid EntitySet name."
A string like "EntityKey values cannot be changed once they are set."
A string like "The EntityType specified for the metadata parameter is not compatible with the specified EntitySet. "
A string like "The type of the TypeUsage object specified for the metadata parameter is not compatible with the type to which an EdmMember belongs."
A string like "The specified value is not a string."
A string like "The EntityCommand.CommandText property has not been initialized."
A string like "A connection string must be set on the connection before you attempt this operation."
A string like "The connection is not open."
A string like "Cannot perform the operation because the command does not have a connection."
A string like "Cannot perform the operation because the adapter does not have a connection."
A string like "Cannot perform the update operation because the adapter's connection is not open."
A string like "The specified named connection is either not found in the configuration, not intended to be used with the EntityClient provider, or not valid."
A string like "The command is still associated with an open data reader. Changes cannot be made on this command and this command cannot be executed until the data reader is closed."
A string like "No modifications to connection are permitted after the metadata has been registered either by opening a connection or constructing the connection with a MetadataWorkspace."
A string like "closed"
A string like "broken"
A string like "This store command cannot be cloned because the underlying store provider does not support cloning."
A string like "The only EntityCommand.CommandType values supported by the EntityClient provider are Text and StoredProcedure."
A string like "An error occurred while closing the provider connection. See the inner exception for details."
A string like "An error occurred while starting a transaction on the provider connection. See the inner exception for details."
A string like "Other keywords are not allowed when the 'Name' keyword is specified."
A string like "An error occurred while preparing the command definition. See the inner exception for details."
A string like "An error occurred while executing the command definition. See the inner exception for details."
A string like "An error occurred while executing the command. See the inner exception for details."
A string like "An error occurred while reading from the store provider's data reader. See the inner exception for details."
A string like "The data reader returned by the store data provider does not have enough columns for the query requested."
A string like "One of the parameters in the EntityParameterCollection is null or empty. A name must begin with a letter and contain only letters, numbers, and underscores. "
A string like "The correct DbType cannot be inferred based on the value that has been set for the EntityParameter.DbType property."
A string like "The connection is already in a transaction and cannot participate in another transaction. EntityClient does not support parallel transactions."
A string like "The transaction is either not associated with the current connection or has been completed."
A string like "The update operation cannot be performed, because the adapter's connection is not associated with a valid store connection."
A string like "The command could not be executed, because the connection metadata is incompatible with the command metadata."
A string like "The underlying provider failed."
A string like "EntityCommand.CommandText was not specified for the StoredProcedure EntityCommand."
A string like "The value of EntityCommand.CommandText is not valid for a StoredProcedure command. The EntityCommand.CommandText value must be of the form 'ContainerName.FunctionImportName'."
A string like "EntityClient cannot be used to create a command definition from a store command tree."
A string like "This EntityCommand is based on a prepared command definition and cannot be re-prepared. To create an equivalent command with different parameters, create a new command definition and call its CreateCommand method."
A string like "CommandText property value cannot be retrieved because the CommandTree property is not null."
A string like "Cannot set the CommandText property value because the CommandTree property is not null."
A string like "CommandTree property value cannot be retrieved because the CommandText property is not null."
A string like "Cannot set the CommandTree property value because the CommandText property is not null."
A string like "LINQ to Entities query expressions can only be constructed from instances that implement the IQueryable interface."
A string like "Only parameterless constructors and initializers are supported in LINQ to Entities."
A string like "Only list initializer items with a single element are supported in LINQ to Entities."
A string like "In constructors and initializers, only property or field parameter bindings are supported in LINQ to Entities."
A string like "The ThenBy method must follow either the OrderBy method or another call to the ThenBy method."
A string like "This method is not supported against a materialized query result."
A string like "The specified LINQ expression contains references to queries that are associated with different contexts."
A string like "Casting to Decimal is not supported in LINQ to Entities queries, because the required precision and scale information cannot be inferred."
A string like "Calling the CreateOrderedEnumerable generic method on the result of a LINQ to Entities query is not supported."
A string like "The method 'Skip' is only supported for sorted input in LINQ to Entities. The method 'OrderBy' must be called before the method 'Skip'."
A string like "Property indexers are not supported in LINQ to Entities."
A string like "Anonymous type"
A string like "Closure type"
A string like "The method 'First' can only be used as a final query operation. Consider using the method 'FirstOrDefault' in this instance instead."
A string like "The methods 'Single' and 'SingleOrDefault' can only be used as a final query operation. Consider using the method 'FirstOrDefault' in this instance instead."
A string like "The method 'Include' is only supported by LINQ to Entities when the argument is a string constant."
A string like "The method 'MergeAs' is only supported by LINQ to Entities when the argument is a MergeOption constant."
A string like "This method supports the LINQ to Entities infrastructure and is not intended to be used directly from your code."
A string like "A cycle was detected in a LINQ expression."
A string like "This function can only be invoked from LINQ to Entities."
A string like "Unable to determine a valid ordering for dependent operations. Dependencies may exist due to foreign key constraints, model requirements, or store-generated values."
A string like "An error occurred while updating the entries. See the inner exception for details."
A string like "A value shared across entities or associations is generated in more than one location. Check that mapping does not split an EntityKey to multiple store-generated columns."
A string like "The entity client's MetadataWorkspace differs from the workspace referenced by the state manager."
A string like "Referential integrity constraint violation. A Dependent Role has multiple principals with different values."
A string like "Error retrieving values from ObjectStateEntry. See inner exception for details."
A string like "Circular relationships with referential integrity constraints detected."
A string like "Invalid data encountered. A required relationship is missing. Examine StateEntries to determine the source of the constraint violation."
A string like "Conflicting changes detected. This may happen when trying to insert multiple entities with the same key."
A string like "Set"
A string like "NULL"
A string like ", "
A string like "entities"
A string like "rows"
A string like "NOT_NULL"
A string like "ERROR"
A string like "Entity"
A string like "An entity is mapped to different rows within the same table. Ensure these two mapping fragments do not map two groups of entities with identical keys to two distinct groups of rows."
A string like "Two entities with identical keys are mapped to different rows within the same table. Ensure these two mapping fragments do not map two groups of entities with overlapping keys to two distinct groups of rows."
A string like "An entity is mapped to different rows within the same table. Ensure these two mapping fragments do not map two groups of entities with overlapping keys to two distinct groups of rows."
A string like "Two entities with possibly identical keys are mapped to different rows within the same table. Ensure these two mapping fragments do not map two unrelated EntitySets to two distinct groups of rows."
A string like "Two entities with different keys are mapped to the same row. Ensure these two mapping fragments do not map two groups of entities with different keys to the same group of rows."
A string like "Two entities with different keys are mapped to the same row. Ensure these two mapping fragments do not map two EntitySets with overlapping keys to the same group of rows."
A string like "Two entities with different keys are mapped to the same row. Ensure these two mapping fragments do not map two groups of entities with overlapping keys to the same group of rows."
A string like "Two entities with possibly different keys are mapped to the same row. Ensure these two mapping fragments do not map two unrelated EntitySets to the same group of rows."
A string like "Two entities with possibly different keys are mapped to the same row. Ensure these two mapping fragments map both ends of the AssociationSet to the corresponding columns."
A string like "Two entities with different keys are mapped to the same row. Ensure these two mapping fragments do not map two groups of entities with different keys to two overlapping groups of rows."
A string like "Two rows with different primary keys are mapped to the same entity. Ensure these two mapping fragments do not map two groups of entities with identical keys to two overlapping groups of rows."
A string like "Two rows with different primary keys are mapped to two entities that carry identical keys through a referential integrity constraint. Ensure these two mapping fragments do not map two EntitySets with identical keys to two overlapping groups of rows."
A string like "An entity from one EntitySet is mapped to a row that is also mapped to an entity from another EntitySet with possibly different key. Ensure these two mapping fragments do not map two unrelated EntitySets to two overlapping groups of rows."
A string like "Mapping fragments cannot be joined. Ensure every mapping fragment maps a key on which it should be joined with one of the other mapping fragments."
A string like "Item has an empty identity."
A string like "CollectionType has a null type usage."
A string like "The facet object has null for the FacetType. Null is not valid for this property."
A string like "The member has null for the DeclaringType. Null is not valid for this property."
A string like "The member has null for the MemberTypeUsage. Null is not valid for this property."
A string like "The item property has null for TypeUsage. Null is not valid for this property."
A string like "The RefType has null for EntityType. Null is not valid for this property."
A string like "The type usage object has null for EdmType. Null is not valid for this property."
A string like "A member of the same name is already defined in a BaseType."
A string like "CollectionType objects cannot have a base type."
A string like "Reference types cannot have a base type."
A string like "The type does not have a name."
A string like "The type does not have a namespace."
A string like "The facet does not have a name."
A string like "The member does not have a name."
A string like "The metadata property does not have a name."
A string like "The underlying type of CLR enumeration type does not match the underlying type of EDM enumeration type."
A string like "The following information may be useful in resolving the previous error:"
A string like "Inconsistent metadata error"
A string like "The operation cannot be performed because the collection is read only."
A string like "The operation cannot be performed because the item is read only."
A string like "The EntitySet already has an EntityContainer, it cannot be added to this collection."
A string like "At least one of the input paths is not valid because either it is too long or it has incorrect format."
A string like "Unable to determine application context. The ASP.NET application path could not be resolved."
A string like "The wildcard assembly enumerator function returned null."
A string like "Unable to load the specified metadata resource."
A string like "At least one SSDL artifact is required for creating StoreItemCollection."
A string like "The specified metadata path is not valid. A valid path must be either an existing directory, an existing file with extension '.csdl', '.ssdl', or '.msl', or a URI that identifies an embedded resource."
A string like "Entity connections are not supported; only storage connections are supported."
A string like "The PrimitiveType is not a string type."
A string like "The PrimitiveType is not a binary type."
A string like "The PrimitiveType is not a DateTime type."
A string like "The given primitive type is not a DateTimeOffset type."
A string like "The given primitive type is not a Time type."
A string like "The PrimitiveType is not a Decimal type."
A string like "Destination array was not long enough. Check arrayIndex and length, and the array's lower bounds."
A string like "The storage provider manifest could not be obtained."
A string like "Could not retrieve the provider manifest."
A string like "MaxLength must be greater than zero."
A string like "The argument to the function must be a conceptual schema type."
A string like "The argument to the function must be an CLR type."
A string like ""Mapping not valid error""
A string like "Content in MSL is not valid."
A string like "AssociationType Name should be specified when providing a function mapping or End property mapping."
A string like "A table mapping element is expected but not present."
A string like "Expecting only EntitySetMapping, AssociationSetMapping, or FunctionImportMapping elements."
A string like "Both conceptual model and column members cannot be specified for condition mapping."
A string like "Either conceptual model or Column Members must be specified for condition mapping."
A string like "Both Value and IsNull attributes cannot be specified for condition mapping."
A string like "Either Value or IsNullAttribute has to be specified for condition mapping."
A string like "Conditions are not supported on complex-valued members."
A string like "Only EntityTypeMapping and QueryView elements are allowed when the EntityType name is not specified on the EntitySetMapping."
A string like "The value specified for the condition is not compatible with the type of the member."
A string like "The first QueryView must not be type-specific. Try removing the TypeName property."
A string like "The specified DbMappingViewCacheFactory has failed to create a DbMappingViewCache instance."
A string like "MappingViewCacheFactory is already set and cannot be modified."
A string like "Unclosed parenthesis in IsOfType declaration."
A string like "An EntityType Mapping containing a function mapping cannot specify the TableName property."
A string like "An EntityType Mapping function binding cannot map multiple types. Function mappings may be specified only for EntityType mappings for single types -- do not use the 'IsTypeOf' modifier or specify multiple types."
A string like "Cannot determine the version for the current parameter binding."
A string like "This function mapping can only contain bindings to 'original' property versions."
A string like "This function mapping can only contain bindings to 'current' property versions."
A string like "MakeColumnsDistinct flag can only be placed within a container that does not generate update views. Mark GenerateUpdateViews attribute to 'false' within EntityContainerMapping."
A string like "The version of EdmItemCollection must match the version of StoreItemCollection."
A string like "The version of the loaded mapping files must be the same as the version of loaded EdmItemCollection and StoreItemCollection."
A string like "An entity object cannot be referenced by multiple instances of IEntityChangeTracker."
A string like "This complex object is already attached to another object."
A string like "This ObjectStateEntry does not have original values. Objects in an added or detached state cannot have original values. "
A string like "This ObjectStateEntry does not have current values. Objects in a deleted or detached state cannot have current values."
A string like "The object is in a detached state. This operation cannot be performed on an ObjectStateEntry when the object is detached."
A string like "The ObjectStateEntry is a relationship entry. The current and original values of relationship entries cannot be modified."
A string like "The ObjectStateEntry is a relationship entry. The state of relationship entries cannot be modified."
A string like "The object is in a detached or deleted state. An ObjectStateEntry in this state cannot be modified."
A string like "The EntityKey property can only be set when the current value of the property is null."
A string like "The ObjectStateEntry is a key entry and its current and original values are not accessible."
A string like "The ObjectStateEntry is a key entry and its state cannot be modified."
A string like "The ObjectStateEntry is a key entry. Delete cannot be called on key entries."
A string like "EntityMemberChanged or EntityComplexMemberChanged was called without first calling EntityMemberChanging or EntityComplexMemberChanging on the same change tracker with the same property name. For information about properly reporting changes, see the Entity Framework documentation. "
A string like "A RelationshipManager object cannot be returned for this ObjectStateEntry instance. Only an ObjectStateEntry that represents an entity has an associated RelationshipManager."
A string like "The value for the complex property could not be set. Complex properties must be set to an object that implements IExtendedDataRecord."
A string like "The supplied EntityKey does not have a corresponding entry in the ObjectStateManager."
A string like "An object with a key that matches the key of the supplied object could not be found in the ObjectStateManager. Verify that the key values of the supplied object match the key values of the object to which changes must be applied."
A string like "Objects in a detached state do not exist in the ObjectStateManager."
A string like "An object with the same key already exists in the ObjectStateManager. The ObjectStateManager cannot track multiple objects with the same key."
A string like "AcceptChanges cannot continue because the object's key values conflict with another object in the ObjectStateManager. Make sure that the key values are unique before calling AcceptChanges."
A string like "The value of a property that is part of an object's key does not match the corresponding property value stored in the ObjectContext. This can occur if properties that are part of the key return inconsistent or incorrect values or if DetectChanges is not called after changes are made to a property that is part of the key."
A string like "The object cannot be attached because the value of a property that is a part of the EntityKey does not match the corresponding value in the EntityKey."
A string like "The object's EntityKey value is not valid."
A string like "AcceptChanges cannot continue because the object's EntityKey value is null or is not a temporary key. This can happen when the EntityKey property is modified while the object is in an added state."
A string like "The object cannot be added to the object context. The object's EntityKey has an ObjectStateEntry that indicates that the object is already participating in a different relationship."
A string like "A RelationshipManager cannot be returned for this object. A RelationshipManager can only be returned for objects that are either tracked by the ObjectStateManager or that implement IEntityWithRelationships."
A string like "Cannot change relationship's state to the state other than deleted or detached if the source or target entity is in the deleted state."
A string like "Cannot change relationship's state to the state other than added or detached if the source or target entity is in the added state."
A string like "Cannot change state of a relationship if one of the ends of the relationship is a KeyEntry."
A string like "The ChangeRelationshipState method is not supported for relationships that are defined by using foreign-key values."
A string like "The object state cannot be changed. This exception may result from one or more of the primary key properties being set to null. Non-Added objects cannot have null primary key values. See inner exception for details."
A string like "The refresh attempt has failed because an unexpected entity was returned by the data source."
A string like "The supplied connection string is not valid, because it contains insufficient mapping or metadata information."
A string like "The supplied connection is not valid because it contains insufficient mapping or metadata information."
A string like "An object with the specified EntityKey value could not be found."
A string like "The object cannot be deleted because it was not found in the ObjectStateManager."
A string like "The object cannot be detached because it is not attached to the ObjectStateManager."
A string like "The specified CommandTimeout value is not valid. It must be a positive number."
A string like "The object cannot be attached because it is already in the object context. An object can only be reattached when it is in an unchanged state. "
A string like "An object with a null EntityKey value cannot be attached to an object context."
A string like "An object with a temporary EntityKey value cannot be attached to an object context."
A string like "The EntitySet name could not be determined. To attach an object, supply a valid EntitySet name and make sure that the object has a valid EntityKey."
A string like "The EntityContainer name could not be determined. The provided EntitySet name must be qualified by the EntityContainer name, such as 'EntityContainerName.EntitySetName', or the DefaultContainerName property must be set for the ObjectContext."
A string like "The DefaultContainerName property has already been set for this ObjectContext. This property cannot be changed after it has been set. "
A string like "The provided EntitySet name must be qualified by the EntityContainer name, such as 'EntityContainerName.EntitySetName', or the DefaultContainerName property must be set for the ObjectContext."
A string like "The operation failed: The relationship could not be changed because one or more of the foreign-key properties is non-nullable. When a change is made to a relationship, the related foreign-key property is set to a null value. If the foreign-key does not support null values, a new relationship must be defined, the foreign-key property must be assigned another non-null value, or the unrelated object must be deleted."
A string like "The ObjectContext instance has been disposed and can no longer be used for operations that require a connection."
A string like "The selector expression for LoadProperty must be a MemberAccess for the property."
A string like "The EntityState value passed for the entity is not valid. The EntityState value must be one of the following: Added, Deleted, Detached, Modified, or Unchanged."
A string like "The EntityState value passed for the relationship is not valid. The EntityState value must be one of the following: Added, Deleted, Detached, or Unchanged. Relationships cannot be set to the Modified state."
A string like "An object that has a key that matches the key of the supplied object could not be found in the ObjectStateManager. Verify that the object to which changes must be applied is not in the Added state and that its key values match the key values of the supplied object."
A string like "When executing a command, parameters must be exclusively database parameters or values."
A string like "Attach is not a valid operation when the source object associated with this related end is in an added, deleted, or detached state. Objects loaded using the NoTracking merge option are always detached."
A string like "The object being attached to the source object is not attached to the same ObjectContext as the source object."
A string like "The object being attached is in an added or deleted state. Relationships cannot be created for objects in this state."
A string like "The object could not be added to the EntityCollection or EntityReference. An object that is attached to an ObjectContext cannot be added to an EntityCollection or EntityReference that is not associated with a source object. "
A string like " The object could not be removed from the EntityCollection or EntityReference. An object that is attached to an ObjectContext cannot be removed from an EntityCollection or EntityReference that is not associated with a source object."
A string like "Adding a relationship with an entity which is in the Deleted state is not allowed."
A string like "This property cannot be set to a null value."
A string like "The result of a query cannot be enumerated more than once."
A string like "Only primitive types, entity types, and complex types can be materialized."
A string like "The source query for this EntityCollection or EntityReference cannot be returned when the related object is in either an added state or a detached state and was not originally retrieved using the NoTracking merge option."
A string like "A navigation property that returns an EntityCollection cannot be changed if the existing EntityCollection contains items that are not in the new EntityCollection."
A string like "A relationship multiplicity constraint violation occurred: An EntityReference expected at least one related object, but the query returned no related objects from the data store."
A string like "A relationship multiplicity constraint violation occurred: An EntityReference can have no more than one related object, but the query returned more than one related object. This is a non-recoverable error."
A string like "A referential integrity constraint violation occurred: A primary key property that is a part of referential integrity constraint cannot be changed when the dependent object is Unchanged unless it is being set to the association's principal object. The principal object must be tracked and not marked for deletion."
A string like "The EntityKey property cannot be set to EntityNotValidKey, NoEntitySetKey, or a temporary key."
A string like "The object could not be added or attached because its EntityReference has an EntityKey property value that does not match the EntityKey for this object."
A string like "At least one related end in the relationship could not be found."
A string like "When an object is returned with a NoTracking merge option, Load can only be called when the EntityCollection or EntityReference does not contain objects."
A string like "When an object is returned with a NoTracking merge option, Load cannot be called when the IsLoaded property is true."
A string like "The relationship between the two objects cannot be defined because they are attached to different ObjectContext objects."
A string like "Requested operation is not allowed when the owner of this RelatedEnd is null. RelatedEnd objects that were created with the default constructor should only be used as a container during serialization."
A string like "A referential integrity constraints violation occurred: Not all of the property values that define referential integrity constraints could be retrieved from related entities."
A string like "A referential integrity constraint violation occurred: The property values that define the referential constraints are not consistent between principal and dependent objects in the relationship."
A string like "A circular relationship path has been detected while enforcing a referential integrity constraints. Referential integrity cannot be enforced on circular relationships."
A string like "The requested operation could not be completed because the object implementing IEntityWithRelationships returned a null value from the RelationshipManager property."
A string like "The relationship manager supplied by the object implementing IEntityWithRelationships is not the expected relationship manager."
A string like "The operation could not be completed because the object to which the relationship manager belongs was attached to the ObjectContext before the relationship manager was instantiated."
A string like "InitializeRelatedReference should only be used to initialize a new EntityReference during deserialization of an entity object."
A string like "The InitializeRelatedCollection method should only be called to initialize a new EntityCollection during deserialization of an object graph."
A string like "The RelatedEnd cannot be returned by this RelationshipManager. A RelatedEnd can only be returned by a RelationshipManager for objects that are either tracked by the ObjectStateManager or that implement IEntityWithRelationships."
A string like "The object or data row on the data binding interface cannot be replaced."
A string like "The index-based insert operation is not supported on this data binding interface."
A string like "Updates cannot be performed on a read-only data binding interface."
A string like "The IBindingList.AddNew method is not supported when binding to a collection of abstract types. You must instead use the IList.Add method."
A string like "The object being added is of a type that is not compatible with the type of the bound collection."
A string like "Properties are not supported on value types."
A string like "The property uses an unsupported type."
A string like "Indexed properties are not supported."
A string like "Static properties are not supported."
A string like "The property getter does not exist."
A string like "The property setter does not exist."
A string like "General query error"
A string like "aliased expression"
A string like "aliased namespace import"
A string like "logical AND expression"
A string like "ANYELEMENT expression"
A string like "APPLY clause"
A string like "BETWEEN expression"
A string like "CASE expression"
A string like "CASE/ELSE expression"
A string like "CASE/WHEN/THEN expression"
A string like "CAST expression"
A string like "collated ORDER BY clause item"
A string like "collection type definition"
A string like "command expression"
A string like "CREATEREF expression"
A string like "DEREF expression"
A string like "division operation"
A string like "ELEMENT expression"
A string like "equals expression"
A string like "escaped identifier"
A string like "EXCEPT expression"
A string like "EXISTS expression"
A string like "expression list"
A string like "FLATTEN expression"
A string like "FROM/APPLY clause"
A string like "FROM clause"
A string like "FROM clause item"
A string like "FROM clause list"
A string like "FROM/JOIN clause"
A string like "function definition"
A string like "greater than expression"
A string like "greater than or equals expression"
A string like "GROUP BY clause"
A string like "GROUPPARTITION expression"
A string like "HAVING predicate"
A string like "identifier"
A string like "IN set expression"
A string like "INTERSECT expression"
A string like "IS NOT NULL expression"
A string like "IS NOT OF expression"
A string like "IS NULL expression"
A string like "IS OF expression"
A string like "JOIN clause"
A string like "JOIN/ON clause"
A string like "KEY expression"
A string like "less than expression"
A string like "less than or equals expression"
A string like "LIKE expression"
A string like "ORDER BY/LIMIT sub-clause"
A string like "constant literal"
A string like "member access expression"
A string like "function, method or type constructor"
A string like "subtraction operation"
A string like "modulus operation"
A string like "multiplication operation"
A string like "MULTISET constructor"
A string like "namespace import"
A string like "namespace import list"
A string like "NAVIGATE expression"
A string like "logical NOT expression"
A string like "NOT BETWEEN expression"
A string like "not equals expression"
A string like "NOT IN set expression"
A string like "NOT LIKE expression"
A string like "NULL literal"
A string like "OFTYPE expression"
A string like "OFTYPE ONLY expression"
A string like "logical OR expression"
A string like "ORDER BY clause"
A string like "ORDER BY clause item"
A string like "OVERLAPS expression"
A string like "parenthesized expression"
A string like "addition operation"
A string like "type name with type specification arguments"
A string like "query expression"
A string like "query statement"
A string like "REF expression"
A string like "reference type definition"
A string like "RELATIONSHIP expression"
A string like "RELATIONSHIP expression list"
A string like "ROW constructor"
A string like "row type definition"
A string like "SELECT clause"
A string like "SELECT VALUE clause"
A string like "SET expression"
A string like "simple identifier"
A string like "ORDER BY/SKIP sub-clause"
A string like "TOP sub-clause"
A string like "TREAT expression"
A string like "type name"
A string like "unary minus operation"
A string like "unary plus operation"
A string like "UNION expression"
A string like "UNION ALL expression"
A string like "WHERE predicate"
A string like "The query syntax is not valid."
A string like "in the current FROM clause"
A string like "in GROUP BY clause"
A string like "as a column name in ROW constructor"
A string like "in the SELECT projection list"
A string like "Escaped identifiers cannot be empty."
A string like "The query text consists only of comments and/or white space."
A string like "The operator symbol is not valid."
A string like "The punctuation symbol is not valid."
A string like "collection"
A string like "column"
A string like "complex"
A string like "entity"
A string like "entity container"
A string like "function"
A string like "query inline function"
A string like "keyword"
A string like "left"
A string like "line"
A string like "namespace, type or function"
A string like "namespace"
A string like "Near"
A string like "primitive"
A string like "reference"
A string like "right"
A string like "row"
A string like "term"
A string like "type"
A string like "enum member"
A string like "value expression"
A string like "The function call cannot be resolved, because one or more passed arguments match more than one function overload."
A string like "The upper and lower limits of the BETWEEN expression cannot be un-typed nulls."
A string like "Cannot create an empty multiset."
A string like "A multiset of un-typed NULLs is not valid."
A string like "There is no underlying support for the '+' operation on strings in the current provider."
A string like "The ELEMENT operator is not supported in this version of Entity Framework. It is reserved for future use."
A string like "The specified expression cannot be NULL."
A string like "The specified expression must be of CollectionType."
A string like "The specified expression must be of numeric type."
A string like "The specified expression must be of Boolean type."
A string like "The specified expression type must be equal-comparable."
A string like "The specified expression cannot be of CollectionType."
A string like "The expression in the CREATEREF operator is not a valid EntitySet."
A string like "The GROUP BY clause key expression type must be equal-comparable."
A string like "The GROUPPARTITION operator is allowed only in the context of a query expression."
A string like "The HAVING clause must be preceded by a GROUP BY clause."
A string like "The CREATEREF key expression type is not compatible with the EntityKey element type."
A string like "The CREATEREF key expression is not compatible with the EntityKey structure."
A string like "The INNER JOIN expression must have an ON predicate."
A string like "The THEN/ELSE expression types are not compatible."
A string like "The CASE/WHEN/THEN expression is not valid, because all resulting expressions are un-typed."
A string like "The CAST argument expression must be of a scalar type."
A string like "The CAST type argument must be of a scalar type."
A string like "The CREATEREF key expression must be of row type."
A string like "The DISTINCT/ALL argument is not valid in type constructors."
A string like "The DISTINCT/ALL argument is only valid for group aggregate functions."
A string like "The FLATTEN argument must be a collection of collections."
A string like "Left correlation is not allowed in the JOIN clause."
A string like "A namespace, type, or function name must be a single name or any number of names separated by dots."
A string like "The WITH RELATIONSHIP clause is only supported when defining read-only view queries."
A string like "The namespace alias is not valid."
A string like "Un-typed NULL arguments are not valid in arithmetic expressions."
A string like "Un-typed NULL arguments are not valid in comparison expressions."
A string like "The ON predicate is not allowed in the CROSS JOIN clause."
A string like "The SELECT VALUE expression cannot be aliased in this context. SELECT VALUE expression can be aliased only when ORDER BY is specified."
A string like "SELECT VALUE can have only one expression in the projection list."
A string like "The WITH RELATIONSHIP clause is only supported for entity type constructors."
A string like "The IS [NOT] NULL expression must be of entity, reference, enumeration or primitive type."
A string like "The left argument of the set expression must be of CollectionType."
A string like "LIKE arguments must be of string type."
A string like "The specified literal has a malformed single quote payload."
A string like "The specified literal has a malformed string literal payload."
A string like "Method invocation is not supported."
A string like "Multiset element types are incompatible."
A string like "A NULL literal cannot be promoted to a CollectionType."
A string like "The ORDER BY sort key(s) type must be order-comparable."
A string like "The left expression must be of numeric or string type."
A string like "The right expression must be of numeric or string type."
A string like "The related end expression must be of reference type."
A string like "The 'from' end of the relationship is ambiguous in this context."
A string like "The 'to' end of the relationship is ambiguous in this context."
A string like "The resulting expression of the query cannot be un-typed NULL."
A string like "The right argument of the set expression must be of CollectionType."
A string like "The ROW constructor cannot have un-typed NULL columns."
A string like "The projection expression type must be equal-comparable when used with DISTINCT."
A string like "The TOP and LIMIT sub-clauses cannot be used together in the same query expression."
A string like "The TOP and SKIP sub-clauses cannot be used together in the same query expression. Use LIMIT instead of TOP."
A string like "The type specification argument must be a constant literal."
A string like "The type argument is not a valid constant literal, or is outside of the expected range."
A string like "The expression type must be EntityType, ComplexType, or ReferenceType"
A string like "INTERNAL ERROR: The group variable must be present in one of the existing scopes."
A string like "INTERNAL ERROR: The argument type for the aggregate function is not valid."
A string like "INTERNAL ERROR: The save point is not valid."
A string like "INTERNAL ERROR: The scope index is not valid."
A string like "INTERNAL ERROR: The parser found an error and cannot continue."
A string like "INTERNAL ERROR: The input stream is not valid."
A string like "INTERNAL ERROR: There was a stack overflow in the query parser."
A string like "INTERNAL ERROR: The abstract syntax tree expression is not a valid command expression type."
A string like "INTERNAL ERROR: The abstract syntax tree expression has an unknown type."
A string like "INTERNAL ERROR: The specified built-in abstract syntax tree expression type is unknown. "
A string like "The specified metadata cannot be used because it is not read-only."
A string like "The current provider does not support any type that is compatible with Edm.Boolean."
A string like "The current provider does not support any type that is compatible with Edm.Int32."
A string like "The current provider does not support any type that is compatible with Edm.String."
A string like "The specified member is not associated with the same MetadataWorkspace or data space as the command tree."
A string like "The specified EntitySet is not valid because its EntityContainer property has a value of null."
A string like "The specified EntitySet is not associated with the same MetadataWorkspace or data model as the command tree."
A string like "The specified EntityType is not valid because its KeyMembers property has a value of null."
A string like "The specified EntityType is not valid because its KeyMembers collection is empty."
A string like "The specified function is not valid because its ReturnParameter property has a value of null."
A string like "The specified function is not associated with the same MetadataWorkspace or data space as the command tree."
A string like "The specified function parameter is not associated with the same MetadataWorkspace or data model as the command tree."
A string like "The specified type is not associated with the same MetadataWorkspace or data model as the command tree."
A string like "The specified command tree is not valid."
A string like "An empty list is not a valid value for this argument."
A string like "The expression list has an incorrect number of elements."
A string like "The DataSpace is not valid."
A string like "The specified element expressions cannot be contained by the same collection because no common element type can be inferred from their ResultTypes."
A string like "The specified relationship type does not define an end with the specified name"
A string like "The specified relationship ends are not defined by the same relationship type."
A string like "The specified aggregate function is not valid."
A string like "DbExpressionBinding requires an input expression with a collection ResultType."
A string like "DbGroupExpressionBinding requires an input expression with a collection ResultType."
A string like "DbAndExpression requires arguments with a common Boolean type."
A string like "DbApplyExpression input and apply arguments cannot have the same variable name."
A string like "DbArithmeticExpression arguments must have a numeric common type."
A string like "DbCaseExpression requires an equal number of 'When' and 'Then' expressions."
A string like "A valid ResultType could not be inferred from the ResultTypes of the specified 'Then' expressions."
A string like "DbComparisonExpression requires arguments with comparable types."
A string like "The specified value is not an instance of a valid constant type."
A string like "The 'Distinct' operation cannot be applied to the collection ResultType of the specified argument."
A string like "DbDerefExpression requires an argument of a reference type."
A string like "When unwrapSingleProperty is specified the argument expression must have the following ResultType: a CollectionType with a structured element type that declares exactly one property. "
A string like "Function metadata used in DbFunctionExpression cannot have a void return type."
A string like "Function metadata used in DbFunctionExpression must allow composition. Non-composable functions or functions that include command text are not allowed in expressions. Such functions can only be executed independently."
A string like "Function metadata used in DbFunctionExpression cannot include command text."
A string like "DbEntityRefExpression requires an argument of an EntityType."
A string like "DbRefKeyExpression requires an argument of a reference type."
A string like "At least one group key or aggregate is required."
A string like "At most one DbGroupAggregate can be specified in the list of aggregates of a DbGroupByExpression."
A string like "DbCrossJoinExpression requires at least two inputs."
A string like "The argument to DbIsNullExpression cannot have a CollectionType of a ResultType."
A string like "The argument to DbIsNullExpression must refer to a primitive, enumeration or reference type."
A string like "The left and right arguments of a DbJoinExpression cannot have the same variable name."
A string like "Limit must be a DbConstantExpression or a DbParameterReferenceExpression."
A string like "Limit must have an integer ResultType."
A string like "Limit must have a non-negative value."
A string like "A CollectionType is required."
A string like "A collection, entity or row type is required."
A string like "The specified related entity is not compatible with this new instance constructor. The constructed instance is not an instance of the EntityType required by the source end of the related entity."
A string like "DbNotExpression requires an argument with a Boolean type."
A string like "DbOrExpression requires arguments with a common Boolean type."
A string like "DbInExpression requires the same result type for the input expressions."
A string like "An Instance property of type DbExpression is required for an instance property."
A string like "DbRefExpression requires an EntityType from the same hierarchy as the EntityType of the referenced EntitySet."
A string like "The specified target relationship End is not declared by the same relationship type as the specified source relationship End."
A string like "A target relationship End with multiplicity of 'One' or 'ZeroOrOne' is required for this argument."
A string like "The specified target relationship End is the same as the source relationship End."
A string like "The target entity reference expression must have a reference ResultType."
A string like "The specified target entity reference expression is not valid because it does not produce a reference to an entity of the same type or of a subtype of the EntityType referred to by the specified target End."
A string like "Navigating composition relationships is not supported."
A string like "Count must be a DbConstantExpression or a DbParameterReferenceExpression."
A string like "Count must have an integer ResultType."
A string like "Count must have a non-negative value."
A string like "A collation specifier is only valid for a sort key with a string ResultType."
A string like "DbSortClause expressions must have a type that is order comparable."
A string like "AggregateOp encountered outside of GroupBy method."
A string like "Unexpected VarDefListOp"
A string like "Unexpected VarDefOp"
A string like "The CommandBehavior.SequentialAccess property must be specified for this command object."
A string like "The ADO.NET Data Provider you are using does not support canonical command trees."
A string like "The attempted operation is not valid. The data reader is closed."
A string like "The attempted operation is not valid. The nested data reader has been implicitly closed because its parent data reader has been read or closed."
A string like "There was an attempt to read, but no data was present."
A string like "The GetSchemaTable method is not supported."
A string like "The data reader has more than one field. Multiple fields are not valid for EDM primitive or enumeration types."
A string like "The data reader is incompatible with the specified function mapping, and the type of a row could not be determined for the type mapping."
A string like "The nested query does not have the appropriate keys."
A string like "Data"
A string like "Input, output, or bidirectional parameter."
A string like "Update"
A string like "When used by a DataAdapter.Update, the source column name that is used to find the DataSetColumn name in the ColumnMappings. This is to copy a value between the parameter and a data row."
A string like "When used by a DataAdapter.Update (UpdateCommand only), the version of the DataRow value that is used to update the data source."
A string like "The Mode of all parameters in the ReturnParameter collection must be set to ParameterMode.ReturnValue."
A string like "Parameters in the Parameters collection must not have mode set to ParameterMode.ReturnValue."
A string like "The EntitySets parameter must not be null for functions that return multiple result sets."
A string like "The number of entity sets should match the number of return parameters."
A string like "The EntityParameter is already contained by another EntityParameterCollection."
A string like "Attempted to remove an EntityParameter that is not contained by this EntityParameterCollection."
A string like "Expansion of |DataDirectory| failed while processing the connection string. Ensure that |DataDirectory| is set to a valid fully-qualified path."
A string like "The DataDirectory substitute is not a string."
A string like "Invalid usage of escape delimiters '[' or ']'."
A string like "The source XmlReader does not contain a schema definition or started at the end of the file."
A string like "The name is missing or not valid."
A string like "Schema must specify a value for the Namespace attribute."
A string like "Default values are allowed only for non-spatial primitive types."
A string like "error"
A string like "warning"
A string like "unknown"
A string like "NavigationProperty is not valid. The FromRole and ToRole are the same."
A string like "Documentation content is not valid. The Documentation element can only contain Summary and LongDescription elements."
A string like "All elements in a schema must be contained in the Schema element."
A string like "All properties of the row type returned by a store-defined function must be scalar."
A string like "OnDelete, OnLock, and other such elements can be specified on only one End of an Association."
A string like "Number of Properties in the Dependent and Principal Role in a relationship constraint must be exactly identical."
A string like "Functions and function imports that can be composed must declare a return type."
A string like "Mapping function imports returning entities is not supported."
A string like "Structural type mappings must not be null or empty for function imports returning non-scalar values."
A string like "Invalid return type for composable function."
A string like "Functions that cannot be composed must not declare a return type."
A string like "Functions declaring command text cannot be composed."
A string like "Functions declaring command text cannot also declare a store function name."
A string like "Functions that cannot be composed may not set the aggregate or built-in function attributes."
A string like "The DefiningQuery element is empty. Add the query text to the DefiningQuery element."
A string like "The CommandText element is empty. Add the command text to the CommandText element."
A string like "The Provider Manifest is incorrect."
A string like "Facet declaration requires type attribute declaration."
A string like "Type declaration missing for element."
A string like "RowType element must have at least one property element."
A string like "Type must be declared through attribute or sub-element, but not both."
A string like "All artifacts loaded into an ItemCollection must have the same version. Multiple versions were encountered."
A string like "The specified type cannot be used as the underlying type of an enumeration type."
A string like "Enumeration members have to have unique names."
A string like "The value of the calculated enumeration type member is not valid according to its data type 'http://www.w3.org/2001/XMLSchema:long'."
A string like "Currently, spatial types are only supported when used in CSDL files that have the UseStrongSpatialTypes annotation with a false value on their root Schema element."
A string like "The specified ObjectQuery is not valid for this operation because it is associated with a different ObjectContext."
A string like "Query builder methods are not supported for LINQ to Entities queries. For more information, see the Entity Framework documentation."
A string like "A connection must be specified before the query can be executed."
A string like "The result type of the query could not be determined because the required metadata is missing."
A string like "Parameters cannot be added or removed from the parameter collection, and the parameter collection cannot be cleared after a query has been evaluated or its trace string has been retrieved. "
A string like "The provider returned null from CreateCommandDefinition."
A string like "The provider did not return a ProviderManifest instance."
A string like "The provider did not return a ProviderManifestToken string."
A string like "The provider did not return a 'DbSpatialServices' instance. In order to use the 'DbGeography' or 'DbGeometry' spatial types the EF provider being used must support spatial types and all prerequisites for the provider must be installed. See http://go.microsoft.com/fwlink/?LinkId=287183 for details."
A string like "No usable spatial provider could be found. In order to use the 'DbGeography' or 'DbGeometry' spatial types the EF provider being used must support spatial types and all prerequisites for the provider must be installed. See http://go.microsoft.com/fwlink/?LinkId=287183 for details."
A string like "This provider does not support the specified command tree. EntityClient should be used to create a command definition from this command tree."
A string like "Because the underlying provider had overridden DbProviderManifest.SupportsEscapingLikeArgument to return true, the DbProviderManifest.EscapeLikeArgument method must also be implemented by the provider."
A string like "The underlying provider returned null when trying to escape the specified string."
A string like "The provider did not create a CommandDefinition."
A string like "CreateDatabaseScript is not supported by the provider."
A string like "CreateDatabase is not supported by the provider."
A string like "DatabaseExists is not supported by the provider."
A string like "DeleteDatabase is not supported by the provider."
A string like "The specified DbGeography value is not compatible with this spatial services implementation."
A string like "The specified DbGeometry value is not compatible with this spatial services implementation."
A string like "The specified provider value is not compatible with this spatial services implementation."
A string like "The WellKnownValue property is intended to support serialization and deserialization and should not be set directly."
A string like "The connection name in the connection string."
A string like "The underlying provider invariant name in the connection string."
A string like "The metadata locations in the connection string."
A string like "The inner connection string in the connection string."
A string like "Context"
A string like "Named ConnectionString"
A string like "Source"
A string like "The result type of the query is neither an EntityType nor a CollectionType with an entity element type. An Include path can only be specified for a query with one of these result types."
A string like "There was an error parsing the Include path. An empty navigation property was found."
A string like "The entity wrapper stored in the proxy does not reference the same proxy."
A string like "All 'EdmMember' instances must be a valid member of the EdmType."
A string like "The Entity Framework was already using a DbConfiguration instance before an attempt was made to add an 'Loaded' event handler. 'Loaded' event handlers can only be added as part of application start up before the Entity Framework is used. See http://go.microsoft.com/fwlink/?LinkId=260883 for more information."
A string like "Sequence contains more than one element"
A string like "The provider for the source IQueryable doesn't implement IDbAsyncQueryProvider. Only providers that implement IDbAsyncQueryProvider can be used for Entity Framework asynchronous operations. For more details see http://go.microsoft.com/fwlink/?LinkId=287068."
A string like "Sequence contains no elements"
A string like "Automatic migrations that affect the location of the migrations history system table (such as default schema changes) are not supported. Please use code-based migrations for operations that affect the location of the migrations history system table."
A string like "Sequence contains no matching element"
A string like "Sequence contains more than one matching element"
A string like "The connection could not be opened because it is broken. The connection must be closed before it can be opened."
A string like "The transaction passed in is not associated with the current connection. Only transactions associated with the current connection may be used."
A string like "The transaction passed in must have a non-null connection. A null connection indicates the transaction has already been completed."
A string like "The connection is already participating in a transaction. The first transaction should be committed or rolled back before attempting to engage the connection in another transaction."
A string like "The connection is already enlisted in a user transaction. The first transaction should be completed before attempting to engage the connection in another transaction."
A string like "A second operation started on this context before a previous asynchronous operation completed. Use 'await' to ensure that any asynchronous operations have completed before calling another method on this context. Any instance members are not guaranteed to be thread safe."
A string like "The entity type of one of the ends of the specified association type does not match the entity type of the corresponding entity set end."
A string like "DbInExpression handling is not implemented. The functionality involving DbInExpression, new in Entity Framework 6, is turned off by default for compatibility with existing provider implementations. It can be enabled by overriding DbProviderManifest.SupportsInExpression and returning true, in which case any command tree expression visitor implemented by the provider must handle the new expression type."
A string like "Invalid scalar property mapping. Both entity model property and store column must be scalar properties."
A string like "Errors Found During Generation:"
A string like "Scaffolding create or alter procedure operations is not supported in down methods."
A string like "The operation could not be suppressed because it has already been executed. 'SuppressExecution' can only be called from an interceptor that runs before the operation is executed."
A string like "Conversion between generic and non-generic DbSet objects is not supported for test doubles."
A string like "An existing EF5 migrations history table was detected but could not be upgraded because a custom history context factory has been configured. To upgrade an existing EF5 database, ensure there is no custom history context factory configured."
A string like "An error was reported while committing a database transaction but it could not be determined whether the transaction succeeded or failed on the database server. See the inner exception and http://go.microsoft.com/fwlink/?LinkId=313468 for more information."
Strongly-typed and parameterized exception factory.
Migrations.Infrastructure.AutomaticDataLossException with message like "Automatic migration was not applied because it would result in data loss."
Migrations.Infrastructure.MigrationsException with message like "Cannot scaffold the next migration because the target database was created with a version of Code First earlier than EF 4.3 and does not contain the migrations history table. To start using migrations against this database, ensure the current model is compatible with the target database and execute the migrations Update process. (In Visual Studio you can use the Update-Database command from Package Manager Console to execute the migrations Update process)."
Migrations.Infrastructure.MigrationsException with message like "The specified target migration '{0}' does not exist. Ensure that target migration refers to an existing migration id."
Migrations.Infrastructure.MigrationsException with message like "The Foreign Key on table '{0}' with columns '{1}' could not be created because the principal key columns could not be determined. Use the AddForeignKey fluent API to fully specify the Foreign Key."
Migrations.Infrastructure.MigrationsException with message like "'{0}' is not a valid target migration. When targeting a previously applied automatic migration, use the full migration id including timestamp."
Migrations.Infrastructure.MigrationsException with message like "'{0}' is not a valid migration. Explicit migrations must be used for both source and target when scripting the upgrade between them."
Migrations.Infrastructure.MigrationsException with message like "The target context '{0}' is not constructible. Add a default constructor or provide an implementation of IDbContextFactory."
Migrations.Infrastructure.MigrationsException with message like "The specified migration name '{0}' is ambiguous. Specify the full migration id including timestamp instead."
Migrations.Infrastructure.AutomaticMigrationsDisabledException with message like "Unable to update database to match the current model because there are pending changes and automatic migration is disabled. Either write the pending model changes to a code-based migration or enable automatic migration. Set DbMigrationsConfiguration.AutomaticMigrationsEnabled to true to enable automatic migration."
Migrations.Infrastructure.MigrationsException with message like "Scripting the downgrade between two specified migrations is not supported."
Migrations.Infrastructure.MigrationsException with message like "The migrations configuration type '{0}' was not be found in the assembly '{1}'."
Migrations.Infrastructure.MigrationsException with message like "More than one migrations configuration type '{0}' was found in the assembly '{1}'. Specify the fully qualified name of the one to use."
Migrations.Infrastructure.MigrationsException with message like "No migrations configuration type was found in the assembly '{0}'. (In Visual Studio you can use the Enable-Migrations command from Package Manager Console to add a migrations configuration)."
Migrations.Infrastructure.MigrationsException with message like "More than one migrations configuration type was found in the assembly '{0}'. Specify the name of the one to use."
Migrations.Infrastructure.MigrationsException with message like "Direct column renaming is not supported by SQL Server Compact. To rename a column in SQL Server Compact, you will need to recreate it."
Migrations.Infrastructure.MigrationsException with message like "In VB.NET projects, the migrations namespace '{0}' must be under the root namespace '{1}'. Update the migrations project's root namespace to allow classes under the migrations namespace to be added."
Migrations.Infrastructure.MigrationsException with message like "No MigrationSqlGenerator found for provider '{0}'. Use the SetSqlGenerator method in the target migrations configuration class to register additional SQL generators."
InvalidOperationException with message like "The type '{0}' has already been configured as a complex type. It cannot be reconfigured as an entity type."
InvalidOperationException with message like "The type '{0}' has already been configured as an entity type. It cannot be reconfigured as a complex type."
InvalidOperationException with message like "The key component '{0}' is not a declared property on type '{1}'. Verify that it has not been explicitly excluded from the model and that it is a valid primitive property."
InvalidOperationException with message like "The foreign key component '{0}' is not a declared property on type '{1}'. Verify that it has not been explicitly excluded from the model and that it is a valid primitive property."
InvalidOperationException with message like "The property '{0}' is not a declared property on type '{1}'. Verify that the property has not been explicitly excluded from the model by using the Ignore method or NotMappedAttribute data annotation. Make sure that it is a valid primitive property."
InvalidOperationException with message like "The navigation property '{0}' is not a declared property on type '{1}'. Verify that it has not been explicitly excluded from the model and that it is a valid navigation property."
InvalidOperationException with message like "The expression '{0}' is not a valid property expression. The expression should represent a property: C#: 't => t.MyProperty' VB.Net: 'Function(t) t.MyProperty'."
InvalidOperationException with message like "The expression '{0}' is not a valid property expression. The expression should represent a property: C#: 't => t.MyProperty' VB.Net: 'Function(t) t.MyProperty'. Use dotted paths for nested properties: C#: 't => t.MyProperty.MyProperty' VB.Net: 'Function(t) t.MyProperty.MyProperty'."
InvalidOperationException with message like "The properties expression '{0}' is not valid. The expression should represent a property: C#: 't => t.MyProperty' VB.Net: 'Function(t) t.MyProperty'. When specifying multiple properties use an anonymous type: C#: 't => new {{ t.MyProperty1, t.MyProperty2 }}' VB.Net: 'Function(t) New With {{ t.MyProperty1, t.MyProperty2 }}'."
InvalidOperationException with message like "The properties expression '{0}' is not valid. The expression should represent a property: C#: 't => t.MyProperty' VB.Net: 'Function(t) t.MyProperty'. When specifying multiple properties use an anonymous type: C#: 't => new {{ t.MyProperty1, t.MyProperty2 }}' VB.Net: 'Function(t) New With {{ t.MyProperty1, t.MyProperty2 }}'."
InvalidOperationException with message like "Conflicting configuration settings were specified for property '{0}' on type '{1}': {2}"
InvalidOperationException with message like "Conflicting configuration settings were specified for column '{0}' on table '{1}': {2}"
InvalidOperationException with message like "The type '{0}' was not mapped. Check that the type has not been explicitly excluded by using the Ignore method or NotMappedAttribute data annotation. Verify that the type was defined as a class, is not primitive or generic, and does not inherit from ComplexObject."
InvalidOperationException with message like "The type '{0}' was not mapped. Check that the type has not been explicitly excluded by using the Ignore method or NotMappedAttribute data annotation. Verify that the type was defined as a class, is not primitive or generic, and does not inherit from EntityObject."
InvalidOperationException with message like "The navigation property '{0}' declared on type '{1}' cannot be the inverse of itself."
InvalidOperationException with message like "The navigation property '{0}' declared on type '{1}' has been configured with conflicting foreign keys."
Core.MappingException with message like "Values of incompatible types ('{1}' and '{2}') were assigned to the '{0}' discriminator column. Values of the same type must be specified. To explicitly specify the type of the discriminator column use the HasColumnType method."
InvalidOperationException with message like "The navigation property '{0}' declared on type '{1}' has been configured with conflicting mapping information."
InvalidOperationException with message like "The navigation property '{0}' declared on type '{1}' has been configured with conflicting cascade delete operations using 'WillCascadeOnDelete'."
InvalidOperationException with message like "The navigation property '{0}' declared on type '{1}' has been configured with conflicting multiplicities."
InvalidOperationException with message like "The MaxLengthAttribute on property '{0}' on type '{1} is not valid. The Length value must be greater than zero. Use MaxLength() without parameters to indicate that the string or array can have the maximum allowable length."
InvalidOperationException with message like "The StringLengthAttribute on property '{0}' on type '{1}' is not valid. The maximum length must be greater than zero. Use MaxLength() without parameters to indicate that the string or array can have the maximum allowable length."
InvalidOperationException with message like "Unable to determine composite primary key ordering for type '{0}'. Use the ColumnAttribute or the HasKey method to specify an order for composite primary keys."
InvalidOperationException with message like "The ForeignKeyAttribute on property '{0}' on type '{1}' is not valid. Name must not be empty."
InvalidOperationException with message like "The ForeignKeyAttribute on property '{0}' on type '{1}' is not valid. The foreign key name '{2}' was not found on the dependent type '{3}'. The Name value should be a comma separated list of foreign key property names."
InvalidOperationException with message like "The ForeignKeyAttribute on property '{0}' on type '{1}' is not valid. The navigation property '{2}' was not found on the dependent type '{1}'. The Name value should be a valid navigation property name."
InvalidOperationException with message like "Unable to determine a composite foreign key ordering for foreign key on type {0}. When using the ForeignKey data annotation on composite foreign key properties ensure order is specified by using the Column data annotation or the fluent API."
InvalidOperationException with message like "The InversePropertyAttribute on property '{2}' on type '{3}' is not valid. The property '{0}' is not a valid navigation property on the related type '{1}'. Ensure that the property exists and is a valid reference or collection navigation property."
InvalidOperationException with message like "A relationship cannot be established from property '{0}' on type '{1}' to property '{0}' on type '{1}'. Check the values in the InversePropertyAttribute to ensure relationship definitions are unique and reference from one navigation property to its corresponding inverse navigation property."
InvalidOperationException with message like "A key is registered for the derived type '{0}'. Keys can only be registered for the root type '{1}'."
InvalidOperationException with message like "The type '{0}' has already been mapped to table '{1}'. Specify all mapping aspects of a table in a single Map call."
InvalidOperationException with message like "Map was called more than once for type '{0}' and at least one of the calls didn't specify the target table name."
InvalidOperationException with message like "The derived type '{0}' has already been mapped using the chaining syntax. A derived type can only be mapped once using the chaining syntax."
InvalidOperationException with message like "An "is not null" condition cannot be specified on property '{0}' on type '{1}' because this property is not included in the model. Check that the property has not been explicitly excluded from the model by using the Ignore method or NotMappedAttribute data annotation."
ArgumentException with message like "Values of type '{0}' cannot be used as type discriminator values. Supported types include byte, signed byte, bool, int16, int32, int64, and string."
InvalidOperationException with message like "Unable to add the convention '{0}'. Could not find an existing convention of type '{1}' in the current convention set."
InvalidOperationException with message like "Not all properties for type '{0}' have been mapped. Either map those properties or explicitly excluded them from the model."
InvalidOperationException with message like "Properties for type '{0}' can only be mapped once. Ensure the MapInheritedProperties method is only used during one call to the Map method."
InvalidOperationException with message like "Properties for type '{0}' can only be mapped once. Ensure the Properties method is used and that repeated calls specify each non-key property only once."
InvalidOperationException with message like "Properties for type '{0}' can only be mapped once. The non-key property '{1}' is mapped more than once. Ensure the Properties method specifies each non-key property only once."
InvalidOperationException with message like "The property '{1}' on type '{0}' cannot be mapped because it has been explicitly excluded from the model or it is of a type not supported by the DbModelBuilderVersion being used."
InvalidOperationException with message like "The entity types '{0}' and '{1}' cannot share table '{2}' because they are not in the same type hierarchy or do not have a valid one to one foreign key relationship with matching primary keys between them."
InvalidOperationException with message like "You cannot use Ignore method on the property '{0}' on type '{1}' because this type inherits from the type '{2}' where this property is mapped. To exclude this property from your model, use NotMappedAttribute or Ignore method on the base type."
InvalidOperationException with message like "The property '{0}' cannot be used as a key property on the entity '{1}' because the property type is not a valid key type. Only scalar types, string and byte[] are supported key types."
InvalidOperationException with message like "The specified table '{0}' was not found in the model. Ensure that the table name has been correctly specified."
InvalidOperationException with message like "The specified association foreign key columns '{0}' are invalid. The number of columns specified must match the number of primary key columns."
InvalidOperationException with message like "A circular ComplexType hierarchy was detected. Self-referencing ComplexTypes are not supported."
InvalidOperationException with message like "Unable to determine the principal end of an association between the types '{0}' and '{1}'. The principal end of this association must be explicitly configured using either the relationship fluent API or data annotations."
InvalidOperationException with message like "The abstract type '{0}' has no mapped descendants and so cannot be mapped. Either remove '{0}' from the model or add one or more types deriving from '{0}' to the model. "
NotSupportedException with message like "The type '{0}' cannot be mapped as defined because it maps inherited properties from types that use entity splitting or another form of inheritance. Either choose a different inheritance mapping strategy so as to not map inherited properties, or change all types in the hierarchy to map inherited properties and to not use splitting. "
InvalidOperationException with message like "The table '{0}' was configured but is not used in any mappings. Verify the mapping configuration for '{0}' is correct."
InvalidOperationException with message like "The configured column orders for the table '{0}' contains duplicates. Ensure the specified column order values are distinct."
NotSupportedException with message like "The enum or spatial property '{1}' on type '{0}' cannot be mapped. Use DbModelBuilderVersion 'V5_0' or later to map enum or spatial properties."
InvalidOperationException with message like "Multiple potential primary key properties named '{0}' but differing only by case were found on entity type '{1}'. Configure the primary key explicitly using the HasKey fluent API or the KeyAttribute data annotation."
InvalidOperationException with message like "Cannot get value for property '{0}' from entity of type '{1}' because the property has no get accessor."
InvalidOperationException with message like "Cannot set value for property '{0}' on entity of type '{1}' because the property has no set accessor."
NotSupportedException with message like "Cannot set value for property '{0}' on entity of type '{1}' because the property has no set accessor and is in the '{2}' state."
InvalidOperationException with message like "Member '{0}' cannot be called for property '{1}' on entity of type '{2}' because the property is not part of the Entity Data Model."
ArgumentException with message like "Cannot call the {0} method for an entity of type '{1}' on a DbSet for entities of type '{2}'. Only entities of type '{2}' or derived from type '{2}' can be added, attached, or removed."
ArgumentException with message like "Cannot call the Create method for the type '{0}' on a DbSet for entities of type '{1}'. Only entities of type '{1}' or derived from type '{1}' can be created."
ArgumentException with message like "The property '{0}' on type '{1}' is a collection navigation property. The Collection method should be used instead of the Reference method."
ArgumentException with message like "The property '{0}' on type '{1}' is a reference navigation property. The Reference method should be used instead of the Collection method."
ArgumentException with message like "The property '{0}' on type '{1}' is not a navigation property. The Reference and Collection methods can only be used with navigation properties. Use the Property or ComplexProperty method."
ArgumentException with message like "The property '{0}' on type '{1}' is not a primitive or complex property. The Property method can only be used with primitive or complex properties. Use the Reference or Collection method."
ArgumentException with message like "The property '{0}' on type '{1}' is not a complex property. The ComplexProperty method can only be used with complex properties. Use the Property, Reference or Collection method."
ArgumentException with message like "The property '{0}' on type '{1}' is not a primitive property, complex property, collection navigation property, or reference navigation property."
ArgumentException with message like ""The property '{0}' from the property path '{1}' is not a complex property on type '{2}'. Property paths must be composed of complex properties for all except the final property.""
ArgumentException with message like ""The property path '{0}' cannot be used for navigation properties. Property paths can only be used to access primitive or complex properties.""
ArgumentException with message like "The navigation property '{0}' on entity type '{1}' cannot be used for entities of type '{2}' because it refers to entities of type '{3}'."
ArgumentException with message like "The generic type argument '{0}' cannot be used with the Member method when accessing the collection navigation property '{1}' on entity type '{2}'. The generic type argument '{3}' must be used instead."
ArgumentException with message like "The property '{0}' on entity type '{1}' cannot be used for objects of type '{2}' because it is a property for objects of type '{3}'."
InvalidOperationException with message like "{0} cannot be used for entities in the {1} state."
InvalidOperationException with message like "Cannot set non-nullable property '{0}' of type '{1}' to null on object of type '{2}'."
InvalidOperationException with message like "The property '{0}' in the entity of type '{1}' is null. Store values cannot be obtained for an entity with a null complex property."
InvalidOperationException with message like "Cannot assign value of type '{0}' to property '{1}' of type '{2}' in property values for type '{3}'."
NotSupportedException with message like "The set of property value names is read-only."
ArgumentException with message like "The '{0}' property does not exist or is not mapped for the type '{1}'."
ArgumentException with message like "Cannot copy values from DbPropertyValues for type '{0}' into DbPropertyValues for type '{1}'."
ArgumentException with message like "Cannot copy from property values for object of type '{0}' into property values for object of type '{1}'."
ArgumentException with message like "A property of a complex type must be set to an instance of the generic or non-generic DbPropertyValues class for that type."
InvalidOperationException with message like "The value of the complex property '{0}' on entity of type '{1}' is null. Complex properties cannot be set to null and values cannot be set for null complex properties."
InvalidOperationException with message like "The value of the nested property values property '{0}' on the values for entity of type '{1}' is null. Nested property values cannot be set to null and values cannot be set for null complex properties."
InvalidOperationException with message like "Cannot set the value of the nested property '{0}' because value of the complex property '{1}' to which it belongs is null."
InvalidOperationException with message like "Cannot set the original value of the nested property '{0}' because the original value of the complex property '{1}' to which it belongs is null."
InvalidOperationException with message like "The model backing the '{0}' context has changed since the database was created. Consider using Code First Migrations to update the database (http://go.microsoft.com/fwlink/?LinkId=238269)."
InvalidOperationException with message like "Database '{0}' cannot be created because it already exists."
NotSupportedException with message like "Model compatibility cannot be checked because the DbContext instance was not created using Code First patterns. DbContext instances created from an ObjectContext or using an EDMX file cannot be checked for compatibility."
NotSupportedException with message like "Model compatibility cannot be checked because the database does not contain model metadata. Model compatibility can only be checked for databases created using Code First or Code First Migrations."
InvalidOperationException with message like "Configuration for DbContext type '{0}' is specified multiple times in the application configuration. Each context can only be configured once."
InvalidOperationException with message like "The context cannot be used while the model is being created. This exception may be thrown if the context is used inside the OnModelCreating method or if the same context instance is accessed by multiple threads concurrently. Note that instance members of DbContext and related classes are not guaranteed to be thread safe."
InvalidOperationException with message like "The DbContext class cannot be used with models that have multiple entity sets per type (MEST)."
InvalidOperationException with message like "The operation cannot be completed because the DbContext has been disposed."
InvalidOperationException with message like "The provider factory returned a null connection."
InvalidOperationException with message like "The connection string '{0}' in the application's configuration file does not contain the required providerName attribute.""
InvalidOperationException with message like "The DbConnectionFactory instance returned a null connection."
InvalidOperationException with message like "The entity found was of type {0} when an entity of type {1} was requested."
InvalidOperationException with message like "Multiple entities were found in the Added state that match the given primary key values."
InvalidOperationException with message like "The type '{0}' is mapped as a complex type. The Set method, DbSet objects, and DbEntityEntry objects can only be used with entity types, not complex types."
InvalidOperationException with message like "The type '{0}' is not attributed with EdmEntityTypeAttribute but is contained in an assembly attributed with EdmSchemaAttribute. POCO entities that do not use EdmEntityTypeAttribute cannot be contained in the same assembly as non-POCO entities that use EdmEntityTypeAttribute."
InvalidOperationException with message like "The entity type {0} is not part of the model for the current context."
NotSupportedException with message like "Data binding directly to a store query (DbSet, DbQuery, DbSqlQuery, DbRawSqlQuery) is not supported. Instead populate a DbSet with data, for example by calling Load on the DbSet, and then bind to local data. For WPF bind to DbSet.Local. For WinForms bind to DbSet.Local.ToBindingList()."
InvalidOperationException with message like "No connection string named '{0}' could be found in the application config file."
InvalidOperationException with message like "Cannot initialize a DbContext from an entity connection string or an EntityConnection instance together with a DbCompiledModel. If an entity connection string or EntityConnection instance is used, then the model will be created from the metadata in the connection. If a DbCompiledModel is used, then the connection supplied should be a standard database connection (for example, a SqlConnection instance) rather than an entity connection."
NotSupportedException with message like "The collection navigation property '{0}' on the entity of type '{1}' cannot be set because the entity type does not define a navigation property with a set accessor."
NotSupportedException with message like "Using the same DbCompiledModel to create contexts against different types of database servers is not supported. Instead, create a separate DbCompiledModel for each type of server being used."
InvalidOperationException with message like "Multiple object sets per type are not supported. The object sets '{0}' and '{1}' can both contain instances of type '{2}'."
InvalidOperationException with message like "The context type '{0}' must have a public constructor taking an EntityConnection."
NotSupportedException with message like "The database name '{0}' is not supported because it is an MDF file name. A full connection string must be provided to attach an MDF file."
NotSupportedException with message like "Creating a DbModelBuilder or writing the EDMX from a DbContext created using an existing ObjectContext is not supported. EDMX can only be obtained from a Code First DbContext created without using an existing DbCompiledModel."
NotSupportedException with message like "Creating a DbModelBuilder or writing the EDMX from a DbContext created using Database First or Model First is not supported. EDMX can only be obtained from a Code First DbContext created without using an existing DbCompiledModel."
InvalidOperationException with message like "The context factory type '{0}' must have a public default constructor."
InvalidOperationException with message like "The generic 'Set' method cannot be called with a proxy type. Either use the actual entity type or call the non-generic 'Set' method."
InvalidOperationException with message like "MaxLengthAttribute must have a Length value that is greater than zero. Use MaxLength() without parameters to indicate that the string or array can have the maximum allowable length."
InvalidOperationException with message like "MinLengthAttribute must have a Length value that is zero or greater."
InvalidOperationException with message like "No connection string named '{0}' could be found in the application config file."
InvalidOperationException with message like "The connection can not be overridden because this context was created from an existing ObjectContext."
InvalidOperationException with message like "Can not override the connection for this context with a standard DbConnection because the original connection was an EntityConnection."
InvalidOperationException with message like "Can not override the connection for this context with an EntityConnection because the original connection was a standard DbConnection."
InvalidOperationException with message like "The requested operation could not be completed, because a null EntityKey property value was returned by the object."
InvalidOperationException with message like "A connection string must be set on the connection before you attempt this operation."
InvalidOperationException with message like "The connection is not open."
InvalidOperationException with message like "Cannot perform the operation because the adapter does not have a connection."
InvalidOperationException with message like "Cannot perform the update operation because the adapter's connection is not open."
InvalidOperationException with message like "The update operation cannot be performed, because the adapter's connection is not associated with a valid store connection."
Core.MappingException with message like "The type '{0}'('{1}') of the member '{2}' in the conceptual type '{3}' doesn't match with the type '{4}'('{5}') of the member '{6}' on the object side type '{7}'."
InvalidOperationException with message like "Conflicting changes to the role '{0}' of the relationship '{1}' have been detected."
InvalidOperationException with message like "Attach is not a valid operation when the source object associated with this related end is in an added, deleted, or detached state. Objects loaded using the NoTracking merge option are always detached."
InvalidOperationException with message like "The object at index {0} in the specified collection of objects is null."
InvalidOperationException with message like "The object at index {0} in the specified collection of objects is not attached to the same ObjectContext as source object of this EntityCollection."
InvalidOperationException with message like "The object at index {0} in the specified collection of objects is in an added or deleted state. Relationships cannot be created for objects in this state."
InvalidOperationException with message like "The object being attached to the source object is not attached to the same ObjectContext as the source object."
InvalidOperationException with message like "The object being attached is in an added or deleted state. Relationships cannot be created for objects in this state."
InvalidOperationException with message like "Adding a relationship with an entity which is in the Deleted state is not allowed."
InvalidOperationException with message like "The relationship '{0}' does not match any relationship defined in the conceptual model."
InvalidOperationException with message like "The source query for this EntityCollection or EntityReference cannot be returned when the related object is in either an added state or a detached state and was not originally retrieved using the NoTracking merge option."
InvalidOperationException with message like "The Load method cannot return the {0} when the related object is in a deleted state."
InvalidOperationException with message like "A relationship multiplicity constraint violation occurred: An EntityReference expected at least one related object, but the query returned no related objects from the data store."
InvalidOperationException with message like "A relationship multiplicity constraint violation occurred: An EntityReference can have no more than one related object, but the query returned more than one related object. This is a non-recoverable error."
InvalidOperationException with message like "The EntityKey property cannot be set to EntityNotValidKey, NoEntitySetKey, or a temporary key."
InvalidOperationException with message like "At least one related end in the relationship could not be found."
InvalidOperationException with message like "The {0} could not be loaded because it is not attached to an ObjectContext."
InvalidOperationException with message like "When an object is returned with a NoTracking merge option, Load can only be called when the EntityCollection or EntityReference does not contain objects."
InvalidOperationException with message like "When an object is returned with a NoTracking merge option, Load cannot be called when the IsLoaded property is true."
InvalidOperationException with message like "The object in the '{0}' role cannot be automatically added to the context because it was retrieved using the NoTracking merge option. Explicitly attach the entity to the ObjectContext before defining the relationship."
InvalidOperationException with message like "The relationship between the two objects cannot be defined because they are attached to different ObjectContext objects."
InvalidOperationException with message like "Related objects cannot be loaded using the {0} merge option. Relationships cannot be created when one object was retrieved using a NoTracking merge option and the other object was retrieved using a different merge option."
InvalidOperationException with message like "The relationship cannot be defined because the EntitySet name '{0}.{1}' is not valid for the role '{2}' in association set name '{3}.{4}'."
InvalidOperationException with message like "Requested operation is not allowed when the owner of this RelatedEnd is null. RelatedEnd objects that were created with the default constructor should only be used as a container during serialization."
InvalidOperationException with message like "A referential integrity constraint violation occurred: The property values that define the referential constraints are not consistent between principal and dependent objects in the relationship."
InvalidOperationException with message like "The specified navigation property {0} could not be found."
InvalidOperationException with message like "The attempted operation is not valid. The data reader is closed."
InvalidOperationException with message like "Calling '{0}' when the data reader is closed is not a valid operation."
InvalidOperationException with message like "The attempted operation is not valid. The nested data reader has been implicitly closed because its parent data reader has been read or closed."
InvalidOperationException with message like "There was an attempt to read, but no data was present."
ArgumentException with message like "All 'EdmMember' instances must be a valid member of the EdmType."
Migrations.Infrastructure.MigrationsException with message like "More than one context type '{0}' was found in the assembly '{1}'. Specify the fully qualified name of the context."
Migrations.Infrastructure.MigrationsException with message like "No context type was found in the assembly '{0}'."
Migrations.Infrastructure.MigrationsException with message like "The context type '{0}' was not found in the assembly '{1}'."
InvalidOperationException with message like "Sequence contains more than one element"
InvalidOperationException with message like "The source IQueryable doesn't implement IDbAsyncEnumerable{0}. Only sources that implement IDbAsyncEnumerable can be used for Entity Framework asynchronous operations. For more details see http://go.microsoft.com/fwlink/?LinkId=287068."
InvalidOperationException with message like "The provider for the source IQueryable doesn't implement IDbAsyncQueryProvider. Only providers that implement IDbAsyncQueryProvider can be used for Entity Framework asynchronous operations. For more details see http://go.microsoft.com/fwlink/?LinkId=287068."
InvalidOperationException with message like "Sequence contains no elements"
Migrations.Infrastructure.MigrationsException with message like "Automatic migrations that affect the location of the migrations history system table (such as default schema changes) are not supported. Please use code-based migrations for operations that affect the location of the migrations history system table."
InvalidOperationException with message like "Sequence contains no matching element"
InvalidOperationException with message like "Sequence contains more than one matching element"
InvalidOperationException with message like "The type '{0}' cannot be used to filter properties. Only scalar types, string, and byte[] are supported."
Migrations.Infrastructure.MigrationsPendingException with message like "Unable to generate an explicit migration because the following explicit migrations are pending: [{0}]. Apply the pending explicit migrations before attempting to generate a new explicit migration."
InvalidOperationException with message like "The base type '{0}' must be mapped to functions because its derived type '{1}' is mapped to functions. When mapping an inheritance hierarchy to functions, ensure that the root type of the hierarchy is also mapped to functions."
ArgumentException with message like "'{0}' is not a valid resource name."
InvalidOperationException with message like "A parameter binding to the property '{0}' was not found on the modification function '{1}'. Ensure that the parameter is valid for this modification operation and that it is not database generated."
InvalidOperationException with message like "The connection could not be opened because it is broken. The connection must be closed before it can be opened."
InvalidOperationException with message like "The current migration SQL generator ({0}) is unable to generate SQL for operations of type '{1}'. Call SetSqlGenerator on your migrations configuration class to use a different SQL generator. To create a custom SQL generator that can handle this type of operation, add a new class that derives from {0} and override Generate(MigrationOperation)."
InvalidOperationException with message like "An original value parameter binding to the property '{0}' was not found on the modification function '{1}'. Ensure that the parameter is a concurrency token."
InvalidOperationException with message like "A result binding for the property '{0}' was not found on the modification function '{1}'. Ensure that the property is database generated."
InvalidOperationException with message like "The navigation property '{0}' declared on type '{1}' has been configured with conflicting modification function mapping information."
Migrations.Infrastructure.MigrationsException with message like "Could not apply auto-migration '{0}' because it includes modification function creation operations. When using auto-migrations, modification function creation operations are only supported when migrating to the current model."
Migrations.Infrastructure.MigrationsException with message like "An existing EF5 migrations history table was detected but could not be upgraded because a custom history context factory has been configured. To upgrade an existing EF5 database, ensure there is no custom history context factory configured."
The exception that is thrown when the value of an argument is outside the allowable range of values as defined by the invoked method.
The exception that is thrown when the author has yet to implement the logic at this point in the program. This can act as an exception based TODO tag.
The exception that is thrown when an invoked method is not supported, or when there is an attempt to
read, seek, or write to a stream that does not support the invoked functionality.
AutoGenerated resource class. Usage:
string s = EntityRes.GetString(EntityRes.MyIdenfitier);
Represents a conceptual or store model. This class can be used to access information about the shape of the model
and the way the that it has been configured.
Adds an association type to the model.
The AssociationType instance to be added.
Adds a complex type to the model.
The ComplexType instance to be added.
Adds an entity type to the model.
The EntityType instance to be added.
Adds an enumeration type to the model.
The EnumType instance to be added.
Adds a function to the model.
The EdmFunction instance to be added.
Removes an association type from the model.
The AssociationType instance to be removed.
Removes a complex type from the model.
The ComplexType instance to be removed.
Removes an entity type from the model.
The EntityType instance to be removed.
Removes an enumeration type from the model.
The EnumType instance to be removed.
Removes a function from the model.
The EdmFunction instance to be removed.
Gets the built-in type kind for this type.
A object that represents the built-in type kind for this type.
Gets the data space associated with the model, which indicates whether
it is a conceptual model (DataSpace.CSpace) or a store model (DataSpace.SSpace).
Gets the association types in the model.
Gets the complex types in the model.
Gets the entity types in the model.
Gets the enum types in the model.
Gets the functions in the model.
Gets the container that stores entity and association sets, and function imports.
Gets the version of the schema for the model.
The version of the schema for the model.
Gets the provider information for this model.
The provider information for this model.
Gets the provider manifest associated with the model.
The provider manifest associated with the model.
Gets the namespace names associated with the model.
The namespace names associated with the model.
Gets the namespace items associated with the model.
The namespace items associated with the model.
Gets the global items associated with the model.
The global items associated with the model.
Gets the containers associated with the model.
The containers associated with the model.
An implementation of IDatabaseInitializer that will recreate and optionally re-seed the
database only if the database does not exist.
To seed the database, create a derived class and override the Seed method.
The type of the context.
Initializes a new instance of the class.
Executes the strategy to initialize the database for the given context.
The context.
A method that should be overridden to actually add data to the context for seeding.
The default implementation does nothing.
The context to seed.
An instance of this class is obtained from an object and can be used
to manage the actual database backing a DbContext or connection.
This includes creating, deleting, and checking for the existence of a database.
Note that deletion and checking for existence of a database can be performed using just a
connection (i.e. without a full context) by using the static methods of this class.
Creates a Database backed by the given context. This object can be used to create a database,
check for database existence, and delete a database.
Enables the user to pass in a database transaction created outside of the object
if you want the Entity Framework to execute commands within that external transaction.
Alternatively, pass in null to clear the framework's knowledge of that transaction.
the external transaction
Thrown if the transaction is already completed
Thrown if the connection associated with the object is already enlisted in a
transaction
Thrown if the connection associated with the object is already participating in a transaction
Thrown if the connection associated with the transaction does not match the Entity Framework's connection
Begins a transaction on the underlying store connection
a object wrapping access to the underlying store's transaction object
Begins a transaction on the underlying store connection using the specified isolation level
a object wrapping access to the underlying store's transaction object
Sets the database initializer to use for the given context type. The database initializer is called when a
the given type is used to access a database for the first time.
The default strategy for Code First contexts is an instance of .
The type of the context.
The initializer to use, or null to disable initialization for the given context type.
Runs the the registered on this context.
If "force" is set to true, then the initializer is run regardless of whether or not it
has been run before. This can be useful if a database is deleted while an app is running
and needs to be reinitialized.
If "force" is set to false, then the initializer is only run if it has not already been
run for this context, model, and connection in this app domain. This method is typically
used when it is necessary to ensure that the database has been created and seeded
before starting some operation where doing so lazily will cause issues, such as when the
operation is part of a transaction.
If set to true the initializer is run even if it has already been run.
Checks whether or not the database is compatible with the the current Code First model.
Model compatibility currently uses the following rules.
If the context was created using either the Model First or Database First approach then the
model is assumed to be compatible with the database and this method returns true.
For Code First the model is considered compatible if the model is stored in the database
in the Migrations history table and that model has no differences from the current model as
determined by Migrations model differ.
If the model is not stored in the database but an EF 4.1/4.2 model hash is found instead,
then this is used to check for compatibility.
If set to true then an exception will be thrown if no model metadata is found in the database. If set to false then this method will return true if metadata is not found.
True if the model hash in the context and the database match; false otherwise.
Creates a new database on the database server for the model defined in the backing context.
Note that calling this method before the database initialization strategy has run will disable
executing that strategy.
Creates a new database on the database server for the model defined in the backing context, but only
if a database with the same name does not already exist on the server.
True if the database did not exist and was created; false otherwise.
Checks whether or not the database exists on the server.
True if the database exists; false otherwise.
Deletes the database on the database server if it exists, otherwise does nothing.
Calling this method from outside of an initializer will mark the database as having
not been initialized. This means that if an attempt is made to use the database again
after it has been deleted, then any initializer set will run again and, usually, will
try to create the database again automatically.
True if the database did exist and was deleted; false otherwise.
Checks whether or not the database exists on the server.
The connection to the database is created using the given database name or connection string
in the same way as is described in the documentation for the class.
The database name or a connection string to the database.
True if the database exists; false otherwise.
Deletes the database on the database server if it exists, otherwise does nothing.
The connection to the database is created using the given database name or connection string
in the same way as is described in the documentation for the class.
The database name or a connection string to the database.
True if the database did exist and was deleted; false otherwise.
Checks whether or not the database exists on the server.
An existing connection to the database.
True if the database exists; false otherwise.
Deletes the database on the database server if it exists, otherwise does nothing.
An existing connection to the database.
True if the database did exist and was deleted; false otherwise.
Resets the DefaultConnectionFactory to its initial value.
Currently, this method is only used by test code.
Performs the operation defined by the given delegate using the given lazy connection, ensuring
that the lazy connection is disposed after use.
Information used to create a DbConnection.
The operation to perform.
The return value of the operation.
Performs the operation defined by the given delegate against a connection. The connection
is either the connection accessed from the context backing this object, or is obtained from
the connection information passed to one of the static methods.
The connection to use.
The operation to perform.
The return value of the operation.
Returns an empty ObjectContext that can be used to perform delete/exists operations.
The connection for which to create an ObjectContext.
The empty context.
Creates a raw SQL query that will return elements of the given generic type.
The type can be any type that has properties that match the names of the columns returned
from the query, or can be a simple primitive type. The type does not have to be an
entity type. The results of this query are never tracked by the context even if the
type of object returned is an entity type. Use the
method to return entities that are tracked by the context.
As with any API that accepts SQL it is important to parameterize any user input to protect against a SQL injection attack. You can include parameter place holders in the SQL query string and then supply parameter values as additional arguments. Any parameter values you supply will automatically be converted to a DbParameter.
context.Database.SqlQuery<Post>("SELECT * FROM dbo.Posts WHERE Author = @p0", userSuppliedAuthor);
Alternatively, you can also construct a DbParameter and supply it to SqlQuery. This allows you to use named parameters in the SQL query string.
context.Database.SqlQuery<Post>("SELECT * FROM dbo.Posts WHERE Author = @author", new SqlParameter("@author", userSuppliedAuthor));
The type of object returned by the query.
The SQL query string.
The parameters to apply to the SQL query string.
A object that will execute the query when it is enumerated.
Creates a raw SQL query that will return elements of the given type.
The type can be any type that has properties that match the names of the columns returned
from the query, or can be a simple primitive type. The type does not have to be an
entity type. The results of this query are never tracked by the context even if the
type of object returned is an entity type. Use the
method to return entities that are tracked by the context.
As with any API that accepts SQL it is important to parameterize any user input to protect against a SQL injection attack. You can include parameter place holders in the SQL query string and then supply parameter values as additional arguments. Any parameter values you supply will automatically be converted to a DbParameter.
context.Database.SqlQuery(typeof(Post), "SELECT * FROM dbo.Posts WHERE Author = @p0", userSuppliedAuthor);
Alternatively, you can also construct a DbParameter and supply it to SqlQuery. This allows you to use named parameters in the SQL query string.
context.Database.SqlQuery(typeof(Post), "SELECT * FROM dbo.Posts WHERE Author = @author", new SqlParameter("@author", userSuppliedAuthor));
The type of object returned by the query.
The SQL query string.
The parameters to apply to the SQL query string.
A object that will execute the query when it is enumerated.
Executes the given DDL/DML command against the database.
As with any API that accepts SQL it is important to parameterize any user input to protect against a SQL injection attack. You can include parameter place holders in the SQL query string and then supply parameter values as additional arguments. Any parameter values you supply will automatically be converted to a DbParameter.
context.Database.ExecuteSqlCommand("UPDATE dbo.Posts SET Rating = 5 WHERE Author = @p0", userSuppliedAuthor);
Alternatively, you can also construct a DbParameter and supply it to SqlQuery. This allows you to use named parameters in the SQL query string.
context.Database.ExecuteSqlCommand("UPDATE dbo.Posts SET Rating = 5 WHERE Author = @author", new SqlParameter("@author", userSuppliedAuthor));
If there isn't an existing local or ambient transaction a new transaction will be used
to execute the command.
The command string.
The parameters to apply to the command string.
The result returned by the database after executing the command.
Executes the given DDL/DML command against the database.
As with any API that accepts SQL it is important to parameterize any user input to protect against a SQL injection attack. You can include parameter place holders in the SQL query string and then supply parameter values as additional arguments. Any parameter values you supply will automatically be converted to a DbParameter.
context.Database.ExecuteSqlCommand("UPDATE dbo.Posts SET Rating = 5 WHERE Author = @p0", userSuppliedAuthor);
Alternatively, you can also construct a DbParameter and supply it to SqlQuery. This allows you to use named parameters in the SQL query string.
context.Database.ExecuteSqlCommand("UPDATE dbo.Posts SET Rating = 5 WHERE Author = @author", new SqlParameter("@author", userSuppliedAuthor));
Controls the creation of a transaction for this command.
The command string.
The parameters to apply to the command string.
The result returned by the database after executing the command.
Asynchronously executes the given DDL/DML command against the database.
As with any API that accepts SQL it is important to parameterize any user input to protect against a SQL injection attack. You can include parameter place holders in the SQL query string and then supply parameter values as additional arguments. Any parameter values you supply will automatically be converted to a DbParameter.
context.Database.ExecuteSqlCommandAsync("UPDATE dbo.Posts SET Rating = 5 WHERE Author = @p0", userSuppliedAuthor);
Alternatively, you can also construct a DbParameter and supply it to SqlQuery. This allows you to use named parameters in the SQL query string.
context.Database.ExecuteSqlCommandAsync("UPDATE dbo.Posts SET Rating = 5 WHERE Author = @author", new SqlParameter("@author", userSuppliedAuthor));
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
If there isn't an existing local transaction a new transaction will be used
to execute the command.
The command string.
The parameters to apply to the command string.
A task that represents the asynchronous operation.
The task result contains the result returned by the database after executing the command.
Asynchronously executes the given DDL/DML command against the database.
As with any API that accepts SQL it is important to parameterize any user input to protect against a SQL injection attack. You can include parameter place holders in the SQL query string and then supply parameter values as additional arguments. Any parameter values you supply will automatically be converted to a DbParameter.
context.Database.ExecuteSqlCommandAsync("UPDATE dbo.Posts SET Rating = 5 WHERE Author = @p0", userSuppliedAuthor);
Alternatively, you can also construct a DbParameter and supply it to SqlQuery. This allows you to use named parameters in the SQL query string.
context.Database.ExecuteSqlCommandAsync("UPDATE dbo.Posts SET Rating = 5 WHERE Author = @author", new SqlParameter("@author", userSuppliedAuthor));
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
Controls the creation of a transaction for this command.
The command string.
The parameters to apply to the command string.
A task that represents the asynchronous operation.
The task result contains the result returned by the database after executing the command.
Asynchronously executes the given DDL/DML command against the database.
As with any API that accepts SQL it is important to parameterize any user input to protect against a SQL injection attack. You can include parameter place holders in the SQL query string and then supply parameter values as additional arguments. Any parameter values you supply will automatically be converted to a DbParameter.
context.Database.ExecuteSqlCommandAsync("UPDATE dbo.Posts SET Rating = 5 WHERE Author = @p0", userSuppliedAuthor);
Alternatively, you can also construct a DbParameter and supply it to SqlQuery. This allows you to use named parameters in the SQL query string.
context.Database.ExecuteSqlCommandAsync("UPDATE dbo.Posts SET Rating = 5 WHERE Author = @author", new SqlParameter("@author", userSuppliedAuthor));
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
If there isn't an existing local transaction a new transaction will be used
to execute the command.
The command string.
A to observe while waiting for the task to complete.
The parameters to apply to the command string.
A task that represents the asynchronous operation.
The task result contains the result returned by the database after executing the command.
Asynchronously executes the given DDL/DML command against the database.
As with any API that accepts SQL it is important to parameterize any user input to protect against a SQL injection attack. You can include parameter place holders in the SQL query string and then supply parameter values as additional arguments. Any parameter values you supply will automatically be converted to a DbParameter.
context.Database.ExecuteSqlCommandAsync("UPDATE dbo.Posts SET Rating = 5 WHERE Author = @p0", userSuppliedAuthor);
Alternatively, you can also construct a DbParameter and supply it to SqlQuery. This allows you to use named parameters in the SQL query string.
context.Database.ExecuteSqlCommandAsync("UPDATE dbo.Posts SET Rating = 5 WHERE Author = @author", new SqlParameter("@author", userSuppliedAuthor));
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
Controls the creation of a transaction for this command.
The command string.
A to observe while waiting for the task to complete.
The parameters to apply to the command string.
A task that represents the asynchronous operation.
The task result contains the result returned by the database after executing the command.
Gets the of the current instance.
The exact runtime type of the current instance.
Returns the connection being used by this context. This may cause the
connection to be created if it does not already exist.
Thrown if the context has been disposed.
The connection factory to use when creating a from just
a database name or a connection string.
This is used when just a database name or connection string is given to or when
the no database name or connection is given to DbContext in which case the name of
the context class is passed to this factory in order to generate a DbConnection.
By default, the instance to use is read from the application's .config
file from the "EntityFramework DefaultConnectionFactory" entry in appSettings. If no entry is found in
the config file then is used. Setting this property in code
always overrides whatever value is found in the config file.
The actual connection factory that was set, rather than the one that is returned by the resolver,
which may have come from another source.
Checks whether or not the DefaultConnectionFactory has been set to something other than its default value.
Gets or sets the timeout value, in seconds, for all context operations.
The default value is null, where null indicates that the default value of the underlying
provider will be used.
The timeout, in seconds, or null to use the provider default.
Set this property to log the SQL generated by the to the given
delegate. For example, to log to the console, set this property to .
The format of the log text can be changed by creating a new formatter that derives from
and setting it with .
For more low-level control over logging/interception see and
.
DbModelBuilder is used to map CLR classes to a database schema.
This code centric approach to building an Entity Data Model (EDM) model is known as 'Code First'.
DbModelBuilder is typically used to configure a model by overriding
.
You can also use DbModelBuilder independently of DbContext to build a model and then construct a
or .
The recommended approach, however, is to use OnModelCreating in as
the workflow is more intuitive and takes care of common tasks, such as caching the created model.
Types that form your model are registered with DbModelBuilder and optional configuration can be
performed by applying data annotations to your classes and/or using the fluent style DbModelBuilder
API.
When the Build method is called a set of conventions are run to discover the initial model.
These conventions will automatically discover aspects of the model, such as primary keys, and
will also process any data annotations that were specified on your classes. Finally
any configuration that was performed using the DbModelBuilder API is applied.
Configuration done via the DbModelBuilder API takes precedence over data annotations which
in turn take precedence over the default conventions.
Initializes a new instance of the class.
The process of discovering the initial model will use the set of conventions included
in the most recent version of the Entity Framework installed on your machine.
Upgrading to newer versions of the Entity Framework may cause breaking changes
in your application because new conventions may cause the initial model to be
configured differently. There is an alternate constructor that allows a specific
version of conventions to be specified.
Initializes a new instance of the class that will use
a specific set of conventions to discover the initial model.
The version of conventions to be used.
Excludes a type from the model. This is used to remove types from the model that were added
by convention during initial model discovery.
The type to be excluded.
The same DbModelBuilder instance so that multiple calls can be chained.
Configures the default database schema name. This default database schema name is used
for database objects that do not have an explicitly configured schema name.
The name of the default database schema.
Excludes the specified type(s) from the model. This is used to remove types from the model that were added
by convention during initial model discovery.
The types to be excluded from the model.
The same DbModelBuilder instance so that multiple calls can be chained.
Registers an entity type as part of the model and returns an object that can be used to
configure the entity. This method can be called multiple times for the same entity to
perform multiple lines of configuration.
The type to be registered or configured.
The configuration object for the specified entity type.
Registers a type as an entity in the model and returns an object that can be used to
configure the entity. This method can be called multiple times for the same type to
perform multiple lines of configuration.
The type to be registered or configured.
The configuration object for the specified entity type.
Registers a type as a complex type in the model and returns an object that can be used to
configure the complex type. This method can be called multiple times for the same type to
perform multiple lines of configuration.
The type to be registered or configured.
The configuration object for the specified complex type.
Begins configuration of a lightweight convention that applies to all entities in
the model.
A configuration object for the convention.
Begins configuration of a lightweight convention that applies to all entities of
the specified type in the model. This method does not register entity types as
part of the model.
The type of the entities that this convention will apply to.
A configuration object for the convention.
Begins configuration of a lightweight convention that applies to all properties
in the model.
A configuration object for the convention.
Begins configuration of a lightweight convention that applies to all primitive
properties of the specified type in the model.
The type of the properties that the convention will apply to.
A configuration object for the convention.
The convention will apply to both nullable and non-nullable properties of the
specified type.
Creates a based on the configuration performed using this builder.
The connection is used to determine the database provider being used as this
affects the database layer of the generated model.
Connection to use to determine provider information.
The model that was built.
Creates a based on the configuration performed using this builder.
Provider information must be specified because this affects the database layer of the generated model.
For SqlClient the invariant name is 'System.Data.SqlClient' and the manifest token is the version year (i.e. '2005', '2008' etc.)
The database provider that the model will be used with.
The model that was built.
Gets the of the current instance.
The exact runtime type of the current instance.
Provides access to the settings of this DbModelBuilder that deal with conventions.
Gets the for this DbModelBuilder.
The registrar allows derived entity and complex type configurations to be registered with this builder.
A value from this enumeration can be provided directly to the
class or can be used in the applied to
a class derived from . The value used defines which version of
the DbContext and DbModelBuilder conventions should be used when building a model from
code--also known as "Code First".
Using DbModelBuilderVersion.Latest ensures that all the latest functionality is available
when upgrading to a new release of the Entity Framework. However, it may result in an
application behaving differently with the new release than it did with a previous release.
This can be avoided by using a specific version of the conventions, but if a version
other than the latest is set then not all the latest functionality will be available.
Indicates that the latest version of the and
conventions should be used.
Indicates that the version of the and
conventions shipped with Entity Framework v4.1
should be used.
Indicates that the version of the and
conventions shipped with Entity Framework v5.0
when targeting .Net Framework 4 should be used.
Indicates that the version of the and
conventions shipped with Entity Framework v5.0
should be used.
Indicates that the version of the and
conventions shipped with Entity Framework v6.0
should be used.
This attribute can be applied to a class derived from to set which
version of the DbContext and conventions should be used when building
a model from code--also known as "Code First". See the
enumeration for details about DbModelBuilder versions.
If the attribute is missing from DbContextthen DbContext will always use the latest
version of the conventions. This is equivalent to using DbModelBuilderVersion.Latest.
Initializes a new instance of the class.
The conventions version to use.
Gets the conventions version.
The conventions version.
A non-generic version of which can be used when the type of entity
is not known at build time.
Represents a non-generic LINQ to Entities query against a DbContext.
An internal interface implemented by and that allows access to
the internal query without using reflection.
The underlying internal set.
Internal constructor prevents external classes deriving from DbQuery.
Throws an exception indicating that binding directly to a store query is not supported.
Instead populate a DbSet with data, for example by using the Load extension method, and
then bind to local data. For WPF bind to DbSet.Local. For Windows Forms bind to
DbSet.Local.ToBindingList().
Never returns; always throws.
Returns an which when enumerated will execute the query against the database.
The query results.
Returns an which when enumerated will execute the query against the database.
The query results.
Specifies the related objects to include in the query results.
Paths are all-inclusive. For example, if an include call indicates Include("Orders.OrderLines"), not only will
OrderLines be included, but also Orders. When you call the Include method, the query path is only valid on
the returned instance of the DbQuery<T>. Other instances of DbQuery<T> and the object context itself are not affected.
Because the Include method returns the query object, you can call this method multiple times on an DbQuery<T> to
specify multiple paths for the query.
The dot-separated list of related objects to return in the query results.
A new DbQuery<T> with the defined query path.
Returns a new query where the entities returned will not be cached in the .
A new query with NoTracking applied.
Returns a new query that will stream the results instead of buffering.
A new query with AsStreaming applied.
Returns the equivalent generic object.
The type of element for which the query was created.
The generic set object.
Returns a representation of the underlying query.
The query string.
Returns false.
false .
The IQueryable element type.
The IQueryable LINQ Expression.
The IQueryable provider.
Gets the underlying internal query object.
The internal query.
The internal query object that is backing this DbQuery
An internal interface implemented by and that allows access to
the internal set without using reflection.
The underlying internal set.
Creates an instance of a when called from the constructor of a derived
type that will be used as a test double for DbSets. Methods and properties that will be used by the
test double must be implemented by the test double except AsNoTracking, AsStreaming, an Include where
the default implementation is a no-op.
Finds an entity with the given primary key values.
If an entity with the given primary key values exists in the context, then it is
returned immediately without making a request to the store. Otherwise, a request
is made to the store for an entity with the given primary key values and this entity,
if found, is attached to the context and returned. If no entity is found in the
context or the store, then null is returned.
The ordering of composite key values is as defined in the EDM, which is in turn as defined in
the designer, by the Code First fluent API, or by the DataMember attribute.
The values of the primary key for the entity to be found.
The entity found, or null.
Thrown if multiple entities exist in the context with the primary key values given.
Thrown if the type of entity is not part of the data model for this context.
Thrown if the types of the key values do not match the types of the key values for the entity type to be found.
Thrown if the context has been disposed.
Asynchronously finds an entity with the given primary key values.
If an entity with the given primary key values exists in the context, then it is
returned immediately without making a request to the store. Otherwise, a request
is made to the store for an entity with the given primary key values and this entity,
if found, is attached to the context and returned. If no entity is found in the
context or the store, then null is returned.
The ordering of composite key values is as defined in the EDM, which is in turn as defined in
the designer, by the Code First fluent API, or by the DataMember attribute.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
The values of the primary key for the entity to be found.
A task that represents the asynchronous find operation. The task result contains the entity found, or null.
Thrown if multiple entities exist in the context with the primary key values given.
Thrown if the type of entity is not part of the data model for this context.
Thrown if the types of the key values do not match the types of the key values for the entity type to be found.
Thrown if the context has been disposed.
Asynchronously finds an entity with the given primary key values.
If an entity with the given primary key values exists in the context, then it is
returned immediately without making a request to the store. Otherwise, a request
is made to the store for an entity with the given primary key values and this entity,
if found, is attached to the context and returned. If no entity is found in the
context or the store, then null is returned.
The ordering of composite key values is as defined in the EDM, which is in turn as defined in
the designer, by the Code First fluent API, or by the DataMember attribute.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
A to observe while waiting for the task to complete.
The values of the primary key for the entity to be found.
A task that represents the asynchronous find operation. The task result contains the entity found, or null.
Thrown if multiple entities exist in the context with the primary key values given.
Thrown if the type of entity is not part of the data model for this context.
Thrown if the types of the key values do not match the types of the key values for the entity type to be found.
Thrown if the context has been disposed.
Attaches the given entity to the context underlying the set. That is, the entity is placed
into the context in the Unchanged state, just as if it had been read from the database.
The entity to attach.
The entity.
Attach is used to repopulate a context with an entity that is known to already exist in the database.
SaveChanges will therefore not attempt to insert an attached entity into the database because
it is assumed to already be there.
Note that entities that are already in the context in some other state will have their state set
to Unchanged. Attach is a no-op if the entity is already in the context in the Unchanged state.
Adds the given entity to the context underlying the set in the Added state such that it will
be inserted into the database when SaveChanges is called.
The entity to add.
The entity.
Note that entities that are already in the context in some other state will have their state set
to Added. Add is a no-op if the entity is already in the context in the Added state.
Adds the given collection of entities into context underlying the set with each entity being put into
the Added state such that it will be inserted into the database when SaveChanges is called.
The collection of entities to add.
The collection of entities.
Note that if is set to true (which is
the default), then DetectChanges will be called once before adding any entities and will not be called
again. This means that in some situations AddRange may perform significantly better than calling
Add multiple times would do.
Note that entities that are already in the context in some other state will have their state set to
Added. AddRange is a no-op for entities that are already in the context in the Added state.
Marks the given entity as Deleted such that it will be deleted from the database when SaveChanges
is called. Note that the entity must exist in the context in some other state before this method
is called.
The entity to remove.
The entity.
Note that if the entity exists in the context in the Added state, then this method
will cause it to be detached from the context. This is because an Added entity is assumed not to
exist in the database such that trying to delete it does not make sense.
Removes the given collection of entities from the context underlying the set with each entity being put into
the Deleted state such that it will be deleted from the database when SaveChanges is called.
The collection of entities to delete.
The collection of entities.
Note that if is set to true (which is
the default), then DetectChanges will be called once before delete any entities and will not be called
again. This means that in some situations RemoveRange may perform significantly better than calling
Remove multiple times would do.
Note that if any entity exists in the context in the Added state, then this method
will cause it to be detached from the context. This is because an Added entity is assumed not to
exist in the database such that trying to delete it does not make sense.
Creates a new instance of an entity for the type of this set.
Note that this instance is NOT added or attached to the set.
The instance returned will be a proxy if the underlying context is configured to create
proxies and the entity type meets the requirements for creating a proxy.
The entity instance, which may be a proxy.
Creates a new instance of an entity for the type of this set or for a type derived
from the type of this set.
Note that this instance is NOT added or attached to the set.
The instance returned will be a proxy if the underlying context is configured to create
proxies and the entity type meets the requirements for creating a proxy.
The entity instance, which may be a proxy.
Returns the equivalent generic object.
The type of entity for which the set was created.
The generic set object.
Creates a raw SQL query that will return entities in this set. By default, the
entities returned are tracked by the context; this can be changed by calling
AsNoTracking on the returned.
Note that the entities returned are always of the type for this set and never of
a derived type. If the table or tables queried may contain data for other entity
types, then the SQL query must be written appropriately to ensure that only entities of
the correct type are returned.
As with any API that accepts SQL it is important to parameterize any user input to protect against a SQL injection attack. You can include parameter place holders in the SQL query string and then supply parameter values as additional arguments. Any parameter values you supply will automatically be converted to a DbParameter.
context.Set(typeof(Blog)).SqlQuery("SELECT * FROM dbo.Posts WHERE Author = @p0", userSuppliedAuthor);
Alternatively, you can also construct a DbParameter and supply it to SqlQuery. This allows you to use named parameters in the SQL query string.
context.Set(typeof(Blog)).SqlQuery("SELECT * FROM dbo.Posts WHERE Author = @author", new SqlParameter("@author", userSuppliedAuthor));
The SQL query string.
The parameters to apply to the SQL query string.
A object that will execute the query when it is enumerated.
Gets an that represents a local view of all Added, Unchanged,
and Modified entities in this set. This local view will stay in sync as entities are added or
removed from the context. Likewise, entities added to or removed from the local view will automatically
be added to or removed from the context.
This property can be used for data binding by populating the set with data, for example by using the Load
extension method, and then binding to the local data through this property. For WPF bind to this property
directly. For Windows Forms bind to the result of calling ToBindingList on this property
The local view.
The internal IQueryable that is backing this DbQuery
Gets the underlying internal set.
The internal set.
A DbSet represents the collection of all entities in the context, or that can be queried from the
database, of a given type. DbSet objects are created from a DbContext using the DbContext.Set method.
Note that DbSet does not support MEST (Multiple Entity Sets per Type) meaning that there is always a
one-to-one correlation between a type and a set.
The type that defines the set.
Represents a LINQ to Entities query against a DbContext.
The type of entity to query for.
Creates a new query that will be backed by the given internal query object.
The backing query.
Specifies the related objects to include in the query results.
Paths are all-inclusive. For example, if an include call indicates Include("Orders.OrderLines"), not only will
OrderLines be included, but also Orders. When you call the Include method, the query path is only valid on
the returned instance of the DbQuery<T>. Other instances of DbQuery<T> and the object context itself are not affected.
Because the Include method returns the query object, you can call this method multiple times on an DbQuery<T> to
specify multiple paths for the query.
The dot-separated list of related objects to return in the query results.
A new with the defined query path.
Returns a new query where the entities returned will not be cached in the .
A new query with NoTracking applied.
Returns a new query that will stream the results instead of buffering.
A new query with AsStreaming applied.
Throws an exception indicating that binding directly to a store query is not supported.
Instead populate a DbSet with data, for example by using the Load extension method, and
then bind to local data. For WPF bind to DbSet.Local. For Windows Forms bind to
DbSet.Local.ToBindingList().
Never returns; always throws.
Returns an which when enumerated will execute the query against the database.
The query results.
Returns an which when enumerated will execute the query against the database.
The query results.
Returns an which when enumerated will execute the query against the database.
The query results.
Returns an which when enumerated will execute the query against the database.
The query results.
Returns a representation of the underlying query.
The query string.
Returns a new instance of the non-generic class for this query.
A non-generic version.
Returns false.
false .
The IQueryable element type.
The IQueryable LINQ Expression.
The IQueryable provider.
The internal query object that is backing this DbQuery
The internal query object that is backing this DbQuery
An represents the collection of all entities in the context, or that
can be queried from the database, of a given type. is a concrete
implementation of IDbSet.
was originally intended to allow creation of test doubles (mocks or
fakes) for . However, this approach has issues in that adding new members
to an interface breaks existing code that already implements the interface without the new members.
Therefore, starting with EF6, no new members will be added to this interface and it is recommended
that be used as the base class for test doubles.
The type that defines the set.
Finds an entity with the given primary key values.
If an entity with the given primary key values exists in the context, then it is
returned immediately without making a request to the store. Otherwise, a request
is made to the store for an entity with the given primary key values and this entity,
if found, is attached to the context and returned. If no entity is found in the
context or the store, then null is returned.
The ordering of composite key values is as defined in the EDM, which is in turn as defined in
the designer, by the Code First fluent API, or by the DataMember attribute.
The values of the primary key for the entity to be found.
The entity found, or null.
Adds the given entity to the context underlying the set in the Added state such that it will
be inserted into the database when SaveChanges is called.
The entity to add.
The entity.
Note that entities that are already in the context in some other state will have their state set
to Added. Add is a no-op if the entity is already in the context in the Added state.
Marks the given entity as Deleted such that it will be deleted from the database when SaveChanges
is called. Note that the entity must exist in the context in some other state before this method
is called.
The entity to remove.
The entity.
Note that if the entity exists in the context in the Added state, then this method
will cause it to be detached from the context. This is because an Added entity is assumed not to
exist in the database such that trying to delete it does not make sense.
Attaches the given entity to the context underlying the set. That is, the entity is placed
into the context in the Unchanged state, just as if it had been read from the database.
The entity to attach.
The entity.
Attach is used to repopulate a context with an entity that is known to already exist in the database.
SaveChanges will therefore not attempt to insert an attached entity into the database because
it is assumed to already be there.
Note that entities that are already in the context in some other state will have their state set
to Unchanged. Attach is a no-op if the entity is already in the context in the Unchanged state.
Creates a new instance of an entity for the type of this set.
Note that this instance is NOT added or attached to the set.
The instance returned will be a proxy if the underlying context is configured to create
proxies and the entity type meets the requirements for creating a proxy.
The entity instance, which may be a proxy.
Creates a new instance of an entity for the type of this set or for a type derived
from the type of this set.
Note that this instance is NOT added or attached to the set.
The instance returned will be a proxy if the underlying context is configured to create
proxies and the entity type meets the requirements for creating a proxy.
The type of entity to create.
The entity instance, which may be a proxy.
Gets an that represents a local view of all Added, Unchanged,
and Modified entities in this set. This local view will stay in sync as entities are added or
removed from the context. Likewise, entities added to or removed from the local view will automatically
be added to or removed from the context.
This property can be used for data binding by populating the set with data, for example by using the Load
extension method, and then binding to the local data through this property. For WPF bind to this property
directly. For Windows Forms bind to the result of calling ToBindingList on this property
The local view.
Creates a new set that will be backed by the given .
The internal set.
Creates an instance of a when called from the constructor of a derived
type that will be used as a test double for DbSets. Methods and properties that will be used by the
test double must be implemented by the test double except AsNoTracking, AsStreaming, an Include where
the default implementation is a no-op.
Finds an entity with the given primary key values.
If an entity with the given primary key values exists in the context, then it is
returned immediately without making a request to the store. Otherwise, a request
is made to the store for an entity with the given primary key values and this entity,
if found, is attached to the context and returned. If no entity is found in the
context or the store, then null is returned.
The ordering of composite key values is as defined in the EDM, which is in turn as defined in
the designer, by the Code First fluent API, or by the DataMember attribute.
The values of the primary key for the entity to be found.
The entity found, or null.
Thrown if multiple entities exist in the context with the primary key values given.
Thrown if the type of entity is not part of the data model for this context.
Thrown if the types of the key values do not match the types of the key values for the entity type to be found.
Thrown if the context has been disposed.
Asynchronously finds an entity with the given primary key values.
If an entity with the given primary key values exists in the context, then it is
returned immediately without making a request to the store. Otherwise, a request
is made to the store for an entity with the given primary key values and this entity,
if found, is attached to the context and returned. If no entity is found in the
context or the store, then null is returned.
The ordering of composite key values is as defined in the EDM, which is in turn as defined in
the designer, by the Code First fluent API, or by the DataMember attribute.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
A to observe while waiting for the task to complete.
The values of the primary key for the entity to be found.
A task that represents the asynchronous find operation. The task result contains the entity found, or null.
Thrown if multiple entities exist in the context with the primary key values given.
Thrown if the type of entity is not part of the data model for this context.
Thrown if the types of the key values do not match the types of the key values for the entity type to be found.
Thrown if the context has been disposed.
Asynchronously finds an entity with the given primary key values.
If an entity with the given primary key values exists in the context, then it is
returned immediately without making a request to the store. Otherwise, a request
is made to the store for an entity with the given primary key values and this entity,
if found, is attached to the context and returned. If no entity is found in the
context or the store, then null is returned.
The ordering of composite key values is as defined in the EDM, which is in turn as defined in
the designer, by the Code First fluent API, or by the DataMember attribute.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
The values of the primary key for the entity to be found.
A task that represents the asynchronous find operation. The task result contains the entity found, or null.
Adds the given collection of entities into context underlying the set with each entity being put into
the Added state such that it will be inserted into the database when SaveChanges is called.
The collection of entities to add.
The collection of entities.
Note that if is set to true (which is
the default), then DetectChanges will be called once before adding any entities and will not be called
again. This means that in some situations AddRange may perform significantly better than calling
Add multiple times would do.
Note that entities that are already in the context in some other state will have their state set to
Added. AddRange is a no-op for entities that are already in the context in the Added state.
Removes the given collection of entities from the context underlying the set with each entity being put into
the Deleted state such that it will be deleted from the database when SaveChanges is called.
The collection of entities to delete.
The collection of entities.
Note that if is set to true (which is
the default), then DetectChanges will be called once before delete any entities and will not be called
again. This means that in some situations RemoveRange may perform significantly better than calling
Remove multiple times would do.
Note that if any entity exists in the context in the Added state, then this method
will cause it to be detached from the context. This is because an Added entity is assumed not to
exist in the database such that trying to delete it does not make sense.
Returns the equivalent non-generic object.
The non-generic set object.
Creates a raw SQL query that will return entities in this set. By default, the
entities returned are tracked by the context; this can be changed by calling
AsNoTracking on the returned.
Note that the entities returned are always of the type for this set and never of
a derived type. If the table or tables queried may contain data for other entity
types, then the SQL query must be written appropriately to ensure that only entities of
the correct type are returned.
As with any API that accepts SQL it is important to parameterize any user input to protect against a SQL injection attack. You can include parameter place holders in the SQL query string and then supply parameter values as additional arguments. Any parameter values you supply will automatically be converted to a DbParameter.
context.Blogs.SqlQuery("SELECT * FROM dbo.Posts WHERE Author = @p0", userSuppliedAuthor);
Alternatively, you can also construct a DbParameter and supply it to SqlQuery. This allows you to use named parameters in the SQL query string.
context.Blogs.SqlQuery("SELECT * FROM dbo.Posts WHERE Author = @author", new SqlParameter("@author", userSuppliedAuthor));
The SQL query string.
The parameters to apply to the SQL query string.
A object that will execute the query when it is enumerated.
Gets the underlying internal set.
The internal set.
An implementation of IDatabaseInitializer that will always recreate and optionally re-seed the
database the first time that a context is used in the app domain.
To seed the database, create a derived class and override the Seed method.
The type of the context.
Initializes a new instance of the class.
Executes the strategy to initialize the database for the given context.
The context.
is
null
.
A method that should be overridden to actually add data to the context for seeding.
The default implementation does nothing.
The context to seed.
An implementation of IDatabaseInitializer that will DELETE, recreate, and optionally re-seed the
database only if the model has changed since the database was created.
Whether or not the model has changed is determined by the
method.
To seed the database create a derived class and override the Seed method.
Initializes a new instance of the class.
Executes the strategy to initialize the database for the given context.
The context.
is
null
.
A method that should be overridden to actually add data to the context for seeding.
The default implementation does nothing.
The context to seed.
Returned by the ChangeTracker method of to provide access to features of
the context that are related to change tracking of entities.
Initializes a new instance of the class.
The internal context.
Gets objects for all the entities tracked by this context.
The entries.
Gets objects for all the entities of the given type
tracked by this context.
The type of the entity.
The entries.
Checks if the is tracking any new, deleted, or changed entities or
relationships that will be sent to the database if is called.
Functionally, calling this method is equivalent to checking if there are any entities or
relationships in the Added, Updated, or Deleted state.
Note that this method calls unless
has been set to false.
True if underlying have changes, else false.
Detects changes made to the properties and relationships of POCO entities. Note that some types of
entity (such as change tracking proxies and entities that derive from
)
report changes automatically and a call to DetectChanges is not normally needed for these types of entities.
Also note that normally DetectChanges is called automatically by many of the methods of
and its related classes such that it is rare that this method will need to be called explicitly.
However, it may be desirable, usually for performance reasons, to turn off this automatic calling of
DetectChanges using the AutoDetectChangesEnabled flag from .
Gets the of the current instance.
The exact runtime type of the current instance.
A non-generic version of the class.
This is an abstract base class use to represent a scalar or complex property, or a navigation property
of an entity. Scalar and complex properties use the derived class ,
reference navigation properties use the derived class , and collection
navigation properties use the derived class .
Creates a from information in the given .
This method will create an instance of the appropriate subclass depending on the metadata contained
in the InternalMemberEntry instance.
The internal member entry.
The new entry.
Validates this property.
Collection of objects. Never null. If the entity is valid the collection will be empty.
Gets the of the current instance.
The exact runtime type of the current instance.
Returns the equivalent generic object.
The type of entity on which the member is declared.
The type of the property.
The equivalent generic object.
Gets the name of the property.
The property name.
Gets or sets the current value of this property.
The current value.
The to which this member belongs.
An entry for the entity that owns this member.
Gets the backing this object.
The internal member entry.
Creates a from information in the given .
Use this method in preference to the constructor since it may potentially create a subclass depending on
the type of member represented by the InternalCollectionEntry instance.
The internal collection entry.
The new entry.
Initializes a new instance of the class.
The internal entry.
Loads the collection of entities from the database.
Note that entities that already exist in the context are not overwritten with values from the database.
Asynchronously loads the collection of entities from the database.
Note that entities that already exist in the context are not overwritten with values from the database.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
A task that represents the asynchronous operation.
Asynchronously loads the collection of entities from the database.
Note that entities that already exist in the context are not overwritten with values from the database.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
A to observe while waiting for the task to complete.
A task that represents the asynchronous operation.
Returns the query that would be used to load this collection from the database.
The returned query can be modified using LINQ to perform filtering or operations in the database, such
as counting the number of entities in the collection in the database without actually loading them.
A query for the collection.
Returns the equivalent generic object.
The type of entity on which the member is declared.
The type of the collection element.
The equivalent generic object.
Gets the property name.
The property name.
Gets or sets the current value of the navigation property. The current value is
the entity that the navigation property references.
The current value.
Gets or sets a value indicating whether all entities of this collection have been loaded from the database.
Loading the related entities from the database either using lazy-loading, as part of a query, or explicitly
with one of the Load methods will set the IsLoaded flag to true.
IsLoaded can be explicitly set to true to prevent the related entities of this collection from being lazy-loaded.
This can be useful if the application has caused a subset of related entities to be loaded into this collection
and wants to prevent any other entities from being loaded automatically.
Note that explict loading using one of the Load methods will load all related entities from the database
regardless of whether or not IsLoaded is true.
When any related entity in the collection is detached the IsLoaded flag is reset to false indicating that the
not all related entities are now loaded.
true if all the related entities are loaded or the IsLoaded has been explicitly set to true; otherwise, false.
The to which this navigation property belongs.
An entry for the entity that owns this navigation property.
Gets the backing this object as an .
The internal member entry.
Instances of this class are returned from the Collection method of
and allow operations such as loading to
be performed on the an entity's collection navigation properties.
The type of the entity to which this property belongs.
The type of the element in the collection of entities.
This is an abstract base class use to represent a scalar or complex property, or a navigation property
of an entity. Scalar and complex properties use the derived class ,
reference navigation properties use the derived class , and collection
navigation properties use the derived class .
The type of the entity to which this property belongs.
The type of the property.
Creates a from information in the given
.
This method will create an instance of the appropriate subclass depending on the metadata contained
in the InternalMemberEntry instance.
The internal member entry.
The new entry.
Returns a new instance of the non-generic class for
the property represented by this object.
A non-generic version.
Validates this property.
Collection of objects. Never null. If the entity is valid the collection will be empty.
Gets the of the current instance.
The exact runtime type of the current instance.
Gets the name of the property.
The name of the property.
Gets or sets the current value of this property.
The current value.
Gets the underlying .
The internal member entry.
The to which this member belongs.
An entry for the entity that owns this member.
Creates a from information in the given
.
Use this method in preference to the constructor since it may potentially create a subclass depending on
the type of member represented by the InternalCollectionEntry instance.
The internal collection entry.
The new entry.
Initializes a new instance of the class.
The internal entry.
Loads the collection of entities from the database.
Note that entities that already exist in the context are not overwritten with values from the database.
Asynchronously loads the collection of entities from the database.
Note that entities that already exist in the context are not overwritten with values from the database.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
A task that represents the asynchronous operation.
Asynchronously loads the collection of entities from the database.
Note that entities that already exist in the context are not overwritten with values from the database.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
A to observe while waiting for the task to complete.
A task that represents the asynchronous operation.
Returns the query that would be used to load this collection from the database.
The returned query can be modified using LINQ to perform filtering or operations in the database, such
as counting the number of entities in the collection in the database without actually loading them.
A query for the collection.
Returns a new instance of the non-generic class for
the navigation property represented by this object.
A non-generic version.
Gets the property name.
The property name.
Gets or sets the current value of the navigation property. The current value is
the entity that the navigation property references.
The current value.
Gets or sets a value indicating whether all entities of this collection have been loaded from the database.
Loading the related entities from the database either using lazy-loading, as part of a query, or explicitly
with one of the Load methods will set the IsLoaded flag to true.
IsLoaded can be explicitly set to true to prevent the related entities of this collection from being lazy-loaded.
This can be useful if the application has caused a subset of related entities to be loaded into this collection
and wants to prevent any other entities from being loaded automatically.
Note that explict loading using one of the Load methods will load all related entities from the database
regardless of whether or not IsLoaded is true.
When any related entity in the collection is detached the IsLoaded flag is reset to false indicating that the
not all related entities are now loaded.
true if all the related entities are loaded or the IsLoaded has been explicitly set to true; otherwise, false.
Gets the underlying as an .
The internal member entry.
The to which this navigation property belongs.
An entry for the entity that owns this navigation property.
An immutable representation of an Entity Data Model (EDM) model that can be used to create an
or can be passed to the constructor of a .
For increased performance, instances of this type should be cached and re-used to construct contexts.
For mocking.
Creates a model for the given EDM metadata model.
The EDM metadata model.
Creates an instance of ObjectContext or class derived from ObjectContext. Note that an instance
of DbContext can be created instead by using the appropriate DbContext constructor.
If a derived ObjectContext is used, then it must have a public constructor with a single
EntityConnection parameter.
The connection passed is used by the ObjectContext created, but is not owned by the context. The caller
must dispose of the connection once the context has been disposed.
The type of context to create.
An existing connection to a database for use by the context.
Gets a cached delegate (or creates a new one) used to call the constructor for the given derived ObjectContext type.
A snapshot of the that was used to create this compiled model.
The provider info (provider name and manifest token) that was used to create this model.
Gets the default schema of the model.
The default schema of the model.
A non-generic version of the class.
A non-generic version of the class.
Creates a from information in the given .
Use this method in preference to the constructor since it may potentially create a subclass depending on
the type of member represented by the InternalCollectionEntry instance.
The internal property entry.
The new entry.
Initializes a new instance of the class.
The internal entry.
Returns the equivalent generic object.
The type of entity on which the member is declared.
The type of the property.
The equivalent generic object.
Gets the property name.
The property name.
Gets or sets the original value of this property.
The original value.
Gets or sets the current value of this property.
The current value.
Gets or sets a value indicating whether the value of this property has been modified since
it was loaded from the database.
Setting this value to false for a modified property will revert the change by setting the
current value to the original value. If the result is that no properties of the entity are
marked as modified, then the entity will be marked as Unchanged.
Setting this value to false for properties of Added, Unchanged, or Deleted entities
is a no-op.
true if this instance is modified; otherwise, false .
The to which this property belongs.
An entry for the entity that owns this property.
The of the property for which this is a nested property.
This method will only return a non-null entry for properties of complex objects; it will
return null for properties of the entity itself.
An entry for the parent complex property, or null if this is an entity property.
Gets the backing this object.
The internal member entry.
Creates a from information in the given
.
Use this method in preference to the constructor since it may potentially create a subclass depending on
the type of member represented by the InternalCollectionEntry instance.
The internal property entry.
The new entry.
Initializes a new instance of the class.
The internal entry.
Gets an object that represents a nested property of this property.
This method can be used for both scalar or complex properties.
The name of the nested property.
An object representing the nested property.
Gets an object that represents a nested complex property of this property.
The name of the nested property.
An object representing the nested property.
Returns the equivalent generic object.
The type of entity on which the member is declared.
The type of the complex property.
The equivalent generic object.
Instances of this class are returned from the ComplexProperty method of
and allow access to the state of a complex property.
The type of the entity to which this property belongs.
The type of the property.
Instances of this class are returned from the Property method of
and allow access to the state of the scalar
or complex property.
The type of the entity to which this property belongs.
The type of the property.
Creates a from information in the given
.
Use this method in preference to the constructor since it may potentially create a subclass depending on
the type of member represented by the InternalCollectionEntry instance.
The internal property entry.
The new entry.
Initializes a new instance of the class.
The internal entry.
Returns a new instance of the non-generic class for
the property represented by this object.
A non-generic version.
Gets the property name.
The property name.
Gets or sets the original value of this property.
The original value.
Gets or sets the current value of this property.
The current value.
Gets or sets a value indicating whether the value of this property has been modified since
it was loaded from the database.
true if this instance is modified; otherwise, false .
The to which this property belongs.
An entry for the entity that owns this property.
The of the property for which this is a nested property.
This method will only return a non-null entry for properties of complex objects; it will
return null for properties of the entity itself.
An entry for the parent complex property, or null if this is an entity property.
Gets the underlying as an .
The internal member entry.
Creates a from information in the given .
Use this method in preference to the constructor since it may potentially create a subclass depending on
the type of member represented by the InternalCollectionEntry instance.
The internal property entry.
The new entry.
Initializes a new instance of the class.
The internal entry.
Returns a new instance of the non-generic class for
the property represented by this object.
A non-generic version.
Gets an object that represents a nested property of this property.
This method can be used for both scalar or complex properties.
The name of the nested property.
An object representing the nested property.
Gets an object that represents a nested property of this property.
This method can be used for both scalar or complex properties.
The type of the nested property.
The name of the nested property.
An object representing the nested property.
Gets an object that represents a nested property of this property.
This method can be used for both scalar or complex properties.
The type of the nested property.
An expression representing the nested property.
An object representing the nested property.
Gets an object that represents a nested complex property of this property.
The name of the nested property.
An object representing the nested property.
Gets an object that represents a nested complex property of this property.
The type of the nested property.
The name of the nested property.
An object representing the nested property.
Gets an object that represents a nested complex property of this property.
The type of the nested property.
An expression representing the nested property.
An object representing the nested property.
Describes the origin of the database connection string associated with a .
The connection string was created by convention.
The connection string was read from external configuration.
The connection string was explicitly specified at runtime.
The connection string was overriden by connection information supplied to DbContextInfo.
Returned by the Configuration method of to provide access to configuration
options for the context.
Initializes a new instance of the class.
The internal context.
Gets the of the current instance.
The exact runtime type of the current instance.
Gets or sets a value indicating whether lazy loading of relationships exposed as
navigation properties is enabled. Lazy loading is enabled by default.
true if lazy loading is enabled; otherwise, false .
Gets or sets a value indicating whether or not the framework will create instances of
dynamically generated proxy classes whenever it creates an instance of an entity type.
Note that even if proxy creation is enabled with this flag, proxy instances will only
be created for entity types that meet the requirements for being proxied.
Proxy creation is enabled by default.
true if proxy creation is enabled; otherwise, false .
Gets or sets a value indicating whether database null semantics are exhibited when comparing
two operands, both of which are potentially nullable. The default value is false.
For example (operand1 == operand2) will be translated as:
(operand1 = operand2)
if UseDatabaseNullSemantics is true, respectively
(((operand1 = operand2) AND (NOT (operand1 IS NULL OR operand2 IS NULL))) OR ((operand1 IS NULL) AND (operand2 IS NULL)))
if UseDatabaseNullSemantics is false.
true if database null comparison behavior is enabled, otherwise false .
Gets or sets a value indicating whether the
method is called automatically by methods of and related classes.
The default value is true.
true if should be called automatically; otherwise, false.
Gets or sets a value indicating whether tracked entities should be validated automatically when
is invoked.
The default value is true.
Provides runtime information about a given type.
Creates a new instance representing a given type.
The type deriving from .
Creates a new instance representing a given targeting a specific database.
The type deriving from .
Connection information for the database to be used.
Creates a new instance representing a given type. An external list of
connection strings can be supplied and will be used during connection string resolution in place
of any connection strings specified in external configuration files.
It is preferable to use the constructor that accepts the entire config document instead of using this
constructor. Providing the entire config document allows DefaultConnectionFactroy entries in the config
to be found in addition to explicitly specified connection strings.
The type deriving from .
A collection of connection strings.
Creates a new instance representing a given type. An external config
object (e.g. app.config or web.config) can be supplied and will be used during connection string
resolution. This includes looking for connection strings and DefaultConnectionFactory entries.
The type deriving from .
An object representing the config file.
Creates a new instance representing a given , targeting a specific database.
An external config object (e.g. app.config or web.config) can be supplied and will be used during connection string
resolution. This includes looking for connection strings and DefaultConnectionFactory entries.
The type deriving from .
An object representing the config file.
Connection information for the database to be used.
Creates a new instance representing a given type. A
can be supplied in order to override the default determined provider used when constructing
the underlying EDM model.
The type deriving from .
A specifying the underlying ADO.NET provider to target.
Creates a new instance representing a given type. An external config
object (e.g. app.config or web.config) can be supplied and will be used during connection string
resolution. This includes looking for connection strings and DefaultConnectionFactory entries.
A can be supplied in order to override the default determined
provider used when constructing the underlying EDM model. This can be useful to prevent EF from
connecting to discover a manifest token.
The type deriving from .
An object representing the config file.
A specifying the underlying ADO.NET provider to target.
Called internally when a context info is needed for an existing context, which may not be constructable.
The context instance to get info from.
If instances of the underlying type can be created, returns
a new instance; otherwise returns null.
A instance.
The concrete type.
Whether or not instances of the underlying type can be created.
The connection string used by the underlying type.
The connection string name used by the underlying type.
The ADO.NET provider name of the connection used by the underlying type.
The origin of the connection string used by the underlying type.
An action to be run on the DbModelBuilder after OnModelCreating has been run on the context.
A non-generic version of the class.
Initializes a new instance of the class.
The internal entry.
Queries the database for copies of the values of the tracked entity as they currently exist in the database.
Note that changing the values in the returned dictionary will not update the values in the database.
If the entity is not found in the database then null is returned.
The store values.
Asynchronously queries the database for copies of the values of the tracked entity as they currently exist in the database.
Note that changing the values in the returned dictionary will not update the values in the database.
If the entity is not found in the database then null is returned.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
A task that represents the asynchronous operation.
The task result contains the store values.
Asynchronously queries the database for copies of the values of the tracked entity as they currently exist in the database.
Note that changing the values in the returned dictionary will not update the values in the database.
If the entity is not found in the database then null is returned.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
A to observe while waiting for the task to complete.
A task that represents the asynchronous operation.
The task result contains the store values.
Reloads the entity from the database overwriting any property values with values from the database.
The entity will be in the Unchanged state after calling this method.
Asynchronously reloads the entity from the database overwriting any property values with values from the database.
The entity will be in the Unchanged state after calling this method.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
A task that represents the asynchronous operation.
Asynchronously reloads the entity from the database overwriting any property values with values from the database.
The entity will be in the Unchanged state after calling this method.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
A to observe while waiting for the task to complete.
A task that represents the asynchronous operation.
Gets an object that represents the reference (i.e. non-collection) navigation property from this
entity to another entity.
The name of the navigation property.
An object representing the navigation property.
Gets an object that represents the collection navigation property from this
entity to a collection of related entities.
The name of the navigation property.
An object representing the navigation property.
Gets an object that represents a scalar or complex property of this entity.
The name of the property.
An object representing the property.
Gets an object that represents a complex property of this entity.
The name of the complex property.
An object representing the complex property.
Gets an object that represents a member of the entity. The runtime type of the returned object will
vary depending on what kind of member is asked for. The currently supported member types and their return
types are:
Reference navigation property: .
Collection navigation property: .
Primitive/scalar property: .
Complex property: .
The name of the member.
An object representing the member.
Returns a new instance of the generic class for the given
generic type for the tracked entity represented by this object.
Note that the type of the tracked entity must be compatible with the generic type or
an exception will be thrown.
The type of the entity.
A generic version.
Validates this instance and returns validation result.
Entity validation result. Possibly null if
method is overridden.
Determines whether the specified is equal to this instance.
Two instances are considered equal if they are both entries for
the same entity on the same .
The to compare with this instance.
true if the specified is equal to this instance; otherwise, false .
Determines whether the specified is equal to this instance.
Two instances are considered equal if they are both entries for
the same entity on the same .
The to compare with this instance.
true if the specified is equal to this instance; otherwise, false .
Returns a hash code for this instance.
A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.
Gets the of the current instance.
The exact runtime type of the current instance.
Gets the entity.
The entity.
Gets or sets the state of the entity.
The state.
Gets the current property values for the tracked entity represented by this object.
The current values.
Gets the original property values for the tracked entity represented by this object.
The original values are usually the entity's property values as they were when last queried from
the database.
The original values.
Gets InternalEntityEntry object for this DbEntityEntry instance.
Instances of this class provide access to information about and control of entities that
are being tracked by the . Use the Entity or Entities methods of
the context to obtain objects of this type.
The type of the entity.
Initializes a new instance of the class.
The internal entry.
Queries the database for copies of the values of the tracked entity as they currently exist in the database.
Note that changing the values in the returned dictionary will not update the values in the database.
If the entity is not found in the database then null is returned.
The store values.
Asynchronously queries the database for copies of the values of the tracked entity as they currently exist in the database.
Note that changing the values in the returned dictionary will not update the values in the database.
If the entity is not found in the database then null is returned.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
A task that represents the asynchronous operation.
The task result contains the store values.
Asynchronously queries the database for copies of the values of the tracked entity as they currently exist in the database.
Note that changing the values in the returned dictionary will not update the values in the database.
If the entity is not found in the database then null is returned.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
A to observe while waiting for the task to complete.
A task that represents the asynchronous operation.
The task result contains the store values.
Reloads the entity from the database overwriting any property values with values from the database.
The entity will be in the Unchanged state after calling this method.
Asynchronously reloads the entity from the database overwriting any property values with values from the database.
The entity will be in the Unchanged state after calling this method.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
A task that represents the asynchronous operation.
Asynchronously reloads the entity from the database overwriting any property values with values from the database.
The entity will be in the Unchanged state after calling this method.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
A to observe while waiting for the task to complete.
A task that represents the asynchronous operation.
Gets an object that represents the reference (i.e. non-collection) navigation property from this
entity to another entity.
The name of the navigation property.
An object representing the navigation property.
Gets an object that represents the reference (i.e. non-collection) navigation property from this
entity to another entity.
The type of the property.
The name of the navigation property.
An object representing the navigation property.
Gets an object that represents the reference (i.e. non-collection) navigation property from this
entity to another entity.
The type of the property.
An expression representing the navigation property.
An object representing the navigation property.
Gets an object that represents the collection navigation property from this
entity to a collection of related entities.
The name of the navigation property.
An object representing the navigation property.
Gets an object that represents the collection navigation property from this
entity to a collection of related entities.
The type of elements in the collection.
The name of the navigation property.
An object representing the navigation property.
Gets an object that represents the collection navigation property from this
entity to a collection of related entities.
The type of elements in the collection.
An expression representing the navigation property.
An object representing the navigation property.
Gets an object that represents a scalar or complex property of this entity.
The name of the property.
An object representing the property.
Gets an object that represents a scalar or complex property of this entity.
The type of the property.
The name of the property.
An object representing the property.
Gets an object that represents a scalar or complex property of this entity.
The type of the property.
An expression representing the property.
An object representing the property.
Gets an object that represents a complex property of this entity.
The name of the complex property.
An object representing the complex property.
Gets an object that represents a complex property of this entity.
The type of the complex property.
The name of the complex property.
An object representing the complex property.
Gets an object that represents a complex property of this entity.
The type of the complex property.
An expression representing the complex property.
An object representing the complex property.
Gets an object that represents a member of the entity. The runtime type of the returned object will
vary depending on what kind of member is asked for. The currently supported member types and their return
types are:
Reference navigation property: .
Collection navigation property: .
Primitive/scalar property: .
Complex property: .
The name of the member.
An object representing the member.
Gets an object that represents a member of the entity. The runtime type of the returned object will
vary depending on what kind of member is asked for. The currently supported member types and their return
types are:
Reference navigation property: .
Collection navigation property: .
Primitive/scalar property: .
Complex property: .
The type of the member.
The name of the member.
An object representing the member.
Returns a new instance of the non-generic class for
the tracked entity represented by this object.
A non-generic version.
Validates this instance and returns validation result.
Entity validation result. Possibly null if
method is overridden.
Determines whether the specified is equal to this instance.
Two instances are considered equal if they are both entries for
the same entity on the same .
The to compare with this instance.
true if the specified is equal to this instance; otherwise, false .
Determines whether the specified is equal to this instance.
Two instances are considered equal if they are both entries for
the same entity on the same .
The to compare with this instance.
true if the specified is equal to this instance; otherwise, false .
Returns a hash code for this instance.
A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.
Gets the of the current instance.
The exact runtime type of the current instance.
Gets the entity.
The entity.
Gets or sets the state of the entity.
The state.
Gets the current property values for the tracked entity represented by this object.
The current values.
Gets the original property values for the tracked entity represented by this object.
The original values are usually the entity's property values as they were when last queried from
the database.
The original values.
Represents an Entity Data Model (EDM) created by the .
The Compile method can be used to go from this EDM representation to a
which is a compiled snapshot of the model suitable for caching and creation of
or instances.
Initializes a new instance of the class.
For test purpose only.
Creates a for this mode which is a compiled snapshot
suitable for caching and creation of instances.
The compiled model.
Gets the provider information.
Gets the provider manifest.
A snapshot of the that was used to create this compiled model.
A collection of all the properties for an underlying entity or complex object.
An instance of this class can be converted to an instance of the generic class
using the Cast method.
Complex properties in the underlying entity or complex object are represented in
the property values as nested instances of this class.
Initializes a new instance of the class.
The internal dictionary.
Creates an object of the underlying type for this dictionary and hydrates it with property
values from this dictionary.
The properties of this dictionary copied into a new object.
Sets the values of this dictionary by reading values out of the given object.
The given object can be of any type. Any property on the object with a name that
matches a property name in the dictionary and can be read will be read. Other
properties will be ignored. This allows, for example, copying of properties from
simple Data Transfer Objects (DTOs).
The object to read values from.
Creates a new dictionary containing copies of all the properties in this dictionary.
Changes made to the new dictionary will not be reflected in this dictionary and vice versa.
A clone of this dictionary.
Sets the values of this dictionary by reading values from another dictionary.
The other dictionary must be based on the same type as this dictionary, or a type derived
from the type for this dictionary.
The dictionary to read values from.
Gets the value of the property just like using the indexed property getter but
typed to the type of the generic parameter. This is useful especially with
nested dictionaries to avoid writing expressions with lots of casts.
The type of the property.
Name of the property.
The value of the property.
Gets the of the current instance.
The exact runtime type of the current instance.
Gets the set of names of all properties in this dictionary as a read-only set.
The property names.
Gets or sets the value of the property with the specified property name.
The value may be a nested instance of this class.
The property name.
The value of the property.
Gets the internal dictionary.
The internal dictionary.
Groups a pair of strings that identify a provider and server version together into a single object.
Instances of this class act as the key for resolving a for a specific
provider from a . This is typically used when registering spatial services
in or when the spatial services specific to a provider is
resolved by an implementation of .
Creates a new object for a given provider invariant name and manifest token.
A string that identifies that provider. For example, the SQL Server
provider uses the string "System.Data.SqlCient".
A string that identifies that version of the database server being used. For example, the SQL Server
provider uses the string "2008" for SQL Server 2008. This cannot be null but may be empty.
The manifest token is sometimes referred to as a version hint.
A string that identifies that provider. For example, the SQL Server
provider uses the string "System.Data.SqlCient".
A string that identifies that version of the database server being used. For example, the SQL Server
provider uses the string "2008" for SQL Server 2008. This cannot be null but may be empty.
A non-generic version of the class.
Creates a from information in the given .
Use this method in preference to the constructor since it may potentially create a subclass depending on
the type of member represented by the InternalCollectionEntry instance.
The internal reference entry.
The new entry.
Initializes a new instance of the class.
The internal entry.
Loads the entity from the database.
Note that if the entity already exists in the context, then it will not overwritten with values from the database.
Asynchronously loads the entity from the database.
Note that if the entity already exists in the context, then it will not overwritten with values from the database.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
A task that represents the asynchronous operation.
Asynchronously loads the entity from the database.
Note that if the entity already exists in the context, then it will not overwritten with values from the database.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
A to observe while waiting for the task to complete.
A task that represents the asynchronous operation.
Returns the query that would be used to load this entity from the database.
The returned query can be modified using LINQ to perform filtering or operations in the database.
A query for the entity.
Returns the equivalent generic object.
The type of entity on which the member is declared.
The type of the property.
The equivalent generic object.
Gets the property name.
The property name.
Gets or sets the current value of the navigation property. The current value is
the entity that the navigation property references.
The current value.
Gets or sets a value indicating whether the entity has been loaded from the database.
Loading the related entity from the database either using lazy-loading, as part of a query, or explicitly
with one of the Load methods will set the IsLoaded flag to true.
IsLoaded can be explicitly set to true to prevent the related entity from being lazy-loaded.
Note that explict loading using one of the Load methods will load the related entity from the database
regardless of whether or not IsLoaded is true.
When a related entity is detached the IsLoaded flag is reset to false indicating that the related entity is
no longer loaded.
true if the entity is loaded or the IsLoaded has been explicitly set to true; otherwise, false.
The to which this navigation property belongs.
An entry for the entity that owns this navigation property.
Gets the backing this object as an .
The internal member entry.
Instances of this class are returned from the Reference method of
and allow operations such as loading to
be performed on the an entity's reference navigation properties.
The type of the entity to which this property belongs.
The type of the property.
Creates a from information in the given
.
Use this method in preference to the constructor since it may potentially create a subclass depending on
the type of member represented by the InternalCollectionEntry instance.
The internal reference entry.
The new entry.
Initializes a new instance of the class.
The internal entry.
Loads the entity from the database.
Note that if the entity already exists in the context, then it will not overwritten with values from the database.
Asynchronously loads the entity from the database.
Note that if the entity already exists in the context, then it will not overwritten with values from the database.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
A task that represents the asynchronous operation.
Asynchronously loads the entity from the database.
Note that if the entity already exists in the context, then it will not overwritten with values from the database.
Multiple active operations on the same context instance are not supported. Use 'await' to ensure
that any asynchronous operations have completed before calling another method on this context.
A to observe while waiting for the task to complete.
A task that represents the asynchronous operation.
Returns the query that would be used to load this entity from the database.
The returned query can be modified using LINQ to perform filtering or operations in the database.
A query for the entity.
Returns a new instance of the non-generic class for
the navigation property represented by this object.
A non-generic version.
Gets the property name.
The property name.
Gets or sets the current value of the navigation property. The current value is
the entity that the navigation property references.
The current value.
Gets or sets a value indicating whether the entity has been loaded from the database.
Loading the related entity from the database either using lazy-loading, as part of a query, or explicitly
with one of the Load methods will set the IsLoaded flag to true.
IsLoaded can be explicitly set to true to prevent the related entity from being lazy-loaded.
Note that explict loading using one of the Load methods will load the related entity from the database
regardless of whether or not IsLoaded is true.
When a related entity is detached the IsLoaded flag is reset to false indicating that the related entity is
no longer loaded.
true if the entity is loaded or the IsLoaded has been explicitly set to true; otherwise, false.
Gets the underlying as an .
The internal member entry.
The to which this navigation property belongs.
An entry for the entity that owns this navigation property.
Exception thrown by when it was expected that SaveChanges for an entity would
result in a database update but in fact no rows in the database were affected. This usually indicates
that the database has been concurrently updated such that a concurrency token that was expected to match
did not actually match.
Note that state entries referenced by this exception are not serialized due to security and accesses to
the state entries after serialization will return null.
Exception thrown by when the saving of changes to the database fails.
Note that state entries referenced by this exception are not serialized due to security and accesses to the
state entries after serialization will return null.
Initializes a new instance of the class.
The internal context.
The inner exception.
Initializes a new instance of the class.
Initializes a new instance of the class.
The message.
Initializes a new instance of the class.
The message.
The inner exception.
Subscribes the SerializeObjectState event.
Gets objects that represents the entities that could not
be saved to the database.
The entries representing the entities that could not be saved.
Holds exception state that will be serialized when the exception is serialized.
Completes the deserialization.
The deserialized object.
Gets or sets a value indicating whether the exception involved independent associations.
Initializes a new instance of the class.
The context.
The inner exception.
Initializes a new instance of the class.
Initializes a new instance of the class.
The message.
Initializes a new instance of the class.
The message.
The inner exception.
Represents an entity used to store metadata about an EDM in the database.
Attempts to get the model hash calculated by Code First for the given context.
This method will return null if the context is not being used in Code First mode.
The context.
The hash string.
Gets or sets the ID of the metadata entity, which is currently always 1.
The id.
Gets or sets the model hash which is used to check whether the model has
changed since the database was created from it.
The model hash.
Contains methods used to access the Entity Data Model created by Code First in the EDMX form.
These methods are typically used for debugging when there is a need to look at the model that
Code First creates internally.
Uses Code First with the given context and writes the resulting Entity Data Model to the given
writer in EDMX form. This method can only be used with context instances that use Code First
and create the model internally. The method cannot be used for contexts created using Database
First or Model First, for contexts created using a pre-existing , or
for contexts created using a pre-existing .
The context.
The writer.
Writes the Entity Data Model represented by the given to the
given writer in EDMX form.
An object representing the EDM.
The writer.
A factory for creating derived instances. Implement this
interface to enable design-time services for context types that do not have a
public default constructor.
At design-time, derived instances can be created in order to enable specific
design-time experiences such as model rendering, DDL generation etc. To enable design-time instantiation
for derived types that do not have a public, default constructor, implement
this interface. Design-time services will auto-discover implementations of this interface that are in the
same assembly as the derived type.
Creates a new instance of a derived type.
An instance of TContext
This convention causes DbModelBuilder to include metadata about the model
when it builds the model. When creates a model by convention it will
add this convention to the list of those used by the DbModelBuilder. This will then result in
model metadata being written to the database if the DbContext is used to create the database.
This can then be used as a quick check to see if the model has changed since the last time it was
used against the database.
This convention can be removed from the conventions by overriding
the OnModelCreating method on a derived DbContext class.
Adds metadata to the given model configuration.
The model configuration.
This convention uses the name of the derived
class as the container for the conceptual model built by
Code First.
Initializes a new instance of the class.
The model container name.
Applies the convention to the given model.
The container to apply the convention to.
The model.
This convention uses the namespace of the derived
class as the namespace of the conceptual model built by
Code First.
Initializes a new instance of the class.
The model namespace.
Instances of this class are used internally to create constant expressions for
that are inserted into the expression tree to replace references to
and .
The type of the element.
Private constructor called by the Create factory method.
The query.
Factory method called by CreateDelegate to create an instance of this class.
The query, which must be a generic object of the expected type.
A new instance.
The public property expected in the LINQ expression tree.
The query.
Instances of this class are used to create DbConnection objects for
SQL Server Compact Edition based on a given database name or connection string.
It is necessary to provide the provider invariant name of the SQL Server Compact
Edition to use when creating an instance of this class. This is because different
versions of SQL Server Compact Editions use different invariant names.
An instance of this class can be set on the class to
cause all DbContexts created with no connection information or just a database
name or connection string to use SQL Server Compact Edition by default.
This class is immutable since multiple threads may access instances simultaneously
when creating connections.
Creates a new connection factory with empty (default) DatabaseDirectory and BaseConnectionString
properties.
The provider invariant name that specifies the version of SQL Server Compact Edition that should be used.
Creates a new connection factory with the given DatabaseDirectory and BaseConnectionString properties.
The provider invariant name that specifies the version of SQL Server Compact Edition that should be used.
The path to prepend to the database name that will form the file name used by SQL Server Compact Edition when it creates or reads the database file. An empty string means that SQL Server Compact Edition will use its default for the database file location.
The connection string to use for options to the database other than the 'Data Source'. The Data Source will be prepended to this string based on the database name when CreateConnection is called.
Creates a connection for SQL Server Compact Edition based on the given database name or connection string.
If the given string contains an '=' character then it is treated as a full connection string,
otherwise it is treated as a database name only.
The database name or connection string.
An initialized DbConnection.
The path to prepend to the database name that will form the file name used by
SQL Server Compact Edition when it creates or reads the database file.
The default value is "|DataDirectory|", which means the file will be placed
in the designated data directory.
The connection string to use for options to the database other than the 'Data Source'.
The Data Source will be prepended to this string based on the database name when
CreateConnection is called.
The default is the empty string, which means no other options will be used.
The provider invariant name that specifies the version of SQL Server Compact Edition
that should be used.
Instances of this class are used to create DbConnection objects for
SQL Server based on a given database name or connection string. By default, the connection is
made to '.\SQLEXPRESS'. This can be changed by changing the base connection
string when constructing a factory instance.
An instance of this class can be set on the class to
cause all DbContexts created with no connection information or just a database
name or connection string to use SQL Server by default.
This class is immutable since multiple threads may access instances simultaneously
when creating connections.
Creates a new connection factory with a default BaseConnectionString property of
'Data Source=.\SQLEXPRESS; Integrated Security=True; MultipleActiveResultSets=True;'.
Creates a new connection factory with the given BaseConnectionString property.
The connection string to use for options to the database other than the 'Initial Catalog'. The 'Initial Catalog' will be prepended to this string based on the database name when CreateConnection is called.
Creates a connection for SQL Server based on the given database name or connection string.
If the given string contains an '=' character then it is treated as a full connection string,
otherwise it is treated as a database name only.
The database name or connection string.
An initialized DbConnection.
Remove hard dependency on DbProviderFactories.
The connection string to use for options to the database other than the 'Initial Catalog'.
The 'Initial Catalog' will be prepended to this string based on the database name when
CreateConnection is called.
The default is 'Data Source=.\SQLEXPRESS; Integrated Security=True;'.
This attribute can be applied to either an entire derived class or to
individual or properties on that class. When applied
any discovered or properties will still be included
in the model but will not be automatically initialized.
Thrown when a context is generated from the templates in Database First or Model
First mode and is then used in Code First mode.
Code generated using the T4 templates provided for Database First and Model First use may not work
correctly if used in Code First mode. To use these classes with Code First please add any additional
configuration using attributes or the DbModelBuilder API and then remove the code that throws this
exception.
Initializes a new instance of the class.
Initializes a new instance of the class.
The object that holds the serialized object data.
The contextual information about the source or destination.
Initializes a new instance of the class.
The message.
Initializes a new instance of the class.
The message.
The inner exception.
Implements ICachedMetadataWorkspace for a Code First model.
Represents an object that holds a cached copy of a MetadataWorkspace and optionally the
assemblies containing entity types to use with that workspace.
Gets the MetadataWorkspace, potentially lazily creating it if it does not already exist.
If the workspace is not compatible with the provider manifest obtained from the given
connection then an exception is thrown.
The connection to use to create or check SSDL provider info.
The workspace.
The list of assemblies that contain entity types for this workspace, which may be empty, but
will never be null.
The default container name for code first is the container name that is set from the DbModelBuilder
The provider info used to construct the workspace.
Builds and stores the workspace based on the given code first configuration.
The code first EDM model.
Gets the .
If the workspace is not compatible with the provider manifest obtained from the given
connection then an exception is thrown.
The connection to use to create or check SSDL provider info.
The workspace.
The default container name for code first is the container name that is set from the DbModelBuilder
The list of assemblies that contain entity types for this workspace, which may be empty, but
will never be null.
The provider info used to construct the workspace.
The methods here are called from multiple places with an ObjectContext that may have
been created in a variety of ways and ensure that the same code is run regardless of
how the context was created.
Used a delegate to do the actual creation once an ObjectContext has been obtained.
This is factored in this way so that we do the same thing regardless of how we get to
having an ObjectContext.
Note however that a context obtained from only a connection will have no model and so
will result in an empty database.
Used a delegate to do the actual existence check once an ObjectContext has been obtained.
This is factored in this way so that we do the same thing regardless of how we get to
having an ObjectContext.
Used a delegate to do the actual check/delete once an ObjectContext has been obtained.
This is factored in this way so that we do the same thing regardless of how we get to
having an ObjectContext.
Helper class that extends Tuple to give the Item1 and Item2 properties more meaningful names.
Creates a new pair of the given set of entity types and DbSet initializer delegate.
The entity types part of the pair.
The DbSet properties initializer part of the pair.
Static helper methods only.
Given two key values that may or may not be byte arrays, this method determines
whether or not they are equal. For non-binary key values, this is equivalent
to Object.Equals. For binary keys, it is by comparison of every byte in the
arrays.
Given two property values this method determines whether the scalar property values are equal
and whether the complex property values are the same.
Provides a standard helper method for quoting identifiers
Identifier to be quoted. Does not validate that this identifier is valid.
Quoted string
Checks the given string which might be a database name or a connection string and determines
whether it should be treated as a name or connection string. Currently, the test is simply
whether or not the string contains an '=' character--if it does, then it should be treated
as a connection string.
The name or connection string.
true if the string should be treated as a connection string; false if it should be treated as a name.
Determines whether the given string should be treated as a database name directly (it contains no '='),
is in the form name=foo, or is some other connection string. If it is a direct name or has name=, then
the name is extracted and the method returns true.
The name or connection string.
The name.
True if a name is found; false otherwise.
Determines whether the given string is a full EF connection string with provider, provider connection string,
and metadata parts, or is is instead some other form of connection string.
The name or connection string.
true if the given string is an EF connection string; otherwise, false .
Parses a property selector expression used for the expression-based versions of the Property, Collection, Reference,
etc methods on and
classes.
The type of the entity.
The type of the property.
The property.
Name of the method.
Name of the param.
The property name.
Called recursively to parse an expression tree representing a property path such
as can be passed to Include or the Reference/Collection/Property methods of .
This involves parsing simple property accesses like o => o.Products as well as calls to Select like
o => o.Products.Select(p => p.OrderLines).
The expression to parse.
The expression parsed into an include path, or null if the expression did not match.
True if matching succeeded; false if the expression could not be parsed.
Gets a cached dictionary mapping property names to property types for all the properties
in the given type.
Gets a dictionary of compiled property setter delegates for the underlying types.
The dictionary is cached for the type in the app domain.
Used by the property setter delegates to throw for attempts to set null onto
non-nullable properties or otherwise go ahead and set the property.
Gets a dictionary of compiled property getter delegates for the underlying types.
The dictionary is cached for the type in the app domain.
Creates a new with the NoTracking merge option applied.
The query object passed in is not changed.
The query.
A new query with NoTracking applied.
Returns a new query that will stream the results instead of buffering.
The query object passed in is not changed.
The query.
A new query with AsStreaming applied.
Converts to
Name of the property being validated with ValidationAttributes. Null for type-level validation.
ValidationResults instances to be converted to instances.
An created based on the .
class contains a property with names of properties the error applies to.
On the other hand each applies at most to a single property. As a result for
each name in ValidationResult.MemberNames one will be created (with some
exceptions for special cases like null or empty .MemberNames or null names in the .MemberNames).
Calculates a "path" to a property. For primitive properties on an entity type it is just the
name of the property. Otherwise it is a dot separated list of names of the property and all
its ancestor properties starting from the entity.
Property for which to calculate the path.
Dot separated path to the property.
Gets names of the property and its ancestor properties as enumerable walking "bottom-up".
Property for which to get the segments.
Names of the property and its ancestor properties.
Gets an type for the given element type.
Type of the element.
The collection type.
Creates a database name given a type derived from DbContext. This handles nested and
generic classes. No attempt is made to ensure that the name is not too long since this
is provider specific. If a too long name is generated then the provider will throw and
the user must correct by specifying their own name in the DbContext constructor.
Type of the context.
The database name to use.
A local (in-memory) view of the entities in a DbSet.
This view contains Added entities and does not contain Deleted entities. The view extends
from and hooks up events between the collection and the
state manager to keep the view in sync.
The type of the entity.
Initializes a new instance of the class for entities
of the given generic type in the given internal context.
The internal context.
Called by the base class when the collection changes.
This method looks at the change made to the collection and reflects those changes in the
state manager.
The instance containing the event data.
Handles events from the state manager for entities entering, leaving, or being marked as deleted.
The local view is kept in sync with these changes.
The sender.
The instance containing the event data.
Clears the items by calling remove on each item such that we get Remove events that
can be tracked back to the state manager, rather than a single Reset event that we
cannot deal with.
Adds a contains check to the base implementation of InsertItem since we can't support
duplicate entities in the set.
The index at which to insert.
The item to insert.
Determines whether an entity is in the set.
true if is found in the set; otherwise, false.
The entity to locate in the set. The value can be null.
Removes the first occurrence of a specific entity object from the set.
true if is successfully removed; otherwise, false.
This method also returns false if was not found in the set.
The entity to remove from the set. The value can be null.
Returns a cached binding list implementation backed by this ObservableCollection.
The binding list.
Service used to search for instance properties on a DbContext class that can
be assigned a DbSet instance. Also, if the the property has a public setter,
then a delegate is compiled to set the property to a new instance of DbSet.
All of this information is cached per app domain.
Creates a set discovery service for the given derived context.
Processes the given context type to determine the DbSet or IDbSet
properties and collect root entity types from those properties. Also, delegates are
created to initialize any of these properties that have public setters.
If the type has been processed previously in the app domain, then all this information
is returned from a cache.
A dictionary of potential entity type to the list of the names of the properties that used the type.
Calls the public setter on any property found to initialize it to a new instance of DbSet.
Registers the entities and their entity set name hints with the given .
The model builder.
Returns false if SuppressDbSetInitializationAttribute is found on the property or the class, otherwise
returns true.
Determines whether or not an instance of DbSet/ObjectSet can be assigned to a property of the given type.
The type to check.
The entity type of the DbSet/ObjectSet that can be assigned, or null if no set type can be assigned.
Given a type that might be an IDbSet\IObjectSet, determine if the type implements IDbSet<>\IObjectSet<>, and if
so return the element type of the IDbSet\IObjectSet. Currently, if the collection implements IDbSet<>\IObjectSet<>
multiple times with different types, then we will return false since this is not supported.
The type to check.
The element type of the IDbSet\IObjectSet, or null if the type does not match.
A EagerInternalConnection object wraps an already existing DbConnection object.
InternalConnection objects manage DbConnections.
Two concrete base classes of this abstract interface exist:
and .
IInternalConnection objects manage DbConnections.
Two concrete implementations of this interface exist--LazyInternalConnection and EagerInternalConnection.
Creates an from metadata in the connection. This method must
only be called if ConnectionHasModel returns true.
The newly created context.
Returns the underlying DbConnection.
Returns a key consisting of the connection type and connection string.
If this is an EntityConnection then the metadata path is included in the key returned.
Gets a value indicating whether the connection is an EF connection which therefore contains
metadata specifying the model, or instead is a store connection, in which case it contains no
model info.
true if the connection contains model info; otherwise, false .
Returns the origin of the underlying connection string.
Gets or sets an object representing a config file used for looking for DefaultConnectionFactory entries
and connection strins.
Gets or sets the provider to be used when creating the underlying connection.
Gets the name of the underlying connection string.
Gets the original connection string.
Creates an from metadata in the connection. This method must
only be called if ConnectionHasModel returns true.
The newly created context.
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Called after the connection is initialized for the first time.
Returns the underlying DbConnection.
Returns a key consisting of the connection type and connection string.
If this is an EntityConnection then the metadata path is included in the key returned.
Gets a value indicating whether the connection is an EF connection which therefore contains
metadata specifying the model, or instead is a store connection, in which case it contains no
model info.
true if the connection contains model info; otherwise, false .
Returns the origin of the underlying connection string.
Gets or sets an object representing a config file used for looking for DefaultConnectionFactory entries
and connection strins.
Gets or sets the provider to be used when creating the underlying connection.
Gets the name of the underlying connection string.
Gets the original connection string.
Gets or sets the underlying object. No initialization is done when the
connection is obtained, and it can also be set to null.
The underlying connection.
Creates a new EagerInternalConnection that wraps an existing DbConnection.
An existing connection.
If set to true then the underlying connection should be disposed when this object is disposed.
Dispose the existing connection is the original caller has specified that it should be disposed
by the framework.
Returns the origin of the underlying connection string.
An is an where the
instance that it wraps is set immediately at construction time rather than being created lazily. In this case
the internal context may or may not own the instance but will only dispose it
if it does own it.
An underlies every instance of and wraps an
instance.
The also acts to expose necessary information to other parts of the design in a
controlled manner without adding a lot of internal methods and properties to the
class itself.
Two concrete classes derive from this abstract class - and
.
Returns the underlying without causing the underlying database to be created
or the database initialization strategy to be executed.
This is used to get a context that can then be used for database creation/initialization.
Returns the underlying without causing the underlying database to be created
or the database initialization strategy to be executed.
This is used to get a context that can then be used for database creation/initialization.
Creates a new temporary based on the same metadata and connection as the real
and sets it as the context to use DisposeTempObjectContext is called.
This allows this internal context and its DbContext to be used for transient operations
such as initializing and seeding the database, after which it can be thrown away.
This isolates the real from any changes made and and saves performed.
If a temporary ObjectContext was set with UseTempObjectContext, then this method disposes that context
and returns this internal context and its DbContext to using the real ObjectContext.
Called by methods of to create a database either using the Migrations pipeline
if possible and the core provider otherwise.
The context to use for core provider calls.
Internal implementation of .
True if the model hash in the context and the database match; false otherwise.
Checks whether the given model (an EDMX document) matches the current model.
Queries the database for a model hash and returns it if found or returns null if the table
or the row doesn't exist in the database.
The model hash, or null if not found.
Queries the database for a model stored in the MigrationHistory table and returns it as an EDMX, or returns
null if the database does not contain a model.
Saves the model hash from the context to the database.
Performs the initialization action that may result in a and
handle the exception to provide more meaning to the user.
The action.
Registers for the ObjectStateManagerChanged event on the underlying ObjectStateManager.
This is a virtual method on this class so that it can be mocked.
The event handler.
Checks whether or not the given object is in the context in any state other than Deleted.
This is a virtual method on this class so that it can be mocked.
The entity.
true if the entity is in the context and not deleted; otherwise false .
Saves all changes made in this context to the underlying database.
The number of objects written to the underlying database.
Initializes this instance, which means both the context is initialized and the underlying
database is initialized.
Initializes the underlying ObjectContext but does not cause the database to be initialized.
Marks the database as having not been initialized. This is called when the app calls Database.Delete so
that the database if the app attempts to then use the database again it will be re-initialized automatically.
Runs the unless it has already been run or there
is no initializer for this context type in which case this method does nothing.
Marks the database as having been initialized without actually running the
.
Runs the if one has been set for this context type.
Calling this method will always cause the initializer to run even if the database is marked
as initialized.
Disposes the context. Override the DisposeContext method to perform
additional work when disposing.
Performs additional work to dispose a context.
Calls DetectChanges on the underlying if AutoDetectChangesEnabled is
true or if force is set to true.
if set to true then DetectChanges is called regardless of the value of AutoDetectChangesEnabled.
Returns the DbSet instance for the given entity type.
This property is virtual and returns to that it can be mocked.
The entity type for which a set should be returned.
A set for the given entity type.
Returns the non-generic instance for the given entity type.
This property is virtual and returns to that it can be mocked.
The entity type for which a set should be returned.
A set for the given entity type.
Creates an internal set using an app domain cached delegate.
Type of the entity.
The set.
Returns the entity set and the base type for that entity set for the given type.
This method does o-space loading if required and throws if the type is not in the model.
The entity type to lookup.
The entity set and base type pair.
Returns the entity set and the base type for that entity set for the given type if that
type is mapped in the model, otherwise returns null.
This method does o-space loading if required.
The entity type to lookup.
The entity set and base type pair, or null if not found.
Checks whether or not the given entity type is mapped in the model.
The entity type to lookup.
True if the type is mapped as an entity; false otherwise.
Gets the local entities of the type specified from the state manager. That is, all
Added, Modified, and Unchanged entities of the given type.
The type of entity to get.
The entities.
Returns an which when enumerated will execute the given SQL query against the
database backing this context. The results are not materialized as entities or tracked.
The type of the element.
The SQL.
Whether the query is streaming or buffering.
The parameters.
The query results.
Returns an which when enumerated will execute the given SQL query against the
database backing this context. The results are not materialized as entities or tracked.
The type of the element.
The SQL.
Whether the query is streaming or buffering.
The parameters.
Task containing the query results.
Returns an which when enumerated will execute the given SQL query against the
database backing this context. The results are not materialized as entities or tracked.
Type of the element.
The SQL.
Whether the query is streaming or buffering.
The parameters.
The query results.
Calls the generic ExecuteSqlQuery but with a non-generic return type so that it
has the correct signature to be used with CreateDelegate above.
Returns an which when enumerated will execute the given SQL query against the
database backing this context. The results are not materialized as entities or tracked.
Type of the element.
The SQL.
Whether the query is streaming or buffering.
The parameters.
The query results.
Calls the generic ExecuteSqlQueryAsync but with an object return type so that it
has the correct signature to be used with CreateDelegate above.
Executes the given SQL command against the database backing this context.
Controls the creation of a transaction for this command.
The SQL.
The parameters.
The return value from the database.
An asynchronous version of ExecuteSqlCommand, which
executes the given SQL command against the database backing this context.
Controls the creation of a transaction for this command.
The SQL.
The token to monitor for cancellation requests.
The parameters.
A Task containing the return value from the database.
Gets the underlying for the given entity, or returns null if the entity isn't tracked by this context.
This method is virtual so that it can be mocked.
The entity.
The state entry or null.
Gets the underlying objects for all entities tracked by
this context.
This method is virtual so that it can be mocked.
State entries for all tracked entities.
Gets the underlying objects for all entities of the given
type tracked by this context.
This method is virtual so that it can be mocked.
The type of the entity.
State entries for all tracked entities of the given type.
Helper method that gets the underlying objects for all entities that
match the given predicate.
Wraps the given in either a or
a depending on the actual exception type and the state
entries involved.
The update exception.
A new exception wrapping the given exception.
Uses the underlying context to create an entity such that if the context is configured
to create proxies and the entity is suitable then a proxy instance will be returned.
This method is virtual so that it can be mocked.
The type of the entity.
The new entity instance.
Uses the underlying context to create an entity such that if the context is configured
to create proxies and the entity is suitable then a proxy instance will be returned.
This method is virtual so that it can be mocked.
The type of entity to create.
The new entity instance.
This method is used by CreateDelegate to transform the CreateObject method with return type TEntity
into a method with return type object which matches the required type of the delegate.
Replaces the connection that will be used by this context.
The connection can only be changed before the context is initialized.
The new connection.
Throws if the context has been disposed.
Checks whether or not the internal cache of types to entity sets has been initialized,
and initializes it if necessary.
Forces all DbSets to be initialized, which in turn causes o-space loading to happen
for any entity type for which we have a DbSet. This includes all DbSets that were
discovered on the user's DbContext type.
Performs o-space loading for the type and returns false if the type is not in the model.
Performs o-space loading for the type and throws if the type is not in the model.
Type of the entity.
Returns true if the given entity type does not have EdmEntityTypeAttribute but is in
an assembly that has EdmSchemaAttribute. This indicates mixing of POCO and EOCO in the
same assembly, which is something that we don't support.
Determines whether or not the given clrType is mapped to a complex type. Assumes o-space loading has happened.
Updates the cache of types to entity sets either for the first time or after potentially
doing some o-space loading.
The public context instance that owns this internal context.
Returns the underlying .
Gets the temp object context, or null if none has been set.
The temp object context.
The compiled model created from the Code First pipeline, or null if Code First was
not used to create this context.
Causes the Code First pipeline to be run to create the model if it has not already been
created.
Set to true when a database initializer is performing some actions, such as creating or deleting
a database, or seeding the database.
Gets the default database initializer to use for this context if no other has been registered.
For code first this property returns a instance.
For database/model first, this property returns null.
The default initializer.
Gets or sets a value indicating whether lazy loading is enabled.
Gets or sets a value indicating whether proxy creation is enabled.
Gets or sets a value indicating whether database null comparison behavior is enabled.
Gets or sets a value indicating whether DetectChanges is called automatically in the API.
Gets or sets a value indicating whether to validate entities when is called.
True if the context has been disposed.
The connection underlying this context. Accessing this property does not cause the context
to be initialized, only its connection.
The connection string as originally applied to the context. This is used to perform operations
that need the connection string in a non-mutated form, such as with security info still intact.
Returns the origin of the underlying connection string.
Gets or sets an object representing a config file used for looking for DefaultConnectionFactory entries,
database intializers and connection strings.
Gets or sets the provider details to be used when building the EDM model.
Gets the name of the underlying connection string.
Gets the provider name being used either using a cached value or getting it from
the DbConnection in use.
Gets or sets a custom OnModelCreating action.
Gets the DatabaseOperations instance to use to perform Create/Delete/Exists operations
against the database.
Note that this virtual property can be mocked to help with unit testing.
Gets instance used to create validators and validation contexts.
This property is virtual to allow mocking.
This is the default context key that is used by database initializers if no Migrations
configuration is found.
This is either the or if a Migrations configuration is
discovered then it is the context key from the discovered configuration.
For mocking.
Constructs an for an already existing .
The owner .
The existing .
Returns the underlying without causing the underlying database to be created
or the database initialization strategy to be executed.
This is used to get a context that can then be used for database creation/initialization.
Does nothing, since the already exists.
Does nothing since the database is always considered initialized if the was created
from an existing .
Does nothing since the database is always considered initialized if the was created
from an existing .
Does nothing since the database is always considered initialized if the was created
from an existing .
Disposes the context. The underlying is also disposed if it is owned.
Returns the underlying .
The actually being used, which may be the
temp context for initialization or the real context.
Gets the default database initializer to use for this context if no other has been registered.
For code first this property returns a instance.
For database/model first, this property returns null.
The default initializer.
The connection underlying this context.
The connection string as originally applied to the context. This is used to perform operations
that need the connection string in a non-mutated form, such as with security info still intact.
Returns the origin of the underlying connection string.
Gets or sets a value indicating whether lazy loading is enabled. This is just a wrapper
over the same flag in the underlying .
Gets or sets a value indicating whether proxy creation is enabled. This is just a wrapper
over the same flag in the underlying ObjectContext.
Gets or sets a value indicating whether C# null comparison behavior is enabled. This is just a wrapper
over the same flag in the underlying ObjectContext.
An implementation of that represents a clone of another
dictionary. That is, all the property values have been been copied into this dictionary.
The internal class used to implement .
This internal class allows for a clean internal factoring without compromising the public API.
Initializes a new instance of the class.
The internal context with which the entity of complex object is associated.
The type of the entity or complex object.
If set to true this is a dictionary for an entity, otherwise it is a dictionary for a complex object.
Implemented by subclasses to get the dictionary item for a given property name.
Checking that the name is valid should happen before this method is called such
that subclasses do not need to perform the check.
Name of the property.
An item for the given name.
Creates an object of the underlying type for this dictionary and hydrates it with property
values from this dictionary.
The properties of this dictionary copied into a new object.
Creates an instance of the underlying type for this dictionary, which may either be an entity type (in which
case CreateObject on the context is used) or a non-entity type (in which case the empty constructor is used.)
In either case, app domain cached compiled delegates are used to do the creation.
Sets the values of this dictionary by reading values out of the given object.
The given object must be of the type that this dictionary is based on.
The object to read values from.
Creates a new dictionary containing copies of all the properties in this dictionary.
Changes made to the new dictionary will not be reflected in this dictionary and vice versa.
A clone of this dictionary.
Sets the values of this dictionary by reading values from another dictionary.
The other dictionary must be based on the same type as this dictionary, or a type derived
from the type for this dictionary.
The dictionary to read values from.
Gets the dictionary item for the property with the given name.
This method checks that the given name is valid.
The property name.
The item.
Sets the value of the property only if it is different from the current value and is not
an invalid attempt to set a complex property.
Gets the set of names of all properties in this dictionary as a read-only set.
The property names.
Gets or sets the value of the property with the specified property name.
The value may be a nested instance of this class.
The property name.
The value of the property.
Gets the entity type of complex type that this dictionary is based on.
The type of the object underlying this dictionary.
Gets the internal context with which the underlying entity or complex type is associated.
The internal context.
Gets a value indicating whether the object for this dictionary is an entity or a complex object.
true if this this is a dictionary for an entity; false if it is a dictionary for a complex object.
Initializes a new instance of the class by copying
values from the given dictionary.
The dictionary to clone.
If non-null, then the values for the new dictionary are taken from this record rather than from the original dictionary.
Gets the dictionary item for a given property name.
Name of the property.
An item for the given name.
Gets the set of names of all properties in this dictionary as a read-only set.
The property names.
An implementation of for an item in a .
Represents an item in an representing a property name/value.
Gets or sets the value of the property represented by this item.
The value.
Gets the name of the property.
The name.
Gets a value indicating whether this item represents a complex property.
true If this instance represents a complex property; otherwise, false .
Gets the type of the underlying property.
The property type.
Initializes a new instance of the class.
The name.
The value.
The type.
If set to true this item represents a complex property.
Gets or sets the value of the property represented by this item.
The value.
Gets the name of the property.
The name.
Gets a value indicating whether this item represents a complex property.
true If this instance represents a complex property; otherwise, false .
Gets the type of the underlying property.
The property type.
An implementation of that is based on an existing
instance.
Initializes a new instance of the class.
The internal context.
The type.
The data record.
If set to true this is a dictionary for an entity, otherwise it is a dictionary for a complex object.
Gets the dictionary item for a given property name.
Name of the property.
An item for the given name.
Gets the set of names of all properties in this dictionary as a read-only set.
The property names.
An implementation of for an item in a .
Initializes a new instance of the class.
The data record.
The ordinal.
The value.
Gets or sets the value of the property represented by this item.
The value.
Gets the name of the property.
The name.
Gets a value indicating whether this item represents a complex property.
true If this instance represents a complex property; otherwise, false .
Gets the type of the underlying property.
The property type.
This is version of an internal interface that already exists in System.Data.Entity that
is implemented by . Using this interface allows state
entries to be mocked for unit testing. The plan is to remove this version of the
interface and use the one in System.Data.Entity once we roll into the framework.
Note that some members may need to be added to the interface in the framework when
we combine the two.
The internal class used to implement and
.
This internal class contains all the common implementation between the generic and non-generic
entry classes and also allows for a clean internal factoring without compromising the public API.
Base class for and
containing common code for collection and reference navigation property entries.
Base class for all internal entries that represent different kinds of properties.
Initializes a new instance of the class.
The internal entity entry.
The member metadata.
Validates this property.
A sequence of validation errors for this property. Empty if no errors. Never null.
Creates a new non-generic backed by this internal entry.
The actual subtype of the DbMemberEntry created depends on the metadata of this internal entry.
The new entry.
Creates a new generic backed by this internal entry.
The actual subtype of the DbMemberEntry created depends on the metadata of this internal entry.
The type of the entity.
The type of the property.
The new entry.
Gets the property name.
The property is virtual to allow mocking.
The property name.
Gets or sets the current value of the navigation property.
The current value.
Gets the internal entity entry property belongs to.
This property is virtual to allow mocking.
The internal entity entry.
Gets the entry metadata.
The entry metadata.
Initializes a new instance of the class.
The internal entity entry.
The navigation metadata.
Calls Load on the underlying .
Calls LoadAsync on the underlying .
Uses CreateSourceQuery on the underlying to create a query for this
navigation property.
Gets the navigation property value from the object.
The entity.
The navigation property value.
Validates that the owning entity entry is associated with an underlying
and
is not just wrapping a non-attached entity.
If the entity is not detached, then the RelatedEnd for this navigation property is obtained.
Calls IsLoaded on the underlying .
Gets the related end, which will be null if the entity is not being tracked.
The related end.
Gets or sets the current value of the navigation property. The current value is
the entity that the navigation property references or the collection of references
for a collection property.
This property is virtual so that it can be mocked.
The current value.
Gets a delegate that can be used to get the value of the property directly from the entity.
Returns null if the property does not have an accessible getter.
The getter delegate, or null.
Gets a delegate that can be used to set the value of the property directly on the entity.
Returns null if the property does not have an accessible setter.
The setter delegate, or null.
Initializes a new instance of the class.
The internal entity entry.
The navigation metadata.
Gets the navigation property value from the object.
Since for a collection the related end is an , it means
that the internal representation of the navigation property is just the related end.
The entity.
The navigation property value.
Creates a new non-generic backed by this internal entry.
The runtime type of the DbMemberEntry created will be or a subtype of it.
The new entry.
Creates a new generic backed by this internal entry.
The runtime type of the DbMemberEntry created will be or a subtype of it.
The type of the entity.
The type of the property.
The new entry.
Creates a new generic backed by this internal entry.
The actual subtype of the DbCollectionEntry created depends on the metadata of this internal entry.
The type of the entity.
The type of the element.
The new entry.
Creates a object for the given entity type
and collection element type.
The type of the entity.
The type of the property.
Type of the element.
The set.
Gets or sets the current value of the navigation property. The current value is
the entity that the navigation property references or the collection of references
for a collection property.
The current value.
The internal class used to implement
and .
This internal class contains all the common implementation between the generic and non-generic
entry classes and also allows for a clean internal factoring without compromising the public API.
Initializes a new instance of the class.
The internal context.
The state entry.
Initializes a new instance of the class for an
entity which may or may not be attached to the context.
The internal context.
The entity.
Queries the database for copies of the values of the tracked entity as they currently exist in the database.
The store values.
An asynchronous version of GetDatabaseValues, which
queries the database for copies of the values of the tracked entity as they currently exist in the database.
A task containing the store values.
Appends a query for the properties in the entity to the given string builder that is being used to
build the eSQL query. This method may be called recursively to query for all the sub-properties of
a complex property.
The query builder.
The qualifier with which to prefix each property name.
The dictionary that acts as a template for the properties to query.
Validates that a dictionary can be obtained for the state of the entity represented by this entry.
The method name being used to request a dictionary.
The state that is invalid for the request being processed.
Calls Refresh with StoreWins on the underlying state entry.
An asynchronous version of Reload, which
calls Refresh with StoreWins on the underlying state entry.
Gets an internal object representing a reference navigation property.
This method is virtual to allow mocking.
The navigation property.
The type of entity requested, which may be 'object' or null if any type can be accepted.
The entry.
Gets an internal object representing a collection navigation property.
This method is virtual to allow mocking.
The navigation property.
The type of entity requested, which may be 'object' or null f any type can be accepted.
The entry.
Gets an internal object representing a navigation, scalar, or complex property.
This method is virtual to allow mocking.
Name of the property.
The type of entity requested, which may be 'object' if any type can be accepted.
The entry.
Gets an internal object representing a scalar or complex property.
This method is virtual to allow mocking.
The property.
The type of object requested, which may be null or 'object' if any type can be accepted.
if set to true then the found property must be a complex property.
The entry.
Gets an internal object representing a scalar or complex property.
The property may be a nested property on the given .
The parent property entry, or null if this is a property directly on the entity.
Name of the property.
The type of object requested, which may be null or 'object' if any type can be accepted.
if set to true then the found property must be a complex property.
The entry.
Gets an internal object representing a scalar or complex property.
The property may be a nested property on the given .
The parent property entry, or null if this is a property directly on the entity.
Name of the property.
The property split out into its parts.
The type of object requested, which may be null or 'object' if any type can be accepted.
if set to true then the found property must be a complex property.
The entry.
Checks that the given property name is a navigation property and is either a reference property or
collection property according to the value of requireCollection.
Gets metadata for the given property if that property is a navigation property or returns null
if it is not a navigation property.
Name of the property.
Navigation property metadata or null.
Gets the type of entity or entities at the target end of the given navigation property.
The navigation property.
The CLR type of the entity or entities at the other end.
Gets the related end for the navigation property with the given name.
The navigation property.
Uses EDM metadata to validate that the property name exists in the model and represents a scalar or
complex property or exists in the CLR type.
This method is public and virtual so that it can be mocked.
The property name.
The type on which the property is declared.
The type of object requested, which may be 'object' if any type can be accepted.
Metadata for the property.
Splits the given property name into parts delimited by dots.
Name of the property.
The parts of the name.
Validates that this entry is associated with an underlying and
is not just wrapping a non-attached entity.
Validates entity represented by this entity entry.
This method is virtual to allow mocking.
User defined dictionary containing additional info for custom validation. This parameter is optional and can be null.
containing validation result. Never null.
Determines whether the specified is equal to this instance.
Two instances are considered equal if they are both entries for
the same entity on the same .
The to compare with this instance.
true if the specified is equal to this instance; otherwise, false .
Determines whether the specified is equal to this instance.
Two instances are considered equal if they are both entries for
the same entity on the same .
The to compare with this instance.
true if the specified is equal to this instance; otherwise, false .
Returns a hash code for this instance.
A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.
Gets the tracked entity.
This property is virtual to allow mocking.
The entity.
Gets or sets the state of the entity.
The state.
Gets the current property values for the tracked entity represented by this object.
This property is virtual to allow mocking.
The current values.
Gets the original property values for the tracked entity represented by this object.
The original values are usually the entity's property values as they were when last queried from
the database.
This property is virtual to allow mocking.
The original values.
Checks whether or not this entry is associated with an underlying or
is just wrapping a non-attached entity.
Gets the type of the entity being tracked.
The type of the entity.
Gets the c-space entity type for this entity from the EDM.
Gets the underlying object state entry.
Gets the internal context.
The internal context.
A concrete implementation of used for properties of entities.
The internal class used to implement and
.
This internal class contains all the common implementation between the generic and non-generic
entry classes and also allows for a clean internal factoring without compromising the public API.
Initializes a new instance of the class.
The internal entry.
The property info.
Creates a delegate that will get the value of this property.
The delegate.
Creates a delegate that will set the value of this property.
The delegate.
Returns true if the property of the entity that this property is ultimately part
of is set as modified. If this is a property of an entity, then this method returns
true if the property is modified. If this is a property of a complex object, then
this method returns true if the top-level complex property on the entity is modified.
True if the entity property is modified.
Sets the property of the entity that this property is ultimately part of to modified.
If this is a property of an entity, then this method marks it as modified.
If this is a property of a complex object, then this method marks the top-level
complex property as modified.
Rejects changes to this property.
If this is a property of a complex object, then this method rejects changes to the top-level
complex property.
Walks the tree from a property of a complex property back up to the top-level
complex property and then checks whether or not DetectChanges still considers
the complex property to be modified. If it does not, then the complex property
is marked as Unchanged.
Throws if the user attempts to set a complex property to null.
The value.
Sets the given value directly onto the underlying entity object.
The value.
True if the property had a setter that we could attempt to call; false if no setter was available.
Sets the property value, potentially by setting individual nested values for a complex
property.
The value.
Gets an internal object representing a scalar or complex property of this property,
which must be a mapped complex property.
This method is virtual to allow mocking.
The property.
The type of object requested, which may be null or 'object' if any type can be accepted.
if set to true then the found property must be a complex property.
The entry.
Validates that the owning entity entry is associated with an underlying
and
is not just wrapping a non-attached entity.
Creates a new non-generic backed by this internal entry.
The runtime type of the DbMemberEntry created will be or a subtype of it.
The new entry.
Creates a new generic backed by this internal entry.
The runtime type of the DbMemberEntry created will be or a subtype of it.
The type of the entity.
The type of the property.
The new entry.
Returns parent property, or null if this is a property on the top-level entity.
Gets the current values of the parent entity or complex property.
That is, the current values that contains the value for this property.
The parent current values.
Gets the original values of the parent entity or complex property.
That is, the original values that contains the value for this property.
The parent original values.
A delegate that reads the value of this property.
May be null if there is no way to set the value due to missing accessors on the type.
A delegate that sets the value of this property.
May be null if there is no way to set the value due to missing accessors on the type.
Gets or sets the original value.
Note that complex properties are returned as objects, not property values.
Gets or sets the current value.
Note that complex properties are returned as objects, not property values.
Also, for complex properties, the object returned is the actual complex object from the entity
and setting the complex object causes the actual object passed to be set onto the entity.
The current value.
Gets or sets a value indicating whether this property is modified.
Gets the property metadata.
The property metadata.
Initializes a new instance of the class.
The internal entry.
The property info.
Creates a delegate that will get the value of this property.
The delegate.
Creates a delegate that will set the value of this property.
The delegate.
Returns true if the property of the entity that this property is ultimately part
of is set as modified. Since this is a property of an entity this method returns
true if the property is modified.
True if the entity property is modified.
Sets the property of the entity that this property is ultimately part of to modified.
Since this is a property of an entity this method marks it as modified.
Rejects changes to this property.
Walks the tree from a property of a complex property back up to the top-level
complex property and then checks whether or not DetectChanges still considers
the complex property to be modified. If it does not, then the complex property
is marked as Unchanged.
Returns parent property, or null if this is a property on the top-level entity.
Gets the current values of the parent entity.
That is, the current values that contains the value for this property.
The parent current values.
Gets the original values of the parent entity.
That is, the original values that contains the value for this property.
The parent original values.
A concrete implementation of used for properties of complex objects.
Initializes a new instance of the class.
The parent property entry.
The property metadata.
Creates a delegate that will get the value of this property.
The delegate.
Creates a delegate that will set the value of this property.
The delegate.
Returns true if the property of the entity that this property is ultimately part
of is set as modified. Since this is a property of a complex object
this method returns true if the top-level complex property on the entity is modified.
True if the entity property is modified.
Sets the property of the entity that this property is ultimately part of to modified.
Since this is a property of a complex object this method marks the top-level
complex property as modified.
Rejects changes to this property.
Since this is a property of a complex object this method rejects changes to the top-level
complex property.
Walks the tree from a property of a complex property back up to the top-level
complex property and then checks whether or not DetectChanges still considers
the complex property to be modified. If it does not, then the complex property
is marked as Unchanged.
Returns parent property, or null if this is a property on the top-level entity.
Gets the current values of the parent complex property.
That is, the current values that contains the value for this property.
The parent current values.
Gets the original values of the parent complex property.
That is, the original values that contains the value for this property.
The parent original values.
The internal class used to implement ,
and .
This internal class contains all the common implementation between the generic and non-generic
entry classes and also allows for a clean internal factoring without compromising the public API.
Initializes a new instance of the class.
The internal entity entry.
The navigation metadata.
Gets the navigation property value from the object.
For reference navigation properties, this means getting the value from the
object.
The entity.
The navigation property value.
Sets the navigation property value onto the object.
For reference navigation properties, this means setting the value onto the
object.
The value.
Sets the given value on the given which must be an
.
This method is setup in such a way that it can easily be used by CreateDelegate without any
dynamic code generation needed.
The type of the related entity.
The entity reference.
The value.
Creates a new non-generic backed by this internal entry.
The runtime type of the DbMemberEntry created will be or a subtype of it.
The new entry.
Creates a new generic backed by this internal entry.
The runtime type of the DbMemberEntry created will be or a subtype of it.
The type of the entity.
The type of the property.
The new entry.
Gets or sets the current value of the navigation property. The current value is
the entity that the navigation property references or the collection of references
for a collection property.
The current value.
Contains metadata about a member of an entity type or complex type.
Initializes a new instance of the class.
The type that the property is declared on.
Type of the property.
The property name.
Creates a new the runtime type of which will be
determined by the metadata.
The entity entry to which the member belongs.
The parent property entry if the new entry is nested, otherwise null.
The new entry.
Gets the type of the member for which this is metadata.
The type of the member entry.
Gets the name of the property.
The name.
Gets the type of the entity or complex object that on which the member is declared.
The type that the member is declared on.
Gets the type of element for the property, which for non-collection properties
is the same as the MemberType and which for collection properties is the type
of element contained in the collection.
The type of the element.
Gets the type of the member, which for collection properties is the type
of the collection rather than the type in the collection.
The type of the member.
The types of member entries supported.
Initializes a new instance of the class.
The type that the property is declared on.
Type of the property.
The property name.
if set to true this is a collection nav prop.
Creates a new the runtime type of which will be
determined by the metadata.
The entity entry to which the member belongs.
The parent property entry which will always be null for navigation entries.
The new entry.
Gets the type of the member for which this is metadata.
The type of the member entry.
Gets the type of the member, which for collection properties is the type
of the collection rather than the type in the collection.
The type of the member.
Contains metadata for a property of a complex object or entity.
Initializes a new instance of the class.
The type that the property is declared on.
Type of the property.
The property name.
if set to true the property is mapped in the EDM.
if set to true the property is a complex property.
Validates that the given name is a property of the declaring type (either on the CLR type or in the EDM)
and that it is a complex or scalar property rather than a nav property and then returns metadata about
the property.
The internal context.
The type that the property is declared on.
The type of property requested, which may be 'object' if any type can be accepted.
Name of the property.
Metadata about the property, or null if the property does not exist or is a navigation property.
Creates a new the runtime type of which will be
determined by the metadata.
The entity entry to which the member belongs.
The parent property entry if the new entry is nested, otherwise null.
The new entry.
Gets a value indicating whether this is a complex property.
That is, not whether or not this is a property on a complex object, but rather if the
property itself is a complex property.
true if this instance is complex; otherwise, false .
Gets the type of the member for which this is metadata.
The type of the member entry.
Gets a value indicating whether this instance is mapped in the EDM.
true if this instance is mapped; otherwise, false .
Gets the type of the member, which for collection properties is the type
of the collection rather than the type in the collection.
The type of the member.
An implementation of that wraps an existing set but makes
it read-only.
Initializes a new instance of the class wrapped around
another existing set.
The existing set.
This is a temporary adapter class that wraps an and
presents it as an . This class will be removed once
we roll into the System.Data.Entity assembly. See
for more details.
Helper class that extends Tuple to give the Item1 and Item2 properties more meaningful names.
Creates a new pair of the given EntitySet and BaseType.
The EntitySet part of the pair.
The BaseType part of the pair.
Helper class that extends Tuple to give the Item1 and Item2 properties more meaningful names.
Creates a new pair of the given database initializer delegate and a flag
indicating whether or not it is locked.
The initializer delegate.
A flag indicating whether or not the initializer is locked and should not be changed.
Represents a raw SQL query against the context for any type where the results are never
associated with an entity set and are never tracked.
Represents a raw SQL query against the context that may be for entities in an entity set
or for some other non-entity element type.
Initializes a new instance of the class.
The SQL.
Whether the query is streaming or buffering.
The parameters.
If the query is tracking entities, then this method returns a new query that will
not track entities.
A no-tracking query.
If the query is buffering, then this method returns a new query that will stream
the results instead.
A streaming query.
Returns an which when enumerated will execute the given SQL query against the database.
The query results.
Returns an which when enumerated will execute the given SQL query against the database.
The query results.
Returns a that contains the SQL string that was set
when the query was created. The parameters are not included.
A that represents this instance.
Gets the SQL query string,
The SQL query.
Get the query streaming behavior.
true if the query is streaming;
false if the query is buffering
Gets the parameters.
The parameters.
Initializes a new instance of the class.
The internal context.
Type of the element.
The SQL.
Whether the query is streaming or buffering.
The parameters.
Returns this query since it can never be a tracking query.
This instance.
Returns an which when enumerated will execute the given SQL query against the
database backing this context. The results are not materialized as entities or tracked.
The query results.
Returns an which when enumerated will execute the given SQL query against the
database backing this context. The results are not materialized as entities or tracked.
The query results.
Represents a raw SQL query against the context for entities in an entity set.
Initializes a new instance of the class.
The set.
The SQL.
If set to true then the entities will not be tracked.
Whether the query is streaming or buffering.
The parameters.
Returns an which when enumerated will execute the given SQL query against the database
materializing entities into the entity set that backs this set.
The query results.
Returns an which when enumerated will execute the given SQL query against the database
materializing entities into the entity set that backs this set.
The query results.
Gets a value indicating whether this instance is set to track entities or not.
true if this instance is no-tracking; otherwise, false .
A LazyInternalConnection object manages information that can be used to create a DbConnection object and
is responsible for creating that object and disposing it.
Creates a new LazyInternalConnection using convention to calculate the connection.
The DbConnection object will be created lazily on demand and will be disposed when the LazyInternalConnection is disposed.
Either the database name or a connection string.
Creates a new LazyInternalConnection targeting a specific database.
The DbConnection object will be created lazily on demand and will be disposed when the LazyInternalConnection is disposed.
The connection to target.
Creates an from metadata in the connection. This method must
only be called if ConnectionHasModel returns true.
The newly created context.
Disposes the underlying DbConnection.
Note that dispose actually puts the LazyInternalConnection back to its initial state such that
it can be used again.
Creates the underlying (which may actually be an )
if it does not already exist.
Searches the app.config/web.config file for a connection that matches the given name.
The connection might be a store connection or an EF connection.
The connection name.
True if a connection from the app.config file was found and used.
Attempts to locate a connection entry in the configuration based on the supplied context name.
The name to search for.
The configuration to search in.
Connection string if found, otherwise null.
Initializes the connection based on a connection string.
The settings to initialize from.
Returns the underlying DbConnection, creating it first if it does not already exist.
Returns the origin of the underlying connection string.
Gets the name of the underlying connection string.
Returns a key consisting of the connection type and connection string.
If this is an EntityConnection then the metadata path is included in the key returned.
Gets a value indicating whether the connection is an EF connection which therefore contains
metadata specifying the model, or instead is a store connection, in which case it contains no
model info.
true if connection contain model info; otherwise, false .
Gets a value indicating if the lazy connection has been initialized.
A is a concrete type that will lazily create the
underlying when needed. The created is owned by the
internal context and will be disposed when the internal context is disposed.
Constructs a for the given owner that will be initialized
on first use.
The owner .
Responsible for creating a connection lazily when the context is used for the first time.
The model, or null if it will be created by convention
Returns the underlying without causing the underlying database to be created
or the database initialization strategy to be executed.
This is used to get a context that can then be used for database creation/initialization.
Saves all changes made in this context to the underlying database, but only if the
context has been initialized. If the context has not been initialized, then this
method does nothing because there is nothing to do; in particular, it does not
cause the context to be initialized.
The number of objects written to the underlying database.
Disposes the context. The underlying is also disposed.
The connection to the database ( object) is also disposed if it was created by
the context, otherwise it is not disposed.
Initializes the underlying .
Creates an immutable, cacheable representation of the model defined by this builder.
This model can be used to create an or can be passed to a
constructor to create a for this model.
Creates and configures the instance that will be used to build the
.
The builder.
Marks the database as having not been initialized. This is called when the app calls Database.Delete so
that the database if the app attempts to then use the database again it will be re-initialized automatically.
Marks the database as having been initialized without actually running the
.
Runs the unless it has already been run or there
is no initializer for this context type in which case this method does nothing.
Performs some action (which may do nothing) in such a way that it is guaranteed only to be run
once for the model and connection in this app domain, unless it fails by throwing an exception,
in which case it will be re-tried next time the context is initialized.
The action.
Returns the underlying .
The compiled model created from the Code First pipeline, or null if Code First was
not used to create this context.
Causes the Code First pipeline to be run to create the model if it has not already been
created.
The actually being used, which may be the
temp context for initialization or the real context.
The connection underlying this context. Accessing this property does not cause the context
to be initialized, only its connection.
The connection string as originally applied to the context. This is used to perform operations
that need the connection string in a non-mutated form, such as with security info still intact.
Returns the origin of the underlying connection string.
Gets or sets an object representing a config file used for looking for DefaultConnectionFactory entries
and connection strings.
Gets the name of the underlying connection string.
Gets or sets the provider details to be used when building the EDM model.
Gets or sets a custom OnModelCreating action.
Gets the default database initializer to use for this context if no other has been registered.
For code first this property returns a instance.
For database/model first, this property returns null.
The default initializer.
Gets or sets a value indicating whether lazy loading is enabled.
If the underlying exists, then this property acts as a wrapper over the flag stored there.
If the underlying has not been created yet, then we store the value given so we can later
use it when we create the . This allows the flag to be changed, for example in
a DbContext constructor, without it causing the to be created.
Gets or sets a value indicating whether proxy creation is enabled.
If the underlying ObjectContext exists, then this property acts as a wrapper over the flag stored there.
If the underlying ObjectContext has not been created yet, then we store the value given so we can later
use it when we create the ObjectContext. This allows the flag to be changed, for example in
a DbContext constructor, without it causing the ObjectContext to be created.
Gets or sets a value indicating whether database null comparison behavior is enabled.
If the underlying ObjectContext exists, then this property acts as a wrapper over the flag stored there.
If the underlying ObjectContext has not been created yet, then we store the value given so we can later
use it when we create the ObjectContext. This allows the flag to be changed, for example in
a DbContext constructor, without it causing the ObjectContext to be created.
A wrapping query provider that performs expression transformation and then delegates
to the provider. The objects returned
are always instances of . This provider is associated with
generic objects.
Creates a provider that wraps the given provider.
The provider to wrap.
Performs expression replacement and then delegates to the wrapped provider before wrapping
the returned as a .
Performs expression replacement and then delegates to the wrapped provider before wrapping
the returned as a where T is determined
from the element type of the ObjectQuery.
By default, calls the same method on the wrapped provider.
By default, calls the same method on the wrapped provider.
By default, calls the same method on the wrapped provider.
By default, calls the same method on the wrapped provider.
Creates an appropriate generic IQueryable using Reflection and the underlying ElementType of
the given ObjectQuery.
Performs expression replacement and then delegates to the wrapped provider to create an
.
Wraps the given as a where T is determined
from the element type of the ObjectQuery.
Gets the internal context.
The internal context.
A LINQ expression visitor that finds uses with equivalent
instances.
Replaces calls to DbContext.Set() with an expression for the equivalent .
The node to replace.
A new node, which may have had the replacement made.
Replaces a or property with a constant expression
for the underlying .
The node to replace.
A new node, which may have had the replacement made.
Gets a value from the given member, or returns null
if the member doesn't contain a DbContext instance.
The expression for the object for the member, which may be null for a static member.
The member.
The context or null.
Gets the instance from the given instance or static member, returning null
if the member does not contain a DbContext instance.
The member.
The value of the object to get the instance from, or null if the member is static.
The context instance or null.
Takes a or and creates an expression
for the underlying .
Takes a or and extracts the underlying .
A non-generic interface implemented by that allows operations on
any query object without knowing the type to which it applies.
An interface implemented by .
The type of the element.
A non-generic interface implemented by that allows operations on
any set object without knowing the type to which it applies.
An interface implemented by .
An instance of this internal class is created whenever an instance of the public
class is needed. This allows the public surface to be non-generic, while the runtime type created
still implements .
The type of the element.
Creates a new query that will be backed by the given internal query object.
The backing query.
Returns an which when enumerated will execute the query against the database.
An enumerator for the query
Returns an which when enumerated will execute the query against the database.
An enumerator for the query
An instance of this internal class is created whenever an instance of the public
class is needed. This allows the public surface to be non-generic, while the runtime type created
still implements .
The type of the entity.
Creates a new set that will be backed by the given internal set.
The internal set.
Creates an instance of this class. This method is used with CreateDelegate to cache a delegate
that can create a generic instance without calling MakeGenericType every time.
The internal set to wrap, or null if a new internal set should be created.
The set.
Returns an which when enumerated will execute the backing query against the database.
The query results.
Returns an which when enumerated will execute the backing query against the database.
The query results.
An InternalQuery underlies every instance of DbSet and DbQuery. It acts to lazily initialize a InternalContext as well
as an ObjectQuery and EntitySet the first time that it is used. The InternalQuery also acts to expose necessary
information to other parts of the design in a controlled manner without adding a lot of internal methods and
properties to the DbSet and DbQuery classes themselves.
The type of entity to query for.
Creates a new query that will be backed by the given InternalContext.
The backing context.
Creates a new internal query based on the information in an existing query together with
a new underlying ObjectQuery.
Resets the query to its uninitialized state so that it will be re-lazy initialized the next
time it is used. This allows the ObjectContext backing a DbContext to be switched out.
Updates the underlying ObjectQuery with the given include path.
The include path.
A new query containing the defined include path.
Returns a new query where the entities returned will not be cached in the .
A new query with NoTracking applied.
Returns a new query that will stream the results instead of buffering.
A new query with AsStreaming applied.
Performs lazy initialization of the underlying ObjectContext, ObjectQuery, and EntitySet objects
so that the query can be used.
Returns a representation of the underlying query, equivalent
to ToTraceString on ObjectQuery.
The query string.
Returns an which when enumerated will execute the query against the database.
The query results.
Returns an which when enumerated will execute the query against the database.
The query results.
Returns an which when enumerated will execute the query against the database.
The query results.
Returns an which when enumerated will execute the query against the database.
The query results.
The underlying InternalContext.
The underlying ObjectQuery.
The underlying ObjectQuery.
The LINQ query expression.
The LINQ query provider for the underlying .
The IQueryable element type.
Creates a new set that will be backed by the given InternalContext.
The backing context.
Resets the set to its uninitialized state so that it will be re-lazy initialized the next
time it is used. This allows the ObjectContext backing a DbContext to be switched out.
Finds an entity with the given primary key values.
If an entity with the given primary key values exists in the context, then it is
returned immediately without making a request to the store. Otherwise, a request
is made to the store for an entity with the given primary key values and this entity,
if found, is attached to the context and returned. If no entity is found in the
context or the store, then null is returned.
The ordering of composite key values is as defined in the EDM, which is in turn as defined in
the designer, by the Code First fluent API, or by the DataMember attribute.
The values of the primary key for the entity to be found.
The entity found, or null.
Thrown if multiple entities exist in the context with the primary key values given.
Thrown if the type of entity is not part of the data model for this context.
Thrown if the types of the key values do not match the types of the key values for the entity type to be found.
Thrown if the context has been disposed.
An asynchronous version of Find, which
finds an entity with the given primary key values.
If an entity with the given primary key values exists in the context, then it is
returned immediately without making a request to the store. Otherwise, a request
is made to the store for an entity with the given primary key values and this entity,
if found, is attached to the context and returned. If no entity is found in the
context or the store, then null is returned.
The ordering of composite key values is as defined in the EDM, which is in turn as defined in
the designer, by the Code First fluent API, or by the DataMember attribute.
The token to monitor for cancellation requests.
The values of the primary key for the entity to be found.
A Task containing the entity found, or null.
Thrown if multiple entities exist in the context with the primary key values given.
Thrown if the type of entity is not part of the data model for this context.
Thrown if the types of the key values do not match the types of the key values for the entity type to be found.
Thrown if the context has been disposed.
Finds an entity in the state manager with the given primary key values, or returns null
if no such entity can be found. This includes looking for Added entities with the given
key values.
Finds an entity in the store with the given primary key values, or returns null
if no such entity can be found. This code is adapted from TryGetObjectByKey to
include type checking in the query.
An asynchronous version of FindInStore, which
finds an entity in the store with the given primary key values, or returns null
if no such entity can be found. This code is adapted from TryGetObjectByKey to
include type checking in the query.
Attaches the given entity to the context underlying the set. That is, the entity is placed
into the context in the Unchanged state, just as if it had been read from the database.
Attach is used to repopulate a context with an entity that is known to already exist in the database.
SaveChanges will therefore not attempt to insert an attached entity into the database because
it is assumed to already be there.
Note that entities that are already in the context in some other state will have their state set
to Unchanged. Attach is a no-op if the entity is already in the context in the Unchanged state.
This method is virtual so that it can be mocked.
The entity to attach.
Adds the given entity to the context underlying the set in the Added state such that it will
be inserted into the database when SaveChanges is called.
Note that entities that are already in the context in some other state will have their state set
to Added. Add is a no-op if the entity is already in the context in the Added state.
This method is virtual so that it can be mocked.
The entity to add.
Marks the given entity as Deleted such that it will be deleted from the database when SaveChanges
is called. Note that the entity must exist in the context in some other state before this method
is called.
Note that if the entity exists in the context in the Added state, then this method
will cause it to be detached from the context. This is because an Added entity is assumed not to
exist in the database such that trying to delete it does not make sense.
This method is virtual so that it can be mocked.
The entity to remove.
This method checks whether an entity is already in the context. If it is, then the state
is changed to the new state given. If it isn't, then the action delegate is executed to
either Add or Attach the entity.
A delegate to Add or Attach the entity.
The new state to give the entity if it is already in the context.
The entity.
Name of the method.
Creates a new instance of an entity for the type of this set.
Note that this instance is NOT added or attached to the set.
The instance returned will be a proxy if the underlying context is configured to create
proxies and the entity type meets the requirements for creating a proxy.
The entity instance, which may be a proxy.
Creates a new instance of an entity for the type of this set or for a type derived
from the type of this set.
Note that this instance is NOT added or attached to the set.
The instance returned will be a proxy if the underlying context is configured to create
proxies and the entity type meets the requirements for creating a proxy.
The type of entity to create.
The entity instance, which may be a proxy.
Performs lazy initialization of the underlying ObjectContext, ObjectQuery, and EntitySet objects
so that the query can be used.
This method is virtual so that it can be mocked.
Attempts to perform lazy initialization of the underlying ObjectContext, ObjectQuery, and EntitySet objects
so that o-space loading has happened and the query can be used. This method doesn't throw if the type
for the set is not mapped.
Creates an underlying for this set.
if set to true then the query is set to be no-tracking.
The query.
Returns a representation of the underlying query, equivalent
to ToTraceString on ObjectQuery.
The query string.
Updates the underlying ObjectQuery with the given include path.
The include path.
A new query containing the defined include path.
Returns a new query where the entities returned will not be cached in the .
A new query with NoTracking applied.
Returns a new query that will stream the results instead of buffering.
A new query with AsStreaming applied.
Returns an which when enumerated will execute the given SQL query against the database
materializing entities into the entity set that backs this set.
The SQL query.
If true then the entities are not tracked, otherwise they are.
Whether the query is streaming or buffering.
The parameters.
The query results.
Returns an which when enumerated will execute the given SQL query against the database
materializing entities into the entity set that backs this set.
The SQL query.
If true then the entities are not tracked, otherwise they are.
Whether the query is streaming or buffering.
The parameters.
The query results.
Returns an which when enumerated will execute the backing query against the database.
The query results.
Returns an which when enumerated will execute the backing query against the database.
The query results.
Gets the ObservableCollection representing the local view for the set based on this query.
The underlying ObjectQuery. Accessing this property will trigger lazy initialization of the query.
The underlying EntitySet name. Accessing this property will trigger lazy initialization of the query.
The underlying EntitySet name, quoted for ESQL. Accessing this property will trigger lazy initialization of the query.
The underlying EntitySet. Accessing this property will trigger lazy initialization of the query.
The base type for the underlying entity set. Accessing this property will trigger lazy initialization of the query.
The underlying InternalContext. Accessing this property will trigger lazy initialization of the query.
The LINQ query expression.
The LINQ query provider for the underlying .
A wrapping query provider that performs expression transformation and then delegates
to the provider. The objects returned
are instances of when the generic CreateQuery method is
used and are instances of when the non-generic CreateQuery method
is used. This provider is associated with non-generic objects.
Creates a provider that wraps the given provider.
The provider to wrap.
Performs expression replacement and then delegates to the wrapped provider before wrapping
the returned as a .
Delegates to the wrapped provider except returns instances of .
Creates an appropriate generic IQueryable using Reflection and the underlying ElementType of
the given ObjectQuery.
Extends to create a sortable binding list that stays in
sync with an underlying . That is, when items are added
or removed from the binding list, they are added or removed from the ObservableCollecion, and
vice-versa.
The list element type.
An extended BindingList implementation that implements sorting.
This class was adapted from the LINQ to SQL class of the same name.
The element type.
Initializes a new instance of the class with the
the given underlying list. Note that sorting is dependent on having an actual
rather than some other ICollection implementation.
The list.
Applies sorting to the list.
The property to sort by.
The sort direction.
Stops sorting.
Gets a value indicating whether this list is sorted.
true if this instance is sorted; otherwise, false .
Gets the sort direction.
The sort direction.
Gets the sort property being used to sort.
The sort property.
Returns true indicating that this list supports sorting.
true .
Implements comparing for the implementation.
Initializes a new instance of the class
for sorting the list.
The property to sort by.
The sort direction.
Compares two instances of items in the list.
The left item to compare.
The right item to compare.
Determines whether this instance can sort for the specified type.
The type.
true if this instance can sort for the specified type; otherwise, false .
Determines whether this instance can sort for the specified type using IComparable.
The type.
true if this instance can sort for the specified type; otherwise, false .
Determines whether this instance can sort for the specified type using ToString.
The type.
true if this instance can sort for the specified type; otherwise, false .
Initializes a new instance of a binding list backed by the given
The obervable collection.
Creates a new item to be added to the binding list.
The new item.
Cancels adding of a new item that was started with AddNew.
Index of the item.
Removes all items from the binding list and underlying ObservableCollection.
Ends the process of adding a new item that was started with AddNew.
Index of the item.
Inserts the item into the binding list at the given index.
The index.
The item.
Removes the item at the specified index.
The index.
Sets the item into the list at the given position.
The index to insert at.
The item.
Event handler to update the binding list when the underlying observable collection changes.
The sender.
Data indicating how the collection has changed.
Adds the item to the underlying observable collection.
The item.
Removes the item from the underlying from observable collection.
The item.
Adapted from to allow the initializer to take an input object and
to do one-time initialization that only has side-effects and doesn't return a value.
The type of the input.
Initializes a new instance of the class.
The action.
Performs the action unless it has already been successfully performed before.
The input to the action; ignored if the action has already succeeded.
Adapted from to allow the initializer to take an input object and
to retry initialization if it has previously failed.
This class can only be used to initialize reference types that will not be null when
initialized.
The type of the input.
The type of the result.
Initializes a new instance of the class.
The value factory.
Gets the value, possibly by running the initializer if it has not been run before or
if all previous times it ran resulted in exceptions.
The input to the initializer; ignored if initialization has already succeeded.
The initialized object.
Validates a property of a given EDM complex type.
This is a composite validator for a complex property of an entity.
Validates a property of a given EDM property type.
This is a composite validator for a property of an entity or a complex type.
Simple validators for the corresponding property.
Name of the property the validator was created for.
Creates an instance of for a given EDM property.
The EDM property name.
Validators used to validate the given property.
Validates a property.
Validation context. Never null.
Property to validate. Never null.
Validation errors as . Empty if no errors. Never null.
Simple validators for the corresponding property.
Gets the name of the property the validator was created for.
The complex type validator.
Creates an instance of for a given complex property.
The complex property name.
Validators used to validate the given property.
Complex type validator.
Validates a complex property.
Validation context. Never null.
Property to validate. Never null.
Validation errors as . Empty if no errors. Never null.
Validator used to validate a property of a given EDM ComplexType.
This is a composite validator.
Validator used to validate an entity of a given EDM Type.
This is a composite validator for an EDM Type.
Creates an instance for a given EDM type.
Property validators.
Type level validators.
Validates an instance.
Entity validation context. Must not be null.
The entry for the complex property. Null if validating an entity.
instance. Never null.
Protected so it doesn't appear on EntityValidator.
Validates type properties. Any validation errors will be added to
collection.
Validation context. Must not be null.
The entry for the complex property. Null if validating an entity.
Collection of validation errors. Any validation errors will be added to it.
Note that will be modified by this method. Errors should be only added,
never removed or changed. Taking a collection as a modifiable parameter saves a couple of memory allocations
and a merge of validation error lists per entity.
Returns a validator for a child property.
Name of the child property for which to return a validator.
Validator for a child property. Possibly null if there are no validators for requested property.
Creates an instance for a given EDM complex type.
Property validators.
Type level validators.
Validates an instance.
Entity validation context. Must not be null.
The entry for the complex property. Null if validating an entity.
instance. Never null.
Validates type properties. Any validation errors will be added to
collection.
Validation context. Must not be null.
The entry for the complex property. Null if validating an entity.
Collection of validation errors. Any validation errors will be added to it.
Note that will be modified by this method. Errors should be only added,
never removed or changed. Taking a collection as a modifiable parameter saves a couple of memory allocations
and a merge of validation error lists per entity.
Contains information needed to validate an entity or its properties.
The entity being validated or the entity that owns the property being validated.
Initializes a new instance of EntityValidationContext class.
The entity being validated or the entity that owns the property being validated.
External context needed for validation.
External context needed for validation.
Gets the entity being validated or the entity that owns the property being validated.
Validator used to validate an entity of a given EDM EntityType.
This is a top level, composite validator. This is also an entry point to getting an entity
validated as validation of an entity is always started by calling Validate method on this type.
Creates an instance for a given EDM entity type.
Property validators.
Entity type level validators.
Validates an entity.
Entity validation context. Must not be null.
instance. Never null.
Validates type properties. Any validation errors will be added to
collection.
Validation context. Must not be null.
The entry for the complex property. Null if validating an entity.
Collection of validation errors. Any validation errors will be added to it.
Note that will be modified by this method. Errors should be only added,
never removed or changed. Taking a collection as a modifiable parameter saves a couple of memory allocations
and a merge of validation error lists per entity.
Builds validators based on s specified on entity CLR types and properties
as well as based on presence of implementation on entity and complex
type CLR types. It's not sealed and not static for mocking purposes.
Builds an for the given .
The entity entry to build the validator for.
for the given . Possibly null if no validation has been specified for this entity type.
Builds the validator for a given and the corresponding
.
The CLR type that corresponds to the EDM complex type.
The EDM complex type that type level validation is built for.
A for the given complex type. May be null if no validation specified.
Extracted method from BuildEntityValidator and BuildComplexTypeValidator
Build validators for the and the corresponding
or .
Properties to build validators for.
Non-navigation EDM properties.
Navigation EDM properties.
A list of validators. Possibly empty, never null.
Builds a for the given and the corresponding
. If the property is a complex type, type level validators will be built here as
well.
The CLR property to build the validator for.
The EDM property to build the validator for.
for the given . Possibly null if no validation has been specified for this property.
Builds a for the given transient .
The CLR property to build the validator for.
for the given . Possibly null if no validation has been specified for this property.
Builds s for given that derive from
.
Attributes used to build validators.
A list of s built from . Possibly empty, never null.
Returns all non-static non-indexed CLR properties from the .
The CLR to get the properties from.
A collection of CLR properties. Possibly empty, never null.
Builds validators based on the facets of :
* If .Nullable facet set to false adds a validator equivalent to the RequiredAttribute
* If the .MaxLength facet is specified adds a validator equivalent to the MaxLengthAttribute.
However the validator isn't added if .IsMaxLength has been set to true.
The CLR property to build the facet validators for.
The property for which facet validators will be created
A collection of validators.
Abstracts simple validators used to validate entities and properties.
Validates an entity or a property.
Validation context. Never null.
Property to validate. Can be null for type level validation.
Validation error as . Empty if no errors. Never null.
Validates entities or complex types implementing IValidatableObject interface.
Display attribute used to specify the display name for an entity or complex property.
Validates an entity or a complex type implementing IValidatableObject interface.
This method is virtual to allow mocking.
Validation context. Never null.
Property to validate. Null if this is the entity that will be validated. Never null if this is the complex type that will be validated.
Validation error as . Empty if no errors. Never null.
Note that is used to figure out what needs to be validated. If it not null the complex
type will be validated otherwise the entity will be validated.
Also if this is an IValidatableObject complex type but the instance (.CurrentValue) is null we won't validate
anything and will not return any errors. The reason for this is that Validation is supposed to validate using
information the user provided and not some additional implicit rules. (ObjectContext will throw for operations
that involve null complex properties).
Validates a property, complex property or an entity using validation attributes the property
or the complex/entity type is decorated with.
Note that this class is used for validating primitive properties using attributes declared on the property
(property level validation) and complex properties and entities using attributes declared on the type
(type level validation).
Display attribute used to specify the display name for a property or entity.
Validation attribute used to validate a property or an entity.
Creates an instance of class.
Validation attribute used to validate a property or an entity.
Validates a property or an entity.
Validation context. Never null.
Property to validate. Null for entity validation. Not null for property validation.
Validation errors as . Empty if no errors, never null.
Used to cache and retrieve generated validators and to create context for validating entities or properties.
Collection of validators keyed by the entity CLR type. Note that if there's no validation for a given type
it will be associated with a null validator.
Initializes a new instance of class.
Returns a validator to validate .
Entity the validator is requested for.
to validate . Possibly null if no validation has been specified for the entity.
Returns a validator to validate .
Navigation property the validator is requested for.
Validator to validate . Possibly null if no validation has been specified for the requested property.
Gets a validator for the .
Entity validator.
Property to get a validator for.
Validator to validate . Possibly null if there is no validation for the
.
For complex properties this method walks up the type hierarchy to get to the entity level and then goes down
and gets a validator for the child property that is an ancestor of the property to validate. If a validator
returned for an ancestor is null it means that there is no validation defined beneath and the method just
propagates (and eventually returns) null.
Creates for .
Entity entry for which a validation context needs to be created.
User defined dictionary containing additional info for custom validation. This parameter is optional and can be null.
An instance of class.
A wrapper around EntityKey that allows key/values pairs that have null values to
be used. This allows Added entities with null key values to be searched for in
the ObjectStateManager.
The key name/key value pairs, where some key values may be null
Creates a new WrappedEntityKey instance.
The entity set that the key belongs to.
The fully qualified name of the given entity set.
The key values, which may be null or contain null values.
The name of the parameter passed for keyValue by the user, which is used when throwing exceptions.
True if any of the key values are null, which means that the EntityKey will also be null.
An actual EntityKey, or null if any of the key values are null.
The key name/key value pairs of the key, in which some of the key values may be null.
Allows configuration to be performed for an complex type in a model.
A ComplexTypeConfiguration can be obtained via the ComplexType method on
or a custom type derived from ComplexTypeConfiguration
can be registered via the Configurations property on .
The complex type to be configured.
Allows configuration to be performed for a type in a model.
The type to be configured.
Configures a property that is defined on this type.
The type of the property being configured.
A lambda expression representing the property to be configured. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty
A configuration object that can be used to configure the property.
Configures a property that is defined on this type.
The type of the property being configured.
A lambda expression representing the property to be configured. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty
A configuration object that can be used to configure the property.
Configures a property that is defined on this type.
A lambda expression representing the property to be configured. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty
A configuration object that can be used to configure the property.
Configures a property that is defined on this type.
A lambda expression representing the property to be configured. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty
A configuration object that can be used to configure the property.
Configures a property that is defined on this type.
A lambda expression representing the property to be configured. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty
A configuration object that can be used to configure the property.
Configures a property that is defined on this type.
A lambda expression representing the property to be configured. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty
A configuration object that can be used to configure the property.
Configures a property that is defined on this type.
A lambda expression representing the property to be configured. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty
A configuration object that can be used to configure the property.
Configures a property that is defined on this type.
A lambda expression representing the property to be configured. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty
A configuration object that can be used to configure the property.
Configures a property that is defined on this type.
A lambda expression representing the property to be configured. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty
A configuration object that can be used to configure the property.
Configures a property that is defined on this type.
A lambda expression representing the property to be configured. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty
A configuration object that can be used to configure the property.
Configures a property that is defined on this type.
A lambda expression representing the property to be configured. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty
A configuration object that can be used to configure the property.
Configures a property that is defined on this type.
A lambda expression representing the property to be configured. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty
A configuration object that can be used to configure the property.
Configures a property that is defined on this type.
A lambda expression representing the property to be configured. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty
A configuration object that can be used to configure the property.
Configures a property that is defined on this type.
A lambda expression representing the property to be configured. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty
A configuration object that can be used to configure the property.
Gets the of the current instance.
The exact runtime type of the current instance.
Initializes a new instance of ComplexTypeConfiguration
Excludes a property from the model so that it will not be mapped to the database.
The type of the property to be ignored.
A lambda expression representing the property to be configured. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty
Identifies configurations that can be used when implementing
.
Gets the of the current instance.
The exact runtime type of the current instance.
Allows derived configuration classes for entities and complex types to be registered with a
.
Derived configuration classes are created by deriving from
or and using a type to be included in the model as the generic
parameter.
Configuration can be performed without creating derived configuration classes via the Entity and ComplexType
methods on .
Discovers all types that inherit from or
in the given assembly and adds an instance
of each discovered type to this registrar.
Note that only types that are abstract or generic type definitions are skipped. Every
type that is discovered and added must provide a parameterless constructor.
The assembly containing model configurations to add.
The same ConfigurationRegistrar instance so that multiple calls can be chained.
Adds an to the .
Only one can be added for each type in a model.
The entity type being configured.
The entity type configuration to be added.
The same ConfigurationRegistrar instance so that multiple calls can be chained.
Adds an to the .
Only one can be added for each type in a model.
The complex type being configured.
The complex type configuration to be added
The same ConfigurationRegistrar instance so that multiple calls can be chained.
Gets the of the current instance.
The exact runtime type of the current instance.
Allows the conventions used by a instance to be customized.
The default conventions can be found in the System.Data.Entity.ModelConfiguration.Conventions namespace.
Enables one or more conventions for the .
The conventions to be enabled.
Enables a convention for the .
The type of the convention to be enabled.
Enables a convention for the . This convention
will run after the one specified.
The type of the convention after which the enabled one will run.
The convention to enable.
Enables a configuration convention for the . This convention
will run before the one specified.
The type of the convention before which the enabled one will run.
The convention to enable.
Disables one or more conventions for the .
The conventions to be disabled.
Disables a convention for the .
The default conventions that are available for removal can be found in the System.Data.Entity.ModelConfiguration.Conventions namespace.
The type of the convention to be disabled.
Gets the of the current instance.
The exact runtime type of the current instance.
Configures the table and column mapping for an entity type or a sub-set of properties from an entity type.
This configuration functionality is available via the Code First Fluent API, see .
The entity type to be mapped.
Initializes a new instance of the class.
Configures the properties that will be included in this mapping fragment.
If this method is not called then all properties that have not yet been
included in a mapping fragment will be configured.
An anonymous type including the properties to be mapped.
A lambda expression to an anonymous type that contains the properties to be mapped. C#: t => new { t.Id, t.Property1, t.Property2 } VB.Net: Function(t) New With { p.Id, t.Property1, t.Property2 }
Configures a property that is included in this mapping fragment.
The type of the property being configured.
A lambda expression representing the property to be configured. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty
A configuration object that can be used to configure the property.
Configures a property that is included in this mapping fragment.
The type of the property being configured.
A lambda expression representing the property to be configured. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty
A configuration object that can be used to configure the property.
Configures a property that is included in this mapping fragment.
A lambda expression representing the property to be configured. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty
A configuration object that can be used to configure the property.
Configures a property that is included in this mapping fragment.
A lambda expression representing the property to be configured. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty
A configuration object that can be used to configure the property.
Configures a property that is included in this mapping fragment.
A lambda expression representing the property to be configured. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty
A configuration object that can be used to configure the property.
Configures a property that is included in this mapping fragment.
A lambda expression representing the property to be configured. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty
A configuration object that can be used to configure the property.
Configures a property that is included in this mapping fragment.
A lambda expression representing the property to be configured. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty
A configuration object that can be used to configure the property.
Configures a property that is included in this mapping fragment.
A lambda expression representing the property to be configured. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty
A configuration object that can be used to configure the property.
Configures a property that is included in this mapping fragment.
A lambda expression representing the property to be configured. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty
A configuration object that can be used to configure the property.
Configures a property that is included in this mapping fragment.
A lambda expression representing the property to be configured. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty
A configuration object that can be used to configure the property.
Configures a property that is included in this mapping fragment.
A lambda expression representing the property to be configured. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty
A configuration object that can be used to configure the property.
Configures a property that is included in this mapping fragment.
A lambda expression representing the property to be configured. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty
A configuration object that can be used to configure the property.
Configures a property that is included in this mapping fragment.
A lambda expression representing the property to be configured. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty
A configuration object that can be used to configure the property.
Configures a property that is included in this mapping fragment.
A lambda expression representing the property to be configured. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty
A configuration object that can be used to configure the property.
Re-maps all properties inherited from base types.
When configuring a derived type to be mapped to a separate table this will cause all properties to
be included in the table rather than just the non-inherited properties. This is known as
Table per Concrete Type (TPC) mapping.
Configures the table name to be mapped to.
Name of the table.
Configures the table name and schema to be mapped to.
Name of the table.
Schema of the table.
Configures the discriminator column used to differentiate between types in an inheritance hierarchy.
The name of the discriminator column.
A configuration object to further configure the discriminator column and values.
Configures the discriminator condition used to differentiate between types in an inheritance hierarchy.
The type of the property being used to discriminate between types.
A lambda expression representing the property being used to discriminate between types. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty
A configuration object to further configure the discriminator condition.
Gets the of the current instance.
The exact runtime type of the current instance.
Moves a foreign key constraint from oldTable to newTable and updates column references
Move any FK constraints that are now completely in newTable and used to refer to oldColumn
Used to configure a column with length facets for an entity type or complex type. This configuration functionality is exposed by the Code First Fluent API, see .
Configures a primitive column from an entity type.
Configures the primitive column to be optional.
The same instance so that multiple calls can be chained.
Configures the primitive column to be required.
The same instance so that multiple calls can be chained.
Configures the data type of the primitive column used to store the property.
The same instance so that multiple calls can be chained.
The name of the database provider specific data type.
Configures the order of the primitive column used to store the property. This method is also used to specify key ordering when an entity type has a composite key.
The same instance so that multiple calls can be chained.
The order that this column should appear in the database table.
Gets the of the current instance.
The exact runtime type of the current instance.
Configures the column to allow the maximum length supported by the database provider.
The same instance so that multiple calls can be chained.
Configures the column to have the specified maximum length.
The same instance so that multiple calls can be chained.
The maximum length for the column. Setting the value to null will remove any maximum length restriction from the column and a default length will be used for the database column.
Configures the column to be fixed length.
The same instance so that multiple calls can be chained.
Configures the column to be variable length.
The same instance so that multiple calls can be chained.
Configures a condition used to discriminate between types in an inheritance hierarchy based on the values assigned to a property.
This configuration functionality is available via the Code First Fluent API, see .
Configures the condition to require a value in the property.
Rows that do not have a value assigned to column that this property is stored in are
assumed to be of the base type of this entity type.
Gets the of the current instance.
The exact runtime type of the current instance.
Populate the table mapping structure
Sets nullability for association set mappings' foreign keys for 1:* and 1:0..1 associations
when no base types share the the association set mapping's table
Makes sure only the required property mappings are present
Determines if the table and entity type need mapping, and if not, removes the existing entity type mapping
Configures a database column used to store a string values.
This configuration functionality is available via the Code First Fluent API, see .
Configures the column to allow the maximum length supported by the database provider.
The same StringColumnConfiguration instance so that multiple calls can be chained.
Configures the property to have the specified maximum length.
The maximum length for the property. Setting 'null' will result in a default length being used for the column.
The same StringColumnConfiguration instance so that multiple calls can be chained.
Configures the column to be fixed length.
Use HasMaxLength to set the length that the property is fixed to.
The same StringColumnConfiguration instance so that multiple calls can be chained.
Configures the column to be variable length.
Columns are variable length by default.
The same StringColumnConfiguration instance so that multiple calls can be chained.
Configures the column to be optional.
The same StringColumnConfiguration instance so that multiple calls can be chained.
Configures the column to be required.
The same StringColumnConfiguration instance so that multiple calls can be chained.
Configures the data type of the database column.
Name of the database provider specific data type.
The same StringColumnConfiguration instance so that multiple calls can be chained.
Configures the order of the database column.
The order that this column should appear in the database table.
The same StringColumnConfiguration instance so that multiple calls can be chained.
Configures the column to support Unicode string content.
The same StringColumnConfiguration instance so that multiple calls can be chained.
Configures whether or not the column supports Unicode string content.
Value indicating if the column supports Unicode string content or not. Specifying 'null' will remove the Unicode facet from the column. Specifying 'null' will cause the same runtime behavior as specifying 'false'.
The same StringColumnConfiguration instance so that multiple calls can be chained.
Configures a discriminator column used to differentiate between types in an inheritance hierarchy.
This configuration functionality is available via the Code First Fluent API, see .
Configures the discriminator value used to identify the entity type being
configured from other types in the inheritance hierarchy.
Type of the discriminator value.
The value to be used to identify the entity type.
A configuration object to configure the column used to store discriminator values.
Configures the discriminator value used to identify the entity type being
configured from other types in the inheritance hierarchy.
Type of the discriminator value.
The value to be used to identify the entity type.
A configuration object to configure the column used to store discriminator values.
Configures the discriminator value used to identify the entity type being
configured from other types in the inheritance hierarchy.
The value to be used to identify the entity type.
A configuration object to configure the column used to store discriminator values.
Gets the of the current instance.
The exact runtime type of the current instance.
Allows configuration to be performed for a model.
Registers an entity type as part of the model and returns an object that can
be used to configure the entity. This method can be called multiple times
for the same entity to perform multiple configurations.
The type to be registered or configured.
The configuration object for the specified entity type.
Types registered as an entity type may later be changed to a complex type by
the .
Registers a type as a complex type in the model and returns an object that
can be used to configure the complex type. This method can be called
multiple times for the same type to perform multiple configurations.
The type to be registered or configured.
The configuration object for the specified entity type.
Excludes a type from the model.
The type to be excluded.
Gets a value indicating whether the specified type has been configured as a
complex type in the model.
The type to test.
True if the type is a complex type; false otherwise.
Gets a value indicating whether the specified type has been excluded from
the model.
The type to test.
True if the type is excluded; false otherwise.
Gets the properties that have been configured in this model for a given type.
The properties that have been configured in this model.
The type to get configured properties for.
Gets a value indicating whether the specified property is excluded from the model.
true if the property is excluded; otherwise, false.
The type that the property belongs to.
The property to be checked.
Initializes configurations in the ModelConfiguration so that configuration data
is in a single place
Gets a collection of types that have been configured in this model including
entity types, complex types, and ignored types.
Gets or sets the default schema name.
Gets or sets the default model namespace.
Used to configure a constraint on a navigation property.
Gets a value indicating whether the constraint has been fully specified
using the Code First Fluent API.
Used to configure a foreign key constraint on a navigation property.
Initializes a new instance of the ForeignKeyConstraintConfiguration class.
Configures the foreign key property(s) for this end of the navigation property.
The property to be used as the foreign key. If the foreign key is made up of multiple properties, call this method once for each of them.
Configures a many relationship from an entity type.
The entity type that the relationship originates from.
The entity type that the relationship targets.
Configures the relationship to be many:many with a navigation property on the other side of the relationship.
An lambda expression representing the navigation property on the other end of the relationship. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty
A configuration object that can be used to further configure the relationship.
Configures the relationship to be many:many without a navigation property on the other side of the relationship.
A configuration object that can be used to further configure the relationship.
Configures the relationship to be many:required with a navigation property on the other side of the relationship.
An lambda expression representing the navigation property on the other end of the relationship. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty
A configuration object that can be used to further configure the relationship.
Configures the relationship to be many:required without a navigation property on the other side of the relationship.
A configuration object that can be used to further configure the relationship.
Configures the relationship to be many:optional with a navigation property on the other side of the relationship.
An lambda expression representing the navigation property on the other end of the relationship. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty
A configuration object that can be used to further configure the relationship.
Configures the relationship to be many:optional without a navigation property on the other side of the relationship.
A configuration object that can be used to further configure the relationship.
Gets the of the current instance.
The exact runtime type of the current instance.
Configures an optional relationship from an entity type.
The entity type that the relationship originates from.
The entity type that the relationship targets.
Configures the relationship to be optional:many with a navigation property on the other side of the relationship.
An lambda expression representing the navigation property on the other end of the relationship. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty
A configuration object that can be used to further configure the relationship.
Configures the relationship to be optional:many without a navigation property on the other side of the relationship.
A configuration object that can be used to further configure the relationship.
Configures the relationship to be optional:required with a navigation property on the other side of the relationship.
An lambda expression representing the navigation property on the other end of the relationship. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty
A configuration object that can be used to further configure the relationship.
Configures the relationship to be optional:required without a navigation property on the other side of the relationship.
A configuration object that can be used to further configure the relationship.
Configures the relationship to be optional:optional with a navigation property on the other side of the relationship.
The entity type being configured will be the dependent and contain a foreign key to the principal.
The entity type that the relationship targets will be the principal in the relationship.
An lambda expression representing the navigation property on the other end of the relationship. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty
A configuration object that can be used to further configure the relationship.
Configures the relationship to be optional:optional without a navigation property on the other side of the relationship.
The entity type being configured will be the dependent and contain a foreign key to the principal.
The entity type that the relationship targets will be the principal in the relationship.
A configuration object that can be used to further configure the relationship.
Configures the relationship to be optional:optional with a navigation property on the other side of the relationship.
The entity type being configured will be the principal in the relationship.
The entity type that the relationship targets will be the dependent and contain a foreign key to the principal.
A lambda expression representing the navigation property on the other end of the relationship.
A configuration object that can be used to further configure the relationship.
Configures the relationship to be optional:optional without a navigation property on the other side of the relationship.
The entity type being configured will be the principal in the relationship.
The entity type that the relationship targets will be the dependent and contain a foreign key to the principal.
A configuration object that can be used to further configure the relationship.
Gets the of the current instance.
The exact runtime type of the current instance.
Configures an required relationship from an entity type.
The entity type that the relationship originates from.
The entity type that the relationship targets.
Configures the relationship to be required:many with a navigation property on the other side of the relationship.
An lambda expression representing the navigation property on the other end of the relationship. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty
A configuration object that can be used to further configure the relationship.
Configures the relationship to be required:many without a navigation property on the other side of the relationship.
A configuration object that can be used to further configure the relationship.
Configures the relationship to be required:optional with a navigation property on the other side of the relationship.
An lambda expression representing the navigation property on the other end of the relationship. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty
A configuration object that can be used to further configure the relationship.
Configures the relationship to be required:optional without a navigation property on the other side of the relationship.
A configuration object that can be used to further configure the relationship.
Configures the relationship to be required:required with a navigation property on the other side of the relationship.
The entity type being configured will be the dependent and contain a foreign key to the principal.
The entity type that the relationship targets will be the principal in the relationship.
An lambda expression representing the navigation property on the other end of the relationship. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty
A configuration object that can be used to further configure the relationship.
Configures the relationship to be required:required without a navigation property on the other side of the relationship.
The entity type being configured will be the dependent and contain a foreign key to the principal.
The entity type that the relationship targets will be the principal in the relationship.
A configuration object that can be used to further configure the relationship.
Configures the relationship to be required:required with a navigation property on the other side of the relationship.
The entity type being configured will be the principal in the relationship.
The entity type that the relationship targets will be the dependent and contain a foreign key to the principal.
An lambda expression representing the navigation property on the other end of the relationship. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty
A configuration object that can be used to further configure the relationship.
Configures the relationship to be required:required without a navigation property on the other side of the relationship.
The entity type being configured will be the principal in the relationship.
The entity type that the relationship targets will be the dependent and contain a foreign key to the principal.
A configuration object that can be used to further configure the relationship.
Gets the of the current instance.
The exact runtime type of the current instance.
Used to configure an independent constraint on a navigation property.
Gets the Singleton instance of the IndependentConstraintConfiguration class.
Used to configure a navigation property.
Base class for configuring a property on an entity type or complex type.
Gets or sets the action to take when a delete operation is attempted.
Gets or sets the multiplicity of this end of the navigation property.
Gets or sets the constraint associated with the navigation property.
This property uses for
foreign key constraints and
for independent constraints.
True if the NavigationProperty's declaring type is the principal end, false if it is not, null if it is not known
Base class for performing configuration of a relationship.
This configuration functionality is available via the Code First Fluent API, see .
Configures a relationship that can support cascade on delete functionality.
Initializes a new instance of the class.
Configures cascade delete to be on for the relationship.
Configures whether or not cascade delete is on for the relationship.
Value indicating if cascade delete is on or not.
Gets the of the current instance.
The exact runtime type of the current instance.
Configures a relationship that can support foreign key properties that are exposed in the object model.
This configuration functionality is available via the Code First Fluent API, see .
The dependent entity type.
Configures a relationship that can only support foreign key properties that are not exposed in the object model.
This configuration functionality is available via the Code First Fluent API, see .
Configures the relationship to use foreign key property(s) that are not exposed in the object model.
The column(s) and table can be customized by specifying a configuration action.
If an empty configuration action is specified then column name(s) will be generated by convention.
If foreign key properties are exposed in the object model then use the HasForeignKey method.
Not all relationships support exposing foreign key properties in the object model.
Action that configures the foreign key column(s) and table.
A configuration object that can be used to further configure the relationship.
Configures the relationship to use foreign key property(s) that are exposed in the object model.
If the foreign key property(s) are not exposed in the object model then use the Map method.
The type of the key.
A lambda expression representing the property to be used as the foreign key. If the foreign key is made up of multiple properties then specify an anonymous type including the properties. When using multiple foreign key properties, the properties must be specified in the same order that the the primary key properties were configured for the principal entity type.
A configuration object that can be used to further configure the relationship.
Configures the table and column mapping of a relationship that does not expose foreign key properties in the object model.
This configuration functionality is available via the Code First Fluent API, see .
Configures the name of the column(s) for the foreign key.
The foreign key column names. When using multiple foreign key properties, the properties must be specified in the same order that the the primary key properties were configured for the target entity type.
The same ForeignKeyAssociationMappingConfiguration instance so that multiple calls can be chained.
Configures the table name that the foreign key column(s) reside in.
The table that is specified must already be mapped for the entity type.
If you want the foreign key(s) to reside in their own table then use the Map method
on to perform
entity splitting to create the table with just the primary key property. Foreign keys can
then be added to the table via this method.
Name of the table.
The same ForeignKeyAssociationMappingConfiguration instance so that multiple calls can be chained.
Configures the table name and schema that the foreign key column(s) reside in.
The table that is specified must already be mapped for the entity type.
If you want the foreign key(s) to reside in their own table then use the Map method
on to perform
entity splitting to create the table with just the primary key property. Foreign keys can
then be added to the table via this method.
Name of the table.
Schema of the table.
The same ForeignKeyAssociationMappingConfiguration instance so that multiple calls can be chained.
Configures the table and column mapping of a many:many relationship.
This configuration functionality is available via the Code First Fluent API, see .
Configures the join table name for the relationship.
Name of the table.
The same ManyToManyAssociationMappingConfiguration instance so that multiple calls can be chained.
Configures the join table name and schema for the relationship.
Name of the table.
Schema of the table.
The same ManyToManyAssociationMappingConfiguration instance so that multiple calls can be chained.
Configures the name of the column(s) for the left foreign key.
The left foreign key points to the parent entity of the navigation property specified in the HasMany call.
The foreign key column names. When using multiple foreign key properties, the properties must be specified in the same order that the the primary key properties were configured for the target entity type.
The same ManyToManyAssociationMappingConfiguration instance so that multiple calls can be chained.
Configures the name of the column(s) for the right foreign key.
The right foreign key points to the parent entity of the the navigation property specified in the WithMany call.
The foreign key column names. When using multiple foreign key properties, the properties must be specified in the same order that the the primary key properties were configured for the target entity type.
The same ManyToManyAssociationMappingConfiguration instance so that multiple calls can be chained.
Determines whether the specified object is equal to the current object.
true if the specified object is equal to the current object; otherwise, false.
The object to compare with the current object.
Configures a many:many relationship.
This configuration functionality is available via the Code First Fluent API, see .
Configures the foreign key column(s) and table used to store the relationship.
Action that configures the foreign key column(s) and table.
Configures stored procedures to be used for modifying this relationship.
The default conventions for procedure and parameter names will be used.
The same instance so that multiple calls can be chained.
Configures stored procedures to be used for modifying this relationship.
Configuration to override the default conventions for procedure and parameter names.
The same instance so that multiple calls can be chained.
Gets the of the current instance.
The exact runtime type of the current instance.
Used to configure a property of an entity type or complex type.
This configuration functionality is available via the Code First Fluent API, see .
Used to configure a property with length facets for an entity type or complex type.
This configuration functionality is available via the Code First Fluent API, see .
Used to configure a primitive property of an entity type or complex type.
This configuration functionality is available via the Code First Fluent API, see .
Configures the property to be optional.
The database column used to store this property will be nullable.
The same PrimitivePropertyConfiguration instance so that multiple calls can be chained.
Configures the property to be required.
The database column used to store this property will be non-nullable.
The same PrimitivePropertyConfiguration instance so that multiple calls can be chained.
Configures how values for the property are generated by the database.
The pattern used to generate values for the property in the database. Setting 'null' will remove the database generated pattern facet from the property. Setting 'null' will cause the same runtime behavior as specifying 'None'.
The same PrimitivePropertyConfiguration instance so that multiple calls can be chained.
Configures the property to be used as an optimistic concurrency token.
The same PrimitivePropertyConfiguration instance so that multiple calls can be chained.
Configures whether or not the property is to be used as an optimistic concurrency token.
Value indicating if the property is a concurrency token or not. Specifying 'null' will remove the concurrency token facet from the property. Specifying 'null' will cause the same runtime behavior as specifying 'false'.
The same PrimitivePropertyConfiguration instance so that multiple calls can be chained.
Configures the data type of the database column used to store the property.
Name of the database provider specific data type.
The same PrimitivePropertyConfiguration instance so that multiple calls can be chained.
Configures the name of the database column used to store the property.
The name of the column.
The same PrimitivePropertyConfiguration instance so that multiple calls can be chained.
Configures the name of the parameter used in stored procedures for this property.
Name of the parameter.
The same PrimitivePropertyConfiguration instance so that multiple calls can be chained.
Configures the order of the database column used to store the property.
This method is also used to specify key ordering when an entity type has a composite key.
The order that this column should appear in the database table.
The same PrimitivePropertyConfiguration instance so that multiple calls can be chained.
Gets the of the current instance.
The exact runtime type of the current instance.
Configures the property to allow the maximum length supported by the database provider.
The same LengthPropertyConfiguration instance so that multiple calls can be chained.
Configures the property to have the specified maximum length.
The maximum length for the property. Setting 'null' will remove any maximum length restriction from the property and a default length will be used for the database column.
The same LengthPropertyConfiguration instance so that multiple calls can be chained.
Configures the property to be fixed length.
Use HasMaxLength to set the length that the property is fixed to.
The same LengthPropertyConfiguration instance so that multiple calls can be chained.
Configures the property to be variable length.
Properties are variable length by default.
The same LengthPropertyConfiguration instance so that multiple calls can be chained.
Configures the property to allow the maximum length supported by the database provider.
The same BinaryPropertyConfiguration instance so that multiple calls can be chained.
Configures the property to have the specified maximum length.
The maximum length for the property. Setting 'null' will remove any maximum length restriction from the property.
The same BinaryPropertyConfiguration instance so that multiple calls can be chained.
Configures the property to be fixed length.
Use HasMaxLength to set the length that the property is fixed to.
The same BinaryPropertyConfiguration instance so that multiple calls can be chained.
Configures the property to be variable length.
properties are variable length by default.
The same BinaryPropertyConfiguration instance so that multiple calls can be chained.
Configures the property to be optional.
The database column used to store this property will be nullable.
properties are optional by default.
The same BinaryPropertyConfiguration instance so that multiple calls can be chained.
Configures the property to be required.
The database column used to store this property will be non-nullable.
The same BinaryPropertyConfiguration instance so that multiple calls can be chained.
Configures how values for the property are generated by the database.
The pattern used to generate values for the property in the database. Setting 'null' will remove the database generated pattern facet from the property. Setting 'null' will cause the same runtime behavior as specifying 'None'.
The same BinaryPropertyConfiguration instance so that multiple calls can be chained.
Configures the property to be used as an optimistic concurrency token.
The same BinaryPropertyConfiguration instance so that multiple calls can be chained.
Configures whether or not the property is to be used as an optimistic concurrency token.
Value indicating if the property is a concurrency token or not. Specifying 'null' will remove the concurrency token facet from the property. Specifying 'null' will cause the same runtime behavior as specifying 'false'.
The same BinaryPropertyConfiguration instance so that multiple calls can be chained.
Configures the name of the database column used to store the property.
The name of the column.
The same BinaryPropertyConfiguration instance so that multiple calls can be chained.
Configures the data type of the database column used to store the property.
Name of the database provider specific data type.
The same BinaryPropertyConfiguration instance so that multiple calls can be chained.
Configures the order of the database column used to store the property.
This method is also used to specify key ordering when an entity type has a composite key.
The order that this column should appear in the database table.
The same BinaryPropertyConfiguration instance so that multiple calls can be chained.
Configures the property to be a row version in the database.
The actual data type will vary depending on the database provider being used.
Setting the property to be a row version will automatically configure it to be an
optimistic concurrency token.
The same BinaryPropertyConfiguration instance so that multiple calls can be chained.
Used to configure a property of an entity type or complex type.
This configuration functionality is available via the Code First Fluent API, see .
Configures the property to be optional.
The database column used to store this property will be nullable.
The same DateTimePropertyConfiguration instance so that multiple calls can be chained.
Configures the property to be required.
The database column used to store this property will be non-nullable.
properties are required by default.
The same DateTimePropertyConfiguration instance so that multiple calls can be chained.
Configures how values for the property are generated by the database.
The pattern used to generate values for the property in the database. Setting 'null' will remove the database generated pattern facet from the property. Setting 'null' will cause the same runtime behavior as specifying 'None'.
The same DateTimePropertyConfiguration instance so that multiple calls can be chained.
Configures the property to be used as an optimistic concurrency token.
The same DateTimePropertyConfiguration instance so that multiple calls can be chained.
Configures whether or not the property is to be used as an optimistic concurrency token.
Value indicating if the property is a concurrency token or not. Specifying 'null' will remove the concurrency token facet from the property. Specifying 'null' will cause the same runtime behavior as specifying 'false'.
The same DateTimePropertyConfiguration instance so that multiple calls can be chained.
Configures the name of the database column used to store the property.
The name of the column.
The same DateTimePropertyConfiguration instance so that multiple calls can be chained.
Configures the data type of the database column used to store the property.
Name of the database provider specific data type.
The same DateTimePropertyConfiguration instance so that multiple calls can be chained.
Configures the order of the database column used to store the property.
This method is also used to specify key ordering when an entity type has a composite key.
The order that this column should appear in the database table.
The same DateTimePropertyConfiguration instance so that multiple calls can be chained.
Configures the precision of the property.
If the database provider does not support precision for the data type of the column then the value is ignored.
Precision of the property.
The same DateTimePropertyConfiguration instance so that multiple calls can be chained.
Used to configure a property of an entity type or complex type.
This configuration functionality is available via the Code First Fluent API, see .
Configures the property to be optional.
The database column used to store this property will be nullable.
The same DecimalPropertyConfiguration instance so that multiple calls can be chained.
Configures the property to be required.
The database column used to store this property will be non-nullable.
properties are required by default.
The same DecimalPropertyConfiguration instance so that multiple calls can be chained.
Configures how values for the property are generated by the database.
The pattern used to generate values for the property in the database. Setting 'null' will remove the database generated pattern facet from the property. Setting 'null' will cause the same runtime behavior as specifying 'None'.
The same DecimalPropertyConfiguration instance so that multiple calls can be chained.
Configures the property to be used as an optimistic concurrency token.
The same DecimalPropertyConfiguration instance so that multiple calls can be chained.
Configures whether or not the property is to be used as an optimistic concurrency token.
Value indicating if the property is a concurrency token or not. Specifying 'null' will remove the concurrency token facet from the property. Specifying 'null' will cause the same runtime behavior as specifying 'false'.
The same DecimalPropertyConfiguration instance so that multiple calls can be chained.
Configures the name of the database column used to store the property.
The name of the column.
The same DecimalPropertyConfiguration instance so that multiple calls can be chained.
Configures the data type of the database column used to store the property.
Name of the database provider specific data type.
The same DecimalPropertyConfiguration instance so that multiple calls can be chained.
Configures the order of the database column used to store the property.
This method is also used to specify key ordering when an entity type has a composite key.
The order that this column should appear in the database table.
The same DecimalPropertyConfiguration instance so that multiple calls can be chained.
Configures the precision and scale of the property.
The precision of the property.
The scale of the property.
The same DecimalPropertyConfiguration instance so that multiple calls can be chained.
Used to configure a property of an entity type or complex type.
This configuration functionality is available via the Code First Fluent API, see .
Configures the property to allow the maximum length supported by the database provider.
The same StringPropertyConfiguration instance so that multiple calls can be chained.
Configures the property to have the specified maximum length.
The maximum length for the property. Setting 'null' will remove any maximum length restriction from the property and a default length will be used for the database column..
The same StringPropertyConfiguration instance so that multiple calls can be chained.
Configures the property to be fixed length.
Use HasMaxLength to set the length that the property is fixed to.
The same StringPropertyConfiguration instance so that multiple calls can be chained.
Configures the property to be variable length.
properties are variable length by default.
The same StringPropertyConfiguration instance so that multiple calls can be chained.
Configures the property to be optional.
The database column used to store this property will be nullable.
properties are optional by default.
The same StringPropertyConfiguration instance so that multiple calls can be chained.
Configures the property to be required.
The database column used to store this property will be non-nullable.
The same StringPropertyConfiguration instance so that multiple calls can be chained.
Configures how values for the property are generated by the database.
The pattern used to generate values for the property in the database. Setting 'null' will remove the database generated pattern facet from the property. Setting 'null' will cause the same runtime behavior as specifying 'None'.
The same StringPropertyConfiguration instance so that multiple calls can be chained.
Configures the property to be used as an optimistic concurrency token.
The same StringPropertyConfiguration instance so that multiple calls can be chained.
Configures whether or not the property is to be used as an optimistic concurrency token.
Value indicating if the property is a concurrency token or not. Specifying 'null' will remove the concurrency token facet from the property. Specifying 'null' will cause the same runtime behavior as specifying 'false'.
The same StringPropertyConfiguration instance so that multiple calls can be chained.
Configures the name of the database column used to store the property.
The name of the column.
The same StringPropertyConfiguration instance so that multiple calls can be chained.
Configures the data type of the database column used to store the property.
Name of the database provider specific data type.
The same StringPropertyConfiguration instance so that multiple calls can be chained.
Configures the order of the database column used to store the property.
This method is also used to specify key ordering when an entity type has a composite key.
The order that this column should appear in the database table.
The same StringPropertyConfiguration instance so that multiple calls can be chained.
Configures the property to support Unicode string content.
The same StringPropertyConfiguration instance so that multiple calls can be chained.
Configures whether or not the property supports Unicode string content.
Value indicating if the property supports Unicode string content or not. Specifying 'null' will remove the Unicode facet from the property. Specifying 'null' will cause the same runtime behavior as specifying 'false'.
The same StringPropertyConfiguration instance so that multiple calls can be chained.
Used to configure a property of an entity type or
complex type.
Used to configure a property with length facets for an entity type or
complex type.
Used to configure a primitive property of an entity type or complex type.
Initializes a new instance of the PrimitivePropertyConfiguration class.
Initializes a new instance of the
class with the same settings as another configuration.
The configuration to copy settings from.
Gets a value that indicates whether the provided model is compatible with the current model provider.
true if the provided model is compatible with the current model provider; otherwise, false.
The original property expression that specifies the member and instance.
The property to compare.
The error message.
The type of the property.
The type of the configuration to look for.
Gets a value that indicates whether the provided model is compatible with the current model provider.
true if the provided model is compatible with the current model provider; otherwise, false.
The property expression.
The property to compare.
The error message.
The type of the configuration to look for.
Gets a value that indicates whether the provided model is compatible with the current model provider.
true if the provided model is compatible with the current model provider; otherwise, false.
The configuration property.
The property to compare
The type property.
Gets a value that indicates whether the provided model is compatible with the current model provider.
true if the provided model is compatible with the current model provider; otherwise, false.
The configuration property.
The property to compare.
Gets a value indicating whether the property is optional.
Gets or sets the concurrency mode to use for the property.
Gets or sets the pattern used to generate values in the database for the
property.
Gets or sets the type of the database column used to store the property.
Gets or sets the name of the database column used to store the property.
Gets or sets the name of the parameter used in stored procedures for this property.
The name of the parameter used in stored procedures for this property.
Gets or sets the order of the database column used to store the property.
Initializes a new instance of the LengthPropertyConfiguration class.
Initializes a new instance of the
class with the same settings as another configuration.
The configuration to copy settings from.
Gets or sets a value indicating whether the property is fixed length.
Gets or sets the maximum length of the property.
Gets or sets a value indicating whether the property allows the maximum
length supported by the database provider.
Initializes a new instance of the BinaryPropertyConfiguration class.
Gets or sets a value indicating whether the property is a row version in the
database.
Used to configure a property of an entity type or
complex type.
Initializes a new instance of the DateTimePropertyConfiguration class.
Gets or sets the precision of the property.
Used to configure a property of an entity type or
complex type.
Initializes a new instance of the DecimalPropertyConfiguration class.
Gets or sets the precision of the property.
Gets or sets the scale of the property.
Indicates what parts of a configuration are overridable.
Nothing in the configuration is overridable.
The configuration values related to C-Space are overridable.
The configuration values only related to S-Space are overridable.
Used to configure a property of an entity type or
complex type.
Initializes a new instance of the StringPropertyConfiguration class.
Gets or sets a value indicating whether the property supports Unicode string
content.
Allows configuration to be performed for a complex type in a model.
Allows configuration to be performed for a type in a model.
Excludes a property from the model so that it will not be mapped to the database.
The property to be configured.
Allows configuration to be performed for an entity type in a model.
Configures the primary key property(s) for this entity type.
The property to be used as the primary key. If the primary key is made up of multiple properties, call this method once for each of them.
Configures the table name that this entity type is mapped to.
The name of the table.
Configures the table name that this entity type is mapped to.
The name of the table.
The database schema of the table.
Gets a value indicating whether the name of the table has been configured.
True if this configuration can be replaced in the model configuration, false otherwise
This is only set to true for configurations that are registered automatically via the DbContext
Gets or sets the entity set name to be used for this entity type.
Gets the name of the table that this entity type is mapped to.
Gets the database schema of the table that this entity type is mapped to.
Convention to process instances of found on properties in the model
Convention to process instances of found on properties in the model.
Convention to process instances of found on properties in the model.
Convention to process instances of found on foreign key properties in the model.
Convention to process instances of found on properties in the model.
Convention to process instances of found on properties in the model.
Convention to process instances of found on properties in the model.
Convention to process instances of found on properties in the model.
Convention to process instances of found on navigation properties in the model.
Convention to process instances of found on primitive properties in the model.
Convention to process instances of found on properties in the model.
Convention to process instances of found on properties in the model.
Convention to process instances of found on types in the model.
Convention to process instances of found on types in the model.
Convention to process instances of found on types in the model.
Convention to detect navigation properties to be inverses of each other when only one pair
of navigation properties exists between the related types.
Convention to configure a type as a complex type if it has no primary key, no mapped base type and no navigation properties.
Convention to add a cascade delete to the join table from both tables involved in a many to many relationship.
Convention to ensure an invalid/unsupported mapping is not created when mapping inherited properties
Convention to set the table name to be a pluralized version of the entity type name.
Convention to set precision to 18 and scale to 2 for decimal properties.
Initializes a new instance of with the default precision and scale.
Initializes a new instance of with the specified precision and scale.
Precision
Scale
Convention to move primary key properties to appear first.
Convention to distinguish between optional and required relationships based on CLR nullability of the foreign key property.
Base class for conventions that discover foreign key properties.
When overriden returns true if should be part of the foreign key.
The association type being configured.
The dependent end.
The candidate property on the dependent end.
The principal end entity type.
A key property on the principal end that is a candidate target for the foreign key.
true if dependentProperty should be a part of the foreign key; otherwise, false.
Returns true if the convention supports pairs of entity types that have multiple associations defined between them.
Convention to process instances of found on navigation properties in the model.
Convention to detect primary key properties.
Recognized naming patterns in order of precedence are:
1. 'Id'
2. [type name]Id
Primary key detection is case insensitive.
Base class for conventions that discover primary key properties.
When overriden returns the subset of properties that will be part of the primary key.
The entity type.
The primitive types of the entities
The properties that should be part of the primary key.
Convention to discover foreign key properties whose names are a combination
of the dependent navigation property name and the principal type primary key property name(s).
Convention to enable cascade delete for any required relationships.
Convention to configure the primary key(s) of the dependent entity type as foreign key(s) in a one:one relationship.
Convention to set the entity set name to be a pluralized version of the entity type name.
Convention to discover foreign key properties whose names match the principal type primary key property name(s).
Convention to set a maximum length for properties whose type supports length facets. The default value is 128.
Initializes a new instance of with the default length.
Initializes a new instance of with the specified length.
Convention to set a default maximum length of 4000 for properties whose type supports length facets when SqlCe is the provider.
Convention to configure integer primary keys to be identity.
Checks for the PK property being an FK in a different table. A PK which is also an FK but
in the same table is used for table splitting and can still be an identity column because
the update pipeline is only inserting into one column of one table.
Convention to discover foreign key properties whose names are a combination
of the principal type name and the principal type primary key property name(s).
This class provide service for both the singularization and pluralization, it takes the word pairs
in the ctor following the rules that the first one is singular and the second one is plural.
Attempt to determine the principal and dependent ends of this association.
The following table illustrates the solution space.
Source | Target || Prin | Dep |
-------|--------||-------|-------|
1 | 1 || - | - |
1 | 0..1 || Sr | Ta |
1 | * || Sr | Ta |
0..1 | 1 || Ta | Sr |
0..1 | 0..1 || - | - |
0..1 | * || Sr | Ta |
* | 1 || Ta | Sr |
* | 0..1 || Ta | Sr |
* | * || - | - |
Allows configuration to be performed for an entity type in a model.
An EntityTypeConfiguration can be obtained via the Entity method on
or a custom type derived from EntityTypeConfiguration
can be registered via the Configurations property on .
Initializes a new instance of EntityTypeConfiguration
Configures the primary key property(s) for this entity type.
The type of the key.
A lambda expression representing the property to be used as the primary key. C#: t => t.Id VB.Net: Function(t) t.Id If the primary key is made up of multiple properties then specify an anonymous type including the properties. C#: t => new { t.Id1, t.Id2 } VB.Net: Function(t) New With { t.Id1, t.Id2 }
The same EntityTypeConfiguration instance so that multiple calls can be chained.
Configures the entity set name to be used for this entity type.
The entity set name can only be configured for the base type in each set.
The name of the entity set.
The same EntityTypeConfiguration instance so that multiple calls can be chained.
Excludes a property from the model so that it will not be mapped to the database.
The type of the property to be ignored.
A lambda expression representing the property to be configured. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty
Configures the table name that this entity type is mapped to.
The name of the table.
Configures the table name that this entity type is mapped to.
The name of the table.
The database schema of the table.
Configures this type to use stored procedures for insert, update and delete.
The default conventions for procedure and parameter names will be used.
The same configuration instance so that multiple calls can be chained.
Configures this type to use stored procedures for insert, update and delete.
Configuration to override the default conventions for procedure and parameter names.
The same configuration instance so that multiple calls can be chained.
Allows advanced configuration related to how this entity type is mapped to the database schema.
By default, any configuration will also apply to any type derived from this entity type.
Derived types can be configured via the overload of Map that configures a derived type or
by using an EntityTypeConfiguration for the derived type.
The properties of an entity can be split between multiple tables using multiple Map calls.
Calls to Map are additive, subsequent calls will not override configuration already preformed via Map.
An action that performs configuration against an
.
The same EntityTypeConfiguration instance so that multiple calls can be chained.
Allows advanced configuration related to how a derived entity type is mapped to the database schema.
Calls to Map are additive, subsequent calls will not override configuration already preformed via Map.
The derived entity type to be configured.
An action that performs configuration against an
.
The same EntityTypeConfiguration instance so that multiple calls can be chained.
Configures an optional relationship from this entity type.
Instances of the entity type will be able to be saved to the database without this relationship being specified.
The foreign key in the database will be nullable.
The type of the entity at the other end of the relationship.
A lambda expression representing the navigation property for the relationship. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty
A configuration object that can be used to further configure the relationship.
Configures a required relationship from this entity type.
Instances of the entity type will not be able to be saved to the database unless this relationship is specified.
The foreign key in the database will be non-nullable.
The type of the entity at the other end of the relationship.
A lambda expression representing the navigation property for the relationship. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty
A configuration object that can be used to further configure the relationship.
Configures a many relationship from this entity type.
The type of the entity at the other end of the relationship.
A lambda expression representing the navigation property for the relationship. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty
A configuration object that can be used to further configure the relationship.
Handles mapping from a CLR property to an EDM assocation and nav. prop.
Exception thrown by during model creation when an invalid model is generated.
Initializes a new instance of ModelValidationException
Initializes a new instance of ModelValidationException
The exception message.
Initializes a new instance of ModelValidationException
The exception message.
The inner exception.
Initializes a new instance of class serialization info and streaming context.
The serialization info.
The streaming context.
Determine if the given type type implements the given generic interface or derives from the given generic type,
and if so return the element type of the collection. If the type implements the generic interface several times
null will be returned.
The type to examine.
The generic type to be queried for.
null if isn't implemented or implemented multiple times,
otherwise the generic argument.
Determine if the given type type implements the given generic interface or derives from the given generic type,
and if so return the concrete types implemented.
The type to examine.
The generic type to be queried for.
The generic types constructed from and implemented by .
Returns true if a variable of this type can be assigned a null value
True if a reference type or a nullable value type, false otherwise
Exception thrown from when validating entities fails.
Initializes a new instance of DbEntityValidationException.
Initializes a new instance of DbEntityValidationException.
The exception message.
Initializes a new instance of DbEntityValidationException.
The exception message.
Validation results.
Initializes a new instance of DbEntityValidationException.
The exception message.
The inner exception.
Initializes a new instance of DbEntityValidationException.
The exception message.
Validation results.
The inner exception.
Subscribes the SerializeObjectState event.
Validation results.
Holds exception state that will be serialized when the exception is serialized.
Validation results.
Completes the deserialization.
The deserialized object.
Validation results.
Represents validation results for single entity.
Entity entry the results applies to. Never null.
List of instances. Never null. Can be empty meaning the entity is valid.
Creates an instance of class.
Entity entry the results applies to. Never null.
List of instances. Never null. Can be empty meaning the entity is valid.
Creates an instance of class.
Entity entry the results applies to. Never null.
List of instances. Never null. Can be empty meaning the entity is valid.
Gets an instance of the results applies to.
Gets validation errors. Never null.
Gets an indicator if the entity is valid.
Exception thrown from when an exception is thrown from the validation
code.
Initializes a new instance of DbUnexpectedValidationException.
Initializes a new instance of DbUnexpectedValidationException.
The exception message.
Initializes a new instance of DbUnexpectedValidationException.
The exception message.
The inner exception.
Initializes a new instance of DbUnexpectedValidationException with the specified serialization info and
context.
The serialization info.
The streaming context.
Validation error. Can be either entity or property level validation error.
Name of the invalid property. Can be null (e.g. for entity level validations).
Validation error message.
Creates an instance of .
Name of the invalid property. Can be null.
Validation error message. Can be null.
Gets name of the invalid property.
Gets validation error message.