Skip to main content

IDbSet

Trait IDbSet 

Source
pub trait IDbSet<T: IEntityType>:
    IQueryable<T>
    + Send
    + Sync {
    // Required methods
    fn clear_entries(&mut self);
    fn len(&self) -> usize;
    fn is_empty(&self) -> bool;
}
Expand description

Collection-level operations on a typed entity collection.

Mutation methods (add, attach, update, upsert, remove) are on DbContext, not here — they need to coordinate with ChangeTracker.

Required Methods§

Source

fn clear_entries(&mut self)

Clears all entries from the set (does not affect ChangeTracker).

Source

fn len(&self) -> usize

Returns the number of entries.

Source

fn is_empty(&self) -> bool

Returns whether the set is empty.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§