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


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


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


DbSet<TEntity> DbSet(Of TEntity)

A set for the given entity type.