DbContext.AddRange DbContext.AddRange Method

Definition

Overloads

AddRange(Object[]) AddRange(Object())

Begins tracking the given entities, and any other reachable entities that are not already being tracked, in the Added state such that they will be inserted into the database when SaveChanges() is called.

AddRange(IEnumerable<Object>) AddRange(IEnumerable(Of Object))

Begins tracking the given entities, and any other reachable entities that are not already being tracked, in the Added state such that they will be inserted into the database when SaveChanges() is called.

AddRange(Object[]) AddRange(Object())

Begins tracking the given entities, and any other reachable entities that are not already being tracked, in the Added state such that they will be inserted into the database when SaveChanges() is called.

public virtual void AddRange(params object[] entities)
Public Overridable Sub AddRange(ParamArray entities As Object())

Parameters

entities
System.Object[] System.Object()

The entities to add.

AddRange(IEnumerable<Object>) AddRange(IEnumerable(Of Object))

Begins tracking the given entities, and any other reachable entities that are not already being tracked, in the Added state such that they will be inserted into the database when SaveChanges() is called.

public virtual void AddRange(IEnumerable<object> entities)
Public Overridable Sub AddRange(entities As IEnumerable(Of Object))

Parameters

entities
System.Collections.Generic.IEnumerable<System.Object> System.Collections.Generic.IEnumerable(Of System.Object)

The entities to add.