コード例 #1
0
        /// <summary>
        /// Determines if a relationship property refers to a single entity (as opposed to a collection.)
        /// </summary>
        /// <param name="member"></param>
        /// <returns></returns>
        public virtual bool IsSingletonAssociation(MetaType type, MemberInfo member)
        {
            if (!this.IsAssociation(type, member))
                return false;

            return (TypeExtensions.FindEnumerable(TypeHelper.GetMemberType(member)) == null);
        }
コード例 #2
0
 public DbTableExpression(DbTableAlias alias,
     MetaType type, string name)
     : base(DbExpressionType.Table, typeof(void), alias)
 {
     _type = type;
     _name = name;
 }
コード例 #3
0
 /// <summary>
 /// Get an expression that represents the insert operation for the specified instance.
 /// </summary>
 /// <param name="entity"></param>
 /// <param name="instance">The instance to insert.</param>
 /// <param name="selector">A lambda expression that computes a return value from the operation.</param>
 /// <returns></returns>
 public abstract Expression CreateInsertExpression(MetaType type,
                                                   Expression instance, LambdaExpression selector);
コード例 #4
0
 /// <summary>
 /// Get an expression for a mapped property relative to a root expression.
 /// The root is either a TableExpression or an expression defining an entity instance.
 /// </summary>
 public abstract Expression CreateMemberExpression(Expression root, MetaType type, MemberInfo member);
コード例 #5
0
 /// <summary>
 /// Gets an expression that constructs an entity instance relative to a root.
 /// The root is most often a TableExpression, but may be any other experssion such as
 /// a ConstantExpression.
 /// </summary>
 public abstract DbEntityExpression CreateEntityExpression(Expression root, MetaType type);
コード例 #6
0
 /// <summary>
 /// Get a query expression that selects all entities from a table
 /// </summary>
 /// <param name="rowType"></param>
 /// <returns></returns>
 public abstract DbProjectionExpression CreateProjection(MetaType type);
コード例 #7
0
 /// <summary>
 /// Determines if a property is mapped as a relationship
 /// </summary>
 public abstract bool IsAssociation(MetaType type, MemberInfo member);
コード例 #8
0
 /// <summary>
 /// Get an expression that represents the delete
 /// operation for the specified instance.
 /// </summary>
 public abstract Expression CreateDeleteExpression(MetaType type,
                                                   Expression instance, LambdaExpression deleteCheck);
コード例 #9
0
 /// <summary>
 /// Get an expression that represents the delete 
 /// operation for the specified instance.
 /// </summary>
 public abstract Expression CreateDeleteExpression(MetaType type, 
     Expression instance, LambdaExpression deleteCheck);
コード例 #10
0
 /// <summary>
 /// Get an expression that represents the insert operation for the specified instance.
 /// </summary>
 /// <param name="entity"></param>
 /// <param name="instance">The instance to insert.</param>
 /// <param name="selector">A lambda expression that computes a return value from the operation.</param>
 /// <returns></returns>
 public abstract Expression CreateInsertExpression(MetaType type, 
     Expression instance, LambdaExpression selector);
コード例 #11
0
 /// <summary>
 /// Get an expression for a mapped property relative to a root expression. 
 /// The root is either a TableExpression or an expression defining an entity instance.
 /// </summary>
 public abstract Expression CreateMemberExpression(Expression root, MetaType type, MemberInfo member);
コード例 #12
0
 /// <summary>
 /// Gets an expression that constructs an entity instance relative to a root.
 /// The root is most often a TableExpression, but may be any other experssion such as
 /// a ConstantExpression.
 /// </summary>
 public abstract DbEntityExpression CreateEntityExpression(Expression root, MetaType type);
コード例 #13
0
 /// <summary>
 /// Get a query expression that selects all entities from a table
 /// </summary>
 /// <param name="rowType"></param>
 /// <returns></returns>
 public abstract DbProjectionExpression CreateProjection(MetaType type);
コード例 #14
0
 /// <summary>
 /// Determines if a property is mapped as a relationship
 /// </summary>
 public abstract bool IsAssociation(MetaType type, MemberInfo member);
コード例 #15
0
 public DbEntityExpression(MetaType entity, Expression expression)
     : base(DbExpressionType.Entity, expression.Type)
 {
     _entity = entity;
     _expression = expression;
 }
コード例 #16
0
 /// <summary>
 /// Get an expression that represents the update operation for the specified instance.
 /// </summary>
 public abstract Expression CreateUpdateExpression(MetaType type, Expression instance,
                                                   LambdaExpression updateCheck, LambdaExpression selector, Expression @else);
コード例 #17
0
 /// <summary>
 /// Get an expression that represents the update operation for the specified instance.
 /// </summary>
 public abstract Expression CreateUpdateExpression(MetaType type, Expression instance, 
     LambdaExpression updateCheck, LambdaExpression selector, Expression @else);