Table of Contents

Class InMemoryCommandBuilderExtensions

Namespace
NextORM.Core
Assembly
nextorm.core.dll

Extension methods that register the data an EntityBuilder<TEntity> queries when it runs on the in-memory provider (InMemoryDataContext). Calls on any other provider are no-ops.

public static class InMemoryCommandBuilderExtensions
Inheritance
InMemoryCommandBuilderExtensions
Inherited Members

Methods

WithAsyncData<TEntity>(EntityBuilder<TEntity>, IAsyncEnumerable<TEntity>?)

Registers data as the asynchronous sequence queried for TEntity when builder runs on the in-memory provider. A null value clears the registration. Ignored by other providers.

public static EntityBuilder<TEntity> WithAsyncData<TEntity>(this EntityBuilder<TEntity> builder, IAsyncEnumerable<TEntity>? data)

Parameters

builder EntityBuilder<TEntity>

The builder to configure.

data IAsyncEnumerable<TEntity>

The source sequence, or null to clear the registration.

Returns

EntityBuilder<TEntity>

The same builder, to allow chaining.

Type Parameters

TEntity

The entity type the data is registered for.

WithData<TEntity>(EntityBuilder<TEntity>, IEnumerable<TEntity>?)

Registers data as the sequence queried for TEntity when builder runs on the in-memory provider. A null value clears the registration. Ignored by other providers.

public static EntityBuilder<TEntity> WithData<TEntity>(this EntityBuilder<TEntity> builder, IEnumerable<TEntity>? data)

Parameters

builder EntityBuilder<TEntity>

The builder to configure.

data IEnumerable<TEntity>

The source sequence, or null to clear the registration.

Returns

EntityBuilder<TEntity>

The same builder, to allow chaining.

Type Parameters

TEntity

The entity type the data is registered for.