/// <summary>
 /// Construtor padrão.
 /// </summary>
 /// <param name="name">Nome do filho.</param>
 /// <param name="propertyName">Nome da propriedade do filho na entidade.</param>
 /// <param name="dynamicChild">Dados do filho dinamico.</param>
 /// <param name="parentUidSetter"></param>
 /// <param name="parentValueGetter"></param>
 /// <param name="parentValueSetter"></param>
 /// <param name="isSingle"></param>
 /// <param name="parentLoader">Instancia do loader do pai.</param>
 /// <param name="options">Opções de carga.</param>
 public EntityLoaderDynamicChildInfo(string name, string propertyName, EntityDynamicChild dynamicChild, Func <IEntity, IEntity> parentValueGetter, Action <IEntity, IEntity> parentValueSetter, Action <IEntity, IEntity> parentUidSetter, bool isSingle, IEntityLoader parentLoader, LoadOptions options)
 {
     _name              = name;
     _propertyName      = propertyName;
     _dynamicChild      = dynamicChild;
     _isSingle          = isSingle;
     _parentUidSetter   = parentUidSetter ?? SetParentUid;
     _parentValueGetter = parentValueGetter;
     _parentValueSetter = parentValueSetter;
     _parentLoader      = parentLoader;
     _options           = options;
 }
예제 #2
0
 /// <summary>
 /// Construtor padrão.
 /// </summary>
 /// <param name="owner"></param>
 internal FluentEntityDynamicChild(EntityDynamicChild <TEntity, TModel> owner)
 {
     _owner = owner;
 }
예제 #3
0
 /// <summary>
 /// Construtor padrão.
 /// </summary>
 /// <param name="name">Nome do filho.</param>
 /// <param name="dynamicChild">Dados do filho dinamico.</param>
 /// <param name="parentProperty">Lambda da propriedade da entidade pai.</param>
 /// <param name="parentUidSetter"></param>
 /// <param name="isSingle"></param>
 /// <param name="parentLoader">Instancia do loader do pai.</param>
 /// <param name="options">Opções de carga.</param>
 public EntityLoaderDynamicChildInfo(string name, EntityDynamicChild dynamicChild, System.Linq.Expressions.Expression <Func <TParentEntity, IEntity> > parentProperty, Action <IEntity, IEntity> parentUidSetter, bool isSingle, IEntityLoader parentLoader, LoadOptions options) : base(name, parentProperty.GetMember().Name, dynamicChild, f => parentProperty.Compile()((TParentEntity)f), GetParentValueSetter(parentProperty), parentUidSetter, isSingle, parentLoader, options)
 {
 }