Provides support for creating the table schema and ingestion mappings using attributes on your models.
$ dotnet add package KustoWrapper.Schema.AttributeMappingsdotnet add package KustoWrapper.Schema.AttributeMappings
[KustoTable("Items")]
public class KustoSampleEntity
{
[KustoColumn("date")]
public DateTime Date { get; set; }
[KustoColumn("item_Id")]
public Guid ItemId { get; set; }
[KustoColumn("item_Description")]
public string Description { get; set; }
}
class Program
{
static void Main(string[] args)
{
KustoTableInfo kustoTable = KustoTableSchemaBuilder.Build<KustoSampleEntity>();
string tableCreateCommand = KustoWrapperCommandGenerator
.GenerateTableCreateCommand(kustoTable);
string tableJsonMappingCreateOrAlterCommand = KustoWrapperCommandGenerator
.GenerateTableJsonMappingCreateOrAlterCommand(kustoTable, "ItemsMapping");
}
}