Class MorpheoStorageExtensions
Provides extension methods for configuring storage providers within the Morpheo framework.
Inherited Members
Namespace: Morpheo.Core.Extensions
Assembly: Morpheo.Core.dll
Syntax
public static class MorpheoStorageExtensions
Methods
| Edit this page View SourceAddExternalDbSync<TContext>(IMorpheoBuilder, Action<DbContextOptionsBuilder>)
Registers an external database context to be synchronized by the Morpheo framework.
Declaration
public static IMorpheoBuilder AddExternalDbSync<TContext>(this IMorpheoBuilder builder, Action<DbContextOptionsBuilder> optionsAction) where TContext : DbContext
Parameters
| Type | Name | Description |
|---|---|---|
| IMorpheoBuilder | builder | The IMorpheoBuilder to configure. |
| Action<DbContextOptionsBuilder> | optionsAction | A delegate to configure the DbContextOptions for the external context. |
Returns
| Type | Description |
|---|---|
| IMorpheoBuilder | The IMorpheoBuilder instance for chaining configurations. |
Type Parameters
| Name | Description |
|---|---|
| TContext | The type of the external DbContext to synchronize. |
Remarks
This method registers a ISyncStrategyProvider that enables Morpheo to monitor and propagate changes
occurring in the specified TContext.
UseSqlite(IMorpheoBuilder, string?)
Configures the Morpheo node to use SQLite as the internal storage provider for synchronization logs and metadata.
Declaration
public static IMorpheoBuilder UseSqlite(this IMorpheoBuilder builder, string? connectionString = null)
Parameters
| Type | Name | Description |
|---|---|---|
| IMorpheoBuilder | builder | The IMorpheoBuilder to configure. |
| string | connectionString | The connection string to the SQLite database. If null or empty, a default database named 'morpheo.db' will be created in the local application data folder. |
Returns
| Type | Description |
|---|---|
| IMorpheoBuilder | The IMorpheoBuilder instance for chaining configurations. |