Skip to main content

DbContextEntitySet

Trait DbContextEntitySet 

Source
pub trait DbContextEntitySet<E: Entity>: DbContext {
    // Required method
    fn db_set(&self) -> &DbSet<E>;
}
Expand description

Gives generic code access to the DbSet<E> declared on a context.

#[derive(DbContext)] implements this for each entity set field.

Required Methods§

Source

fn db_set(&self) -> &DbSet<E>

Returns the typed set for entity E.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§