Ejemplo n.º 1
0
 public IEnumerable <TW> GetAllRelated <TR, TW>(Expression <Func <TR, EntityReference> > relatedToParentAttribute,
                                                IColumnSet <TR> relatedColumnSet)
     where TR : Entity
     where TW : class, IEntityWrapper <TR> =>
 GetAllRelated(Helper.Name <TR>(), Helper.Name(relatedToParentAttribute), relatedColumnSet?.XrmColumnSet)
 .Select(w => w.ToWrapper <TR, TW>())
 .ToArray();
Ejemplo n.º 2
0
        public void Can_assign_derived_type_to_base_type()
        {
            var derivedColumnSet = new ColumnSet <xts_derivedentity>();
            IColumnSet <xts_entity> baseColumnSet = derivedColumnSet;

            Assert.Equal(derivedColumnSet.XrmColumnSet, baseColumnSet.XrmColumnSet);
        }
 IEnumerable <TWrapper> IEntityWrapperRelation <TE> .GetAllRelated <TR, TWrapper>(Expression <Func <TR, EntityReference> > relatedToParentAttribute, IColumnSet <TR> relatedColumnSet)
 => GetAllRelated <TR, TWrapper>(relatedToParentAttribute, relatedColumnSet);
 TWrapper IEntityWrapperRelation <TE> .GetRelated <TR, TWrapper>(Expression <Func <TE, EntityReference> > relatedReference, IColumnSet <TR> relatedColumnSet)
 => GetRelated <TR, TWrapper>(relatedReference, relatedColumnSet);
 // Explicit IEntityWrapperRelation<TE> interface implementation
 IEntityWrapper <TR> IEntityWrapperRelation <TE> .GetRelated <TR>(Expression <Func <TE, EntityReference> > relatedAttribute, IColumnSet <TR> relatedColumnSet)
 => GetRelated(relatedAttribute, relatedColumnSet);
 protected IEnumerable <TWrapper> GetAllRelated <TR, TWrapper>(Expression <Func <TR, EntityReference> > relatedToParentAttribute, IColumnSet <TR> relatedColumnSet)
     where TR : Entity
     where TWrapper : class, IEntityWrapper <TR>
 => Wrapper.GetAllRelated <TR, TWrapper>(relatedToParentAttribute, relatedColumnSet);
 protected TWrapper GetRelated <TR, TWrapper>(Expression <Func <TE, EntityReference> > relatedReference, IColumnSet <TR> relatedColumnSet)
     where TR : Entity
     where TWrapper : class, IEntityWrapper <TR>
 => Wrapper.GetRelated <TR, TWrapper>(relatedReference, relatedColumnSet);
 protected IEntityWrapper <TR> GetRelated <TR>(Expression <Func <TE, EntityReference> > relatedAttribute, IColumnSet <TR> relatedColumnSet)
     where TR : Entity => Wrapper.GetRelated(relatedAttribute, relatedColumnSet);
Ejemplo n.º 9
0
 public IEnumerable <IEntityWrapper <TR> > GetAllRelated <TR>(Expression <Func <TR, EntityReference> > relatedToParentAttribute,
                                                              IColumnSet <TR> relatedColumnSet)
     where TR : Entity =>
 GetAllRelated <TR, EntityWrapper <TR> >(relatedToParentAttribute, relatedColumnSet);
Ejemplo n.º 10
0
 public TW GetRelated <TR, TW>(Expression <Func <T, EntityReference> > relatedReference, IColumnSet <TR> relatedColumnSet)
     where TR : Entity
     where TW : class, IEntityWrapper <TR> =>
 GetRelated(Helper.Name(relatedReference), relatedColumnSet?.XrmColumnSet)?.ToWrapper <TR, TW>();
Ejemplo n.º 11
0
 public IEntityWrapper <TR> GetRelated <TR>(Expression <Func <T, EntityReference> > relatedReference, IColumnSet <TR> relatedColumnSet)
     where TR : Entity =>
 GetRelated <TR, EntityWrapper <TR> >(relatedReference, relatedColumnSet);
Ejemplo n.º 12
0
 public static IEntityWrapper <xts_derivedentity> GetProduct(
     this IEntityWrapperRelation <xts_relatedentity> relation, IColumnSet <xts_derivedentity> columnSet)
 {
     return(relation.GetRelated(e => e.xts_relatedid, columnSet));
 }
Ejemplo n.º 13
0
 public static IEntityWrapper <xts_relatedentity> GetReference(
     this IEntityWrapperRelation <xts_entity> relation, IColumnSet <xts_relatedentity> columnSet)
 {
     return(relation.GetRelated(e => e.xts_referenceid, columnSet));
 }
 public IEnumerable <TW> GetAllRelated <TR, TW>(Expression <Func <TR, EntityReference> > relatedToParentAttribute,
                                                IColumnSet <TR> relatedColumnSet)
     where TR : Entity
     where TW : class, IEntityWrapper <TR>
 => _currentWrapper.Value.GetAllRelated <TR, TW>(relatedToParentAttribute, relatedColumnSet);
 public TW GetRelated <TR, TW>(Expression <Func <TE, EntityReference> > relatedReference, IColumnSet <TR> relatedColumnSet)
     where TR : Entity
     where TW : class, IEntityWrapper <TR>
 => _currentWrapper.Value.GetRelated <TR, TW>(relatedReference, relatedColumnSet);
 public IEntityWrapper <TR> GetRelated <TR>(Expression <Func <TE, EntityReference> > relatedReference,
                                            IColumnSet <TR> relatedColumnSet)
     where TR : Entity => _currentWrapper.Value.GetRelated(relatedReference, relatedColumnSet);