项目作者: ogaudefroy

项目描述 :
Glimpse support for ADOMD components
高级语言: C#
项目地址: git://github.com/ogaudefroy/Glimpse.Adomd.git
创建时间: 2015-06-26T17:24:16Z
项目社区:https://github.com/ogaudefroy/Glimpse.Adomd

开源协议:MIT License

下载


Glimpse.Adomd

Glimpse support for ADOMD components

Build status NuGet version

Screenshot

Requires the usage of Microsoft.AnalysisServices.AdomdClient.Abstractions to support native component substitution.

Setup

  • Replace your regular AdomdConnection with GlimpseAdomdConnection
  • You can create your command by
    • Calling the CreateCommand method available in the connection
    • Instantiating a new GlimpseAdomdCommand

Usage

  1. using (var conn = new GlimpseAdomdConnection(connStr))
  2. {
  3. conn.Open();
  4. var cmd = conn.CreateCommand();
  5. cmd.CommandText = "SELECT [Date].[Calendar Year].[StrToMember(@CalendarYear)] on 0 FROM [Adventure Works];";
  6. var parameter = cmd.CreateParameter();
  7. parameter.ParameterName = "CalendarYear";
  8. parameter.Value = "CY 2012";
  9. cmd.Parameters.Add(parameter);
  10. return cmd.ExecuteCellSet();
  11. }