Partilhar via


ILazyLoader Interface

Definition

A service that can be injected into entities to give them the capability of loading navigation properties automatically the first time they are accessed.

public interface ILazyLoader
public interface ILazyLoader : IDisposable
type ILazyLoader = interface
type ILazyLoader = interface
    interface IDisposable
Public Interface ILazyLoader
Public Interface ILazyLoader
Implements IDisposable
Implements

Remarks

The service lifetime is 'ServiceLifetime.Transient'. This means that each entity instance will use its own instance of this service. The implementation may depend on other services registered with any lifetime. The implementation does not need to be thread-safe.

See Lazy loading for more information and examples.

Methods

Dispose()

Disposes the loader.

IsLoaded(Object, String)

Gets whether or not the given navigation as known to be completely loaded or known to be no longer completely loaded.

Load(Object, String)

Loads a navigation property if it has not already been loaded.

LoadAsync(Object, CancellationToken, String)

Loads a navigation property if it has not already been loaded.

SetLoaded(Object, String, Boolean)

Sets the given navigation as known to be completely loaded or known to be no longer completely loaded.

Extension Methods

Load<TRelated>(ILazyLoader, Object, TRelated, String)

Loads a navigation property if it has not already been loaded.

Applies to