public EntityDataBuilder(IModelDataStorage <Type> storage, IEntityRelationship relationship) { storage_ = storage; relationship_ = relationship; }
public ForeignKey(Type dataType, PropertyInfo property, IEntityRelationship relationship) { DataType = dataType; Property = property; Relationship = relationship; }
#pragma warning disable CRR0026 // Unused member - called through Reflection private static void InitialiseSingleEntityRelationship <TRelatedEntity>(TEntity targetEntity, IEntityRelationship relationship, IMongoDbConnection connection) where TRelatedEntity : class { var dbEntityReader = new EntityReader <TRelatedEntity>(connection); var relationshipIdValue = relationship.IdProperty.GetValue(targetEntity); var loadedEntity = dbEntityReader.AsQueryable().WhereIdMatches(new[] { relationshipIdValue }).FirstOrDefault(); relationship.NavigationProperty.SetValue(targetEntity, loadedEntity); }