Skip to content

Instantly share code, notes, and snippets.

Last active February 7, 2020 02:15
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
SqlKata by CData Kintone ADO.NET Provider
using System;
using SqlKata;
using SqlKata.Execution;
using SqlKata.Compilers;
using System.Data.SqlClient;
using System.Data.CData.Kintone;
namespace CData.SqlKata.CDataSampleProject
class Program
static void Main(string[] args)
// 通常 SqlConnection を渡すが、CData ADO.NET ProviderのConnectionを渡すように変更するだけ。
var connection = new KintoneConnection("URL=;User=XXXXX;Password=XXXXX;");
var compiler = new SqlServerCompiler();
var db = new QueryFactory(connection, compiler);
// 日本語のクラス名も利用できる!
var response = db.Query("案件情報").Select("RecordId", "案件名").Get<案件情報>();
foreach (var item in response)
Console.WriteLine($"RecordId: {item.RecordId}; 案件名: {item.案件名}");
// 日本語名でInsertも可能
var query = new Query("案件情報").AsInsert(
案件名 = "ugauga"
internal class 案件情報
public string RecordId { get; set; }
public string 案件名 { get; set; }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment