Table of Contents

Struct ModificationCommandParameters

Namespace
Microsoft.EntityFrameworkCore.Update
Assembly
Microsoft.EntityFrameworkCore.Relational.dll

Parameters for creating a IModificationCommand instance.

This type is typically used by database providers; it is generally not used in application code.

public readonly struct ModificationCommandParameters : IEquatable<ModificationCommandParameters>
Implements
Inherited Members

Remarks

See Implementation of database providers and extensions for more information and examples.

Constructors

ModificationCommandParameters(ITable, IStoreStoredProcedure?, bool, bool, IComparer<IUpdateEntry>?, Func<string>?, IDiagnosticsLogger<Update>?)

Creates a new ModificationCommandParameters instance.

public ModificationCommandParameters(ITable table, IStoreStoredProcedure? storeStoredProcedure, bool sensitiveLoggingEnabled, bool detailedErrorsEnabled = false, IComparer<IUpdateEntry>? comparer = null, Func<string>? generateParameterName = null, IDiagnosticsLogger<DbLoggerCategory.Update>? logger = null)

Parameters

table ITable

The table containing the data to be modified.

storeStoredProcedure IStoreStoredProcedure

The stored procedure to use for updating the data.

sensitiveLoggingEnabled bool

Indicates whether potentially sensitive data (e.g. database values) can be logged.

detailedErrorsEnabled bool

Indicates whether detailed errors should be logged.

comparer IComparer<IUpdateEntry>

An IComparer<T> for Microsoft.EntityFrameworkCore.Update.IUpdateEntry.

generateParameterName Func<string>

A delegate to generate parameter names.

logger IDiagnosticsLogger<Update>

An Microsoft.EntityFrameworkCore.Diagnostics.IDiagnosticsLogger<> for Microsoft.EntityFrameworkCore.DbLoggerCategory.Update.

ModificationCommandParameters(ITable, bool, bool, IComparer<IUpdateEntry>?, Func<string>?, IDiagnosticsLogger<Update>?)

Creates a new ModificationCommandParameters instance.

public ModificationCommandParameters(ITable table, bool sensitiveLoggingEnabled, bool detailedErrorsEnabled = false, IComparer<IUpdateEntry>? comparer = null, Func<string>? generateParameterName = null, IDiagnosticsLogger<DbLoggerCategory.Update>? logger = null)

Parameters

table ITable

The table containing the data to be modified.

sensitiveLoggingEnabled bool

Indicates whether potentially sensitive data (e.g. database values) can be logged.

detailedErrorsEnabled bool

Indicates whether detailed errors should be logged.

comparer IComparer<IUpdateEntry>

An IComparer<T> for Microsoft.EntityFrameworkCore.Update.IUpdateEntry.

generateParameterName Func<string>

A delegate to generate parameter names.

logger IDiagnosticsLogger<Update>

An Microsoft.EntityFrameworkCore.Diagnostics.IDiagnosticsLogger<> for Microsoft.EntityFrameworkCore.DbLoggerCategory.Update.

Properties

Comparer

An IComparer<T> for Microsoft.EntityFrameworkCore.Update.IUpdateEntry.

public IComparer<IUpdateEntry>? Comparer { get; init; }

Property Value

IComparer<IUpdateEntry>

DetailedErrorsEnabled

Indicates whether detailed errors should be logged.

public bool DetailedErrorsEnabled { get; init; }

Property Value

bool

GenerateParameterName

A delegate to generate parameter names.

public Func<string>? GenerateParameterName { get; init; }

Property Value

Func<string>

Logger

A Microsoft.EntityFrameworkCore.Diagnostics.IDiagnosticsLogger<> for Microsoft.EntityFrameworkCore.DbLoggerCategory.Update.

public IDiagnosticsLogger<DbLoggerCategory.Update>? Logger { get; init; }

Property Value

IDiagnosticsLogger<Update>

Schema

The schema containing the table, or null to use the default schema.

public string? Schema { get; init; }

Property Value

string

SensitiveLoggingEnabled

Indicates whether potentially sensitive data (e.g. database values) can be logged.

public bool SensitiveLoggingEnabled { get; init; }

Property Value

bool

StoreStoredProcedure

The stored procedure to use for updating the data.

public IStoreStoredProcedure? StoreStoredProcedure { get; }

Property Value

IStoreStoredProcedure

Table

The table containing the data to be modified.

public ITable? Table { get; init; }

Property Value

ITable

TableName

The name of the table containing the data to be modified.

public string TableName { get; init; }

Property Value

string

Methods

Equals(ModificationCommandParameters)

public bool Equals(ModificationCommandParameters other)

Parameters

other ModificationCommandParameters

Returns

bool

Equals(object)

public override bool Equals(object obj)

Parameters

obj object

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

ToString()

public override string ToString()

Returns

string

Operators

operator ==(ModificationCommandParameters, ModificationCommandParameters)

public static bool operator ==(ModificationCommandParameters left, ModificationCommandParameters right)

Parameters

left ModificationCommandParameters
right ModificationCommandParameters

Returns

bool

operator !=(ModificationCommandParameters, ModificationCommandParameters)

public static bool operator !=(ModificationCommandParameters left, ModificationCommandParameters right)

Parameters

left ModificationCommandParameters
right ModificationCommandParameters

Returns

bool