Class InMemoryCommandBuilderExtensions
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
builderEntityBuilder<TEntity>The builder to configure.
dataIAsyncEnumerable<TEntity>The source sequence, or
nullto clear the registration.
Returns
- EntityBuilder<TEntity>
The same builder, to allow chaining.
Type Parameters
TEntityThe 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
builderEntityBuilder<TEntity>The builder to configure.
dataIEnumerable<TEntity>The source sequence, or
nullto clear the registration.
Returns
- EntityBuilder<TEntity>
The same builder, to allow chaining.
Type Parameters
TEntityThe entity type the data is registered for.