Pergunta

I was given a cube with all relevant information. Now, I want to query cube and get the data through .net EDMX framework.

Could anyone help me out from where I should start on this? I am really confused and have no idea how to use MDX with edmx.

Is it possible to get the data from Cubes without using MDX using EDMX with LINQ?

Foi útil?

Solução

It's not possible currently, there is a company who do a version of LinqToMdx, I think they've posted on here before, I don't think they go via the EDMX route exactly.

Standard method in .Net is ADOMD.Net http://msdn.microsoft.com/en-us/library/ms123477.aspx

A nice way of getting data is via the CellSet class, as it contains cells of both the native value and the formatted string for measures:

    CellSet adomdCellSet;

    using (var adomdConnection = new AdomdConnection())
    {
        adomdConnection.ConnectionString = "YourConnectionString";
        adomdConnection.Open();

        var adomdCommand = adomdConnection.CreateCommand();
        adomdCommand.CommandText = "YourMDXQuery";

        adomdCellSet = adomdCommand.ExecuteCellSet();
    }

    return adomdCellSet;

Edit: Found the site of the guys who wrote a provider - I can't vouch for them as I've never used it, but it looks interesting http://www.agiledesignllc.com/Products.htm

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top