Interface IRawSqlCommandBuilder
- Namespace
- Microsoft.EntityFrameworkCore.Storage
- Assembly
- Microsoft.EntityFrameworkCore.Relational.dll
Creates commands based on raw SQL command text.
This type is typically used by database providers (and other extensions). It is generally not used in application code.
The service lifetime is Singleton. This means a single instance is used by many Microsoft.EntityFrameworkCore.DbContext instances. The implementation must be thread-safe. This service cannot depend on services registered as Scoped.
public interface IRawSqlCommandBuilder
Methods
Build(string)
Creates a new command based on SQL command text.
IRelationalCommand Build(string sql)
Parameters
sql
stringThe command text.
Returns
- IRelationalCommand
The newly created command.
Build(string, IEnumerable<object>)
Creates a new command based on SQL command text.
RawSqlCommand Build(string sql, IEnumerable<object> parameters)
Parameters
sql
stringThe command text.
parameters
IEnumerable<object>Parameters for the command.
Returns
- RawSqlCommand
The newly created command.