/// <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 IIEnumerableManyToOne <ClassType, DataType> ManyToOne <DataType>(Expression <Func <ClassType, IEnumerable <DataType> > > Expression) where DataType : class, new() { Setup(); IEnumerableManyToOne <ClassType, DataType> Return = new IEnumerableManyToOne <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 IEnumerableManyToOne <ClassType, DataType> ManyToOne <DataType>(System.Linq.Expressions.Expression <Func <ClassType, IEnumerable <DataType> > > Expression) where DataType : class { if (Expression == null) { throw new ArgumentNullException(nameof(Expression)); } var ReturnValue = new IEnumerableManyToOne <ClassType, DataType>(Expression, this); Properties.Add(ReturnValue); return(ReturnValue); }