有没有办法使用 LINQ 进行 MDX 查询?

发布于 2024-07-24 22:25:20 字数 78 浏览 4 评论 0原文

任何人都知道是否有 LINQ to MDX 的计划。

目前是否存在将 LINQ 与 MDX / CUBES 结合使用的方法

Anyone know if there are plans for LINQ to MDX .

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

孤君无依 2024-07-31 22:25:21

答案肯定是否定的。 如果您喝过 Entity Framework koolaid,您会相信,如果您现在开始使用 EF(而不是 linq2sql),您将在未来免费获得 OLAP/BI。

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.

Smile简单爱 2024-07-31 22:25:21

我认为他们必须向 LINQ 添加多个新运算符和方法,然后才能支持 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

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
忆离笙 2024-07-31 22:25:21

是的,现在多亏了 Matt Hallmark 的 金块“PercolatorAnalysisServices”,您可以使用 linq查询从多维数据集获取数据(分析服务),您还可以在代码中执行完整的 mdx 查询,请查看此 教程 以及,非常有帮助

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文