Class DefaultValueContainer<TKey>
- Namespace
- MASES.EntityFrameworkCore.KNet.Serialization.Json.Storage
- Assembly
- MASES.EntityFrameworkCore.KNet.Serialization.dll
The default ValueContainer used from KEFCore
public class DefaultValueContainer<TKey> : IValueContainer<TKey> where TKey : notnull
Type Parameters
TKey
It is the key Type passed from Entity Framework associated to the Entity data will be stored in the DefaultValueContainer<TKey>
- Inheritance
-
DefaultValueContainer<TKey>
- Implements
-
IValueContainer<TKey>
- Inherited Members
Constructors
DefaultValueContainer()
Initialize a new instance of DefaultValueContainer<TKey>
public DefaultValueContainer()
Remarks
It is mainly used from the JSON serializer
DefaultValueContainer(IEntityType, object[])
Initialize a new instance of DefaultValueContainer<TKey>
public DefaultValueContainer(IEntityType tName, object[] rData)
Parameters
tName
IEntityTypeThe IEntityType requesting the DefaultValueContainer<TKey> for
rData
rData
object[]The data, built from EFCore, to be stored in the DefaultValueContainer<TKey>
Remarks
This constructor is mandatory and it is used from KEFCore to request a DefaultValueContainer<TKey>
Properties
ClrType
The CLR Type of IEntityType
public string ClrType { get; set; }
Property Value
Data
The data stored associated to the IEntityType
public Dictionary<int, PropertyData>? Data { get; set; }
Property Value
EntityName
The Entity name of IEntityType
public string EntityName { get; set; }
Property Value
Methods
GetData(IEntityType, ref object[])
Returns back the raw data associated to the Entity
public void GetData(IEntityType tName, ref object[] array)
Parameters
tName
IEntityTypeThe requesting IEntityType to get the data back, can null if not available
array
object[]The array of object to be filled in with the data stored in the ValueContainer
GetProperties()
Returns back a dictionary of properties (PropertyIndex, PropertyName) associated to the Entity
public IReadOnlyDictionary<int, string> GetProperties()
Returns
- IReadOnlyDictionary<int, string>
A dictionary of properties (PropertyIndex, PropertyName) filled in with the data stored in the ValueContainer