DbContext.Set DbContext.Set DbContext.Set Method

Definition

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

public virtual Microsoft.EntityFrameworkCore.DbSet<TEntity> Set<TEntity> () where TEntity : class;
abstract member Set : unit -> Microsoft.EntityFrameworkCore.DbSet<'Entity (requires 'Entity : null)> (requires 'Entity : null)
override this.Set : unit -> Microsoft.EntityFrameworkCore.DbSet<'Entity (requires 'Entity : null)> (requires 'Entity : null)
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

A set for the given entity type.

Applies to