Azure 数据资源管理器 C# 查询和 ORM
Azure Data Explorer C# querying and ORM
我研究了从 DotNet 查询数据并发现:https://github.com/Azure/azure-kusto-samples-dotnet
个样本。
我在那里没有看到 ORM 示例,这让我自己尝试了一些东西
public class KustoContext : DbContext
{
public KustoContext(KustoConfiguration kustoConfiguration)
: base(new KustoConnectionStringBuilder(kustoConfiguration.ClusterUri, kustoConfiguration.DatabaseName)
.WithAadApplicationKeyAuthentication(kustoConfiguration.ClientId, kustoConfiguration.ClientSecret, kustoConfiguration.TenantId)
.ConnectionString)
{
}
public DbSet<SomeEntity> SomeEntities{ get; set; }
}
不幸的是,我得到一个错误:
Exception thrown: 'System.ArgumentException' in System.Data.dll
An unhandled exception of type 'System.ArgumentException' occurred in System.Data.dll
Keyword not supported: 'application client id'.
这是有道理的,我想我需要一个 adx 提供程序,但我找不到它的 NuGet 包。
理想情况下,我想将 Entity Framework 与 Azure 数据资源管理器一起使用。这可能吗?有样品吗?
更新:Entity Framework是否有替代方案?
Ideally, I would like to use Entity Framework with Azure Data Explorer. Is this possible? Are there any available samples?
我不相信有人为 Azure 数据资源管理器编写了 Entity Framework 提供程序。
我研究了从 DotNet 查询数据并发现:https://github.com/Azure/azure-kusto-samples-dotnet
个样本。
我在那里没有看到 ORM 示例,这让我自己尝试了一些东西
public class KustoContext : DbContext
{
public KustoContext(KustoConfiguration kustoConfiguration)
: base(new KustoConnectionStringBuilder(kustoConfiguration.ClusterUri, kustoConfiguration.DatabaseName)
.WithAadApplicationKeyAuthentication(kustoConfiguration.ClientId, kustoConfiguration.ClientSecret, kustoConfiguration.TenantId)
.ConnectionString)
{
}
public DbSet<SomeEntity> SomeEntities{ get; set; }
}
不幸的是,我得到一个错误:
Exception thrown: 'System.ArgumentException' in System.Data.dll An unhandled exception of type 'System.ArgumentException' occurred in System.Data.dll
Keyword not supported: 'application client id'.
这是有道理的,我想我需要一个 adx 提供程序,但我找不到它的 NuGet 包。
理想情况下,我想将 Entity Framework 与 Azure 数据资源管理器一起使用。这可能吗?有样品吗?
更新:Entity Framework是否有替代方案?
Ideally, I would like to use Entity Framework with Azure Data Explorer. Is this possible? Are there any available samples?
我不相信有人为 Azure 数据资源管理器编写了 Entity Framework 提供程序。