title: Designing library to generate dynamic MDX query
body: <p>We are generating MDX query dynamically. We pass list of Columns ([DimesnionName].[Attribute.Name] format), Rows ([DimesnionName].[Attribute.Name] format) and Filter ([DimesnionName].[Attribute.Name].[Member Name] format) along with other inputs like, cube name, page number, measure etc.</p>
  
  <p>This information is passed to a C# library and then we use lot of 'If' and 'Else' conditions to process this input and generate MDX query as a string. It requires lot of string manipulation.</p>
  
  <p>You can say it has a workflow. After going through each condition, system generates some output. I am wondering if there is a smarter way to design this library.</p>
  
  <ol>
  <li>I want to remove if else conditions.</li>
  <li>I want to make it more readable.</li>
  <li>I want to make it more manageable</li>
  </ol>
  
  <p><strong>My Question is: Is there any design principle I can use? I can think of using Windows WorkFlow. Please provide your suggestions</strong></p>