Пример #1
0
        public virtual void Join(string tableName, Action <JoinPart <T> > action)
        {
            JoinPart <T> joinPart = new JoinPart <T>(tableName);

            action(joinPart);
            this.providers.Joins.Add((IJoinMappingProvider)joinPart);
        }
Пример #2
0
        /// <summary>
        /// Links this entity to another table, to create a composite entity from two or
        /// more tables.
        /// </summary>
        /// <param name="tableName">Joined table name</param>
        /// <param name="action">Joined table mapping</param>
        /// <example>
        /// Join("another_table", join =>
        /// {
        ///   join.Map(x => x.Name);
        ///   join.Map(x => x.Age);
        /// });
        /// </example>
        public virtual void Join(string tableName, Action <JoinPart <T> > action)
        {
            var join = new JoinPart <T>(tableName);

            action(join);

            joins.Add(((IJoinMappingProvider)join).GetJoinMapping());
        }
Пример #3
0
        /// <summary>
        /// Links this entity to another table, to create a composite entity from two or
        /// more tables.
        /// </summary>
        /// <param name="tableName">Joined table name</param>
        /// <param name="action">Joined table mapping</param>
        /// <example>
        /// Join("another_table", join =>
        /// {
        ///   join.Map(x => x.Name);
        ///   join.Map(x => x.Age);
        /// });
        /// </example>
        public void Join(string tableName, Action <JoinPart <T> > action)
        {
            var join = new JoinPart <T>(tableName);

            action(join);

            providers.Joins.Add(join);
        }