public void Bidirectional <TEntity1, TEntity2>(Expression <Func <TEntity1, IEnumerable <TEntity2> > > propertyGetter1, Expression <Func <TEntity2, IEnumerable <TEntity1> > > propertyGetter2) { var member1 = TypeExtensions.DecodeMemberAccessExpression(propertyGetter1); var member2 = TypeExtensions.DecodeMemberAccessExpression(propertyGetter2); RegisterBidirectionalRelation <TEntity1, TEntity2>(member1, member2); }
public static MemberInfo Property(Expression <Func <T, object> > propertyGetter) { if (propertyGetter == null) { return(null); } return(TypeExtensions.DecodeMemberAccessExpression(propertyGetter)); }
public virtual void VersionProperty <TEntity>(Expression <Func <TEntity, object> > propertyGetter) { var member = TypeExtensions.DecodeMemberAccessExpression(propertyGetter); explicitDeclarations.VersionProperties.Add(member); var memberOf = TypeExtensions.DecodeMemberAccessExpression(propertyGetter); explicitDeclarations.VersionProperties.Add(memberOf); }
public virtual void HeterogeneousAssociation <TEntity>(Expression <Func <TEntity, object> > propertyGetter) { var member = TypeExtensions.DecodeMemberAccessExpression(propertyGetter); explicitDeclarations.HeterogeneousAssociations.Add(member); var memberOf = TypeExtensions.DecodeMemberAccessExpressionOf(propertyGetter); explicitDeclarations.HeterogeneousAssociations.Add(memberOf); }
public virtual void NaturalId <TBaseEntity>(params Expression <Func <TBaseEntity, object> >[] propertiesGetters) where TBaseEntity : class { if (!IsRootEntity(typeof(TBaseEntity))) { throw new ArgumentOutOfRangeException("TBaseEntity", "The entity class should be a root-entity; register the table-strategy first."); } foreach (var propertyGetter in propertiesGetters.Where(pg => pg != null)) { var member = TypeExtensions.DecodeMemberAccessExpression(propertyGetter); explicitDeclarations.NaturalIds.Add(member); } }
public virtual void Poid <TEntity>(Expression <Func <TEntity, object> > propertyGetter) { var member = TypeExtensions.DecodeMemberAccessExpression(propertyGetter); explicitDeclarations.Poids.Add(member); }