Class ContextExtensions
Extension methods for IContext.
Inheritance
System.Object
ContextExtensions
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Kephas.Data
Assembly: Kephas.Data.dll
Syntax
public static class ContextExtensions
Fields
| Improve this Doc View SourceInitialDataConfigurationName
Name of the initial data configuration.
Declaration
public const string InitialDataConfigurationName = "InitialData"
Field Value
Type | Description |
---|---|
System.String |
Methods
| Improve this Doc View SourceInitialData(IContext)
Gets the initial data.
Declaration
public static IEnumerable<IChangeStateTrackableEntityEntry> InitialData(this IContext context)
Parameters
Type | Name | Description |
---|---|---|
IContext | context | The context to act on. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<IChangeStateTrackableEntityEntry> | An enumeration of entity entry. |
WithInitialData<TContext>(TContext, IEnumerable<IChangeStateTrackableEntityEntry>)
Sets the initial data.
Declaration
public static TContext WithInitialData<TContext>(this TContext context, IEnumerable<IChangeStateTrackableEntityEntry> initialData)
where TContext : class, IContext
Parameters
Type | Name | Description |
---|---|---|
TContext | context | The context to act on. |
System.Collections.Generic.IEnumerable<IChangeStateTrackableEntityEntry> | initialData | The initial data as an enumeration of entities. |
Returns
Type | Description |
---|---|
TContext | This context. |
Type Parameters
Name | Description |
---|---|
TContext | Type of the context. |
WithInitialData<TContext>(TContext, IEnumerable<Object>)
Sets the initial data.
Declaration
public static TContext WithInitialData<TContext>(this TContext context, IEnumerable<object> initialData)
where TContext : class, IContext
Parameters
Type | Name | Description |
---|---|---|
TContext | context | The context to act on. |
System.Collections.Generic.IEnumerable<System.Object> | initialData | The initial data as an enumeration of entities. |
Returns
Type | Description |
---|---|
TContext | This context. |
Type Parameters
Name | Description |
---|---|
TContext | Type of the context. |
WithInitialData<TContext>(TContext, IEnumerable<(Object entity, ChangeState changeState)>)
Sets the initial data.
Declaration
public static TContext WithInitialData<TContext>(this TContext context, IEnumerable<(object entity, ChangeState changeState)> initialData)
where TContext : class, IContext
Parameters
Type | Name | Description |
---|---|---|
TContext | context | The context to act on. |
System.Collections.Generic.IEnumerable<System.ValueTuple<System.Object, ChangeState>> | initialData | The initial data. |
Returns
Type | Description |
---|---|
TContext | This context. |
Type Parameters
Name | Description |
---|---|
TContext | Type of the context. |