Created
December 12, 2017 14:04
-
-
Save lluisfranco/fa533bf864fb95b45ebb0eaf0e07c76f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using (var conn = new AdomdConnection(connectionString)) | |
{ | |
conn.Open(); | |
var commandText = @"SELECT | |
{ | |
[Measures].[Gains Period], | |
[Measures].[Gains YTD], | |
[Measures].[Amount] | |
} ON COLUMNS, | |
[Valuation Dates Accumulated].[Hierarchy].[Year].Members ON ROWS | |
FROM Accumulated | |
Where ({ @PortfolioId })"; | |
var data = conn.Query<MyResultDTO>(commandText, | |
new AdomdParameterMultipleValues<int>() | |
{ | |
ParameterName = "@PortfolioId", | |
MemberName = "[Portfolios].[Port Code]", | |
Values = new List<int>() { 282, 185 } | |
} | |
); | |
conn.Close(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment