public void SimpleWay() { var axisSlicerMember = new MdxMember(); axisSlicerMember.Titled("Dim Hierarchy", "Dim"); var axisSlicer = new MdxTuple(); axisSlicer.With(axisSlicerMember); var axis = new MdxAxis(); axis.Titled(MdxAxisType.Columns); axis.AsNonEmpty(); axis.WithSlicer(axisSlicer); var cube = new MdxCube(); cube.Titled("Cube"); var querySlicerMember = new MdxMember(); querySlicerMember.Titled("Dim Hierarchy", "Dim", "Dim Key"); querySlicerMember.WithValue("1"); var querySlicer = new MdxTuple(); querySlicer.With(querySlicerMember); var query = new MdxQuery(); query.On(axis); query.From(cube); query.Where(querySlicer); }
/// <summary> /// Appends the specified <see cref="MdxAxis"/> and returns the updated current instance of <see cref="MdxQuery"/>. /// </summary> /// <param name="axis">Specified <see cref="MdxAxis"/>.</param> /// <returns>Returns the updated current instance of <see cref="MdxQuery"/>.</returns> public MdxQuery On(MdxAxis axis) { if (axis == null) { throw new ArgumentNullException("axis"); } _axes.Add(axis); return(this); }
/// <summary> /// Appends the specified <see cref="MdxAxis"/> and returns the updated current instance of <see cref="MdxQuery"/>. /// </summary> /// <param name="axis">Specified <see cref="MdxAxis"/>.</param> /// <returns>Returns the updated current instance of <see cref="MdxQuery"/>.</returns> public MdxQuery On(MdxAxis axis) { if (axis == null) throw new ArgumentNullException("axis"); _axes.Add(axis); return this; }