7

Anyone know if there are plans for LINQ to MDX .

Does any way currently exist to use LINQ with MDX / CUBES

Stuart
  • 11,775
  • 6
  • 33
  • 31

3 Answers3

4

The answer is definately no. If you drink the Entity Framework koolaid, you'll believe that if you start using EF now (instead of linq2sql) you'll get OLAP/BI for free down the road.

Frank Schwieterman
  • 24,142
  • 15
  • 92
  • 130
0

I think they'd have to add more than a few new operators and methods to LINQ before they could support even a significant subset of MDX:

WITH SET c0 AS 'HIERARCHIZE({[Measures].[Internet Sales Amount], [Measures].[Internet Gross Profit], [Measures].[Reseller Gross Profit], [Measures].[Average Sales Amount], [Measures].[Gross Profit]})'
SET r0_1 AS 'HIERARCHIZE(Filter(Filter({[Customer].[Customer Geography].[All Customers], AddCalculatedMembers(DESCENDANTS([Customer].[Customer Geography].[All Customers], 1))}, NOT [Customer].[Customer Geography].currentmember.parent is [Customer].[Customer Geography].[All Customers] OR vba!ucase(left([Customer].[Customer Geography].currentmember.properties("CAPTION"),1)) = "u"), NOT [Customer].[Customer Geography].currentmember.level is [Customer].[Customer Geography].[Country] OR vba!ucase(left([Customer].[Customer Geography].currentmember.properties("CAPTION"),1)) = "u"))'
SELECT NON EMPTY {[c0]}
ON COLUMNS, NON EMPTY VISUALTOTALS(FILTER({[r0_1]}
,vba!ucase(right([Customer].[Customer Geography].currentmember.properties("CAPTION"),8)) = "SUBTOTAL" OR [Measures].[Internet Gross Profit] > 80000)
, "* SUBTOTAL") ON ROWS FROM [Adventure Works]
CELL PROPERTIES VALUE, FORMATTED_VALUE, FORMAT_STRING, FORE_COLOR, BACK_COLOR
Joel Mueller
  • 28,324
  • 9
  • 63
  • 88
0

Yes now there is thanks to this nugget "PercolatorAnalysisServices" by Matt Hallmark , you can use linq queries to fetch data from the cube (analytical services ) and you also have the ability to execute a full mdx query incode , check out this tutorial as well , very helpful

Wesam
  • 932
  • 3
  • 15
  • 27
  • Does this stil work? I tried on vs 2019 today but it wouldn't generate the *.tt files that configure everything else. – memtha Sep 30 '21 at 22:16