Ask Learn
Preview
Ask Learn is an AI assistant that can answer questions, clarify concepts, and define terms using trusted Microsoft documentation.
Please sign in to use Ask Learn.
Sign inThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Translate<TElement>(DbDataReader) |
Translates a DbDataReader that contains rows of entity data to objects of the requested entity type. |
Translate<TEntity>(DbDataReader, String, MergeOption) |
Translates a DbDataReader that contains rows of entity data to objects of the requested entity type, in a specific entity set, and with the specified merge option. |
Translates a DbDataReader that contains rows of entity data to objects of the requested entity type.
public:
generic <typename TElement>
System::Data::Objects::ObjectResult<TElement> ^ Translate(System::Data::Common::DbDataReader ^ reader);
public System.Data.Objects.ObjectResult<TElement> Translate<TElement>(System.Data.Common.DbDataReader reader);
member this.Translate : System.Data.Common.DbDataReader -> System.Data.Objects.ObjectResult<'Element>
Public Function Translate(Of TElement) (reader As DbDataReader) As ObjectResult(Of TElement)
The entity type of the data in the DbDataReader.
The DbDataReader that contains entity data to translate into entity objects.
An enumeration of objects of type TResult
.
When reader
is null
.
The Translate method is used to translate entity data from a DbDataReader into objects of the requested type. This process is performed automatically when an ObjectQuery<T> is executed to return entity data. The Translate method enables you to execute a standard ADO.NET query against a data source and translate the returned data rows into entity objects.
The supplied DbDataReader must contain data that maps to the requested entity type.
For more information, see:
Directly Executing Store Commands and
How to: Directly Execute Commands Against the Data Source
Product | Versions |
---|---|
.NET Framework | 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
Translates a DbDataReader that contains rows of entity data to objects of the requested entity type, in a specific entity set, and with the specified merge option.
public:
generic <typename TEntity>
System::Data::Objects::ObjectResult<TEntity> ^ Translate(System::Data::Common::DbDataReader ^ reader, System::String ^ entitySetName, System::Data::Objects::MergeOption mergeOption);
public System.Data.Objects.ObjectResult<TEntity> Translate<TEntity>(System.Data.Common.DbDataReader reader, string entitySetName, System.Data.Objects.MergeOption mergeOption);
member this.Translate : System.Data.Common.DbDataReader * string * System.Data.Objects.MergeOption -> System.Data.Objects.ObjectResult<'Entity>
Public Function Translate(Of TEntity) (reader As DbDataReader, entitySetName As String, mergeOption As MergeOption) As ObjectResult(Of TEntity)
The entity type of the data in the DbDataReader.
The DbDataReader that contains entity data to translate into entity objects.
The entity set of the TEntity
type.
The MergeOption to use when translated objects are added to the object context. The default is AppendOnly.
An enumeration of objects of type TResult
.
When reader
is null
.
When the supplied mergeOption
is not a valid MergeOption value.
When the supplied entitySetName
is not a valid entity set for the TResult
type.
The Translate method is used to translate entity data from a DbDataReader into objects of the requested type. This process is performed automatically when an ObjectQuery<T> is executed to return entity data. The Translate method enables you to execute a standard ADO.NET query against a data source and translate the returned data rows into entity objects.
The supplied DbDataReader must contain data that maps to the requested entity type.
For more information, see:
Directly Executing Store Commands and
How to: Directly Execute Commands Against the Data Source
Product | Versions |
---|---|
.NET Framework | 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET feedback
.NET is an open source project. Select a link to provide feedback:
Ask Learn is an AI assistant that can answer questions, clarify concepts, and define terms using trusted Microsoft documentation.
Please sign in to use Ask Learn.
Sign in