예제 #1
0
        /// <summary>
        /// Creates a many to one
        /// </summary>
        /// <typeparam name="DataType">Data type</typeparam>
        /// <param name="Expression">Expression</param>
        /// <returns>The many to one object</returns>
        public IListManyToOne <ClassType, DataType> ManyToOne <DataType>(Expression <Func <ClassType, List <DataType> > > Expression) where DataType : class, new()
        {
            Setup();
            ListManyToOne <ClassType, DataType> Return = new ListManyToOne <ClassType, DataType>(Expression, this);

            Properties.Add(Return);
            return(Return);
        }
        /// <summary>
        /// Creates a many to one
        /// </summary>
        /// <typeparam name="DataType">Data type</typeparam>
        /// <param name="Expression">Expression</param>
        /// <returns>The many to one object</returns>
        public ListManyToOne <ClassType, DataType> ManyToOne <DataType>(System.Linq.Expressions.Expression <Func <ClassType, List <DataType> > > Expression)
            where DataType : class
        {
            if (Expression == null)
            {
                throw new ArgumentNullException(nameof(Expression));
            }
            var ReturnValue = new ListManyToOne <ClassType, DataType>(Expression, this);

            Properties.Add(ReturnValue);
            return(ReturnValue);
        }