DbContext.Set<TEntity> DbContext.Set(Of TEntity) Method

Definition

Creates a DbSet<TEntity> that can be used to query and save instances of TEntity.

public virtual DbSet<TEntity> Set<TEntity>()where TEntity : class
Public Overridable Function Set(Of TEntity As Class) As DbSet(Of TEntity)

Type Parameters

TEntity

The type of entity for which a set should be returned.

Returns

DbSet<TEntity> DbSet(Of TEntity)

A set for the given entity type.