Meta tags:
keywords= SQL query builder dotnet csharp c# dynamic queries active record;
Description= Type: fluent SQL query builder for .NET
Author: Ahmad Moussawi
Helps in building complex and dynamic reports/dashboard in C#
;
Headings (most frequently used words):
sqlkata, introduction, installation, getting, started, compile, only, example, is, now, on, product, hunt, nightly, builds, query, execution,
Text of the page (most frequently used words):
#sqlkata (26), the (20), and (14), sql (11), query (11), your (10), where (10), new (8), execution (8), add (7), from (6), using (6), var (6), you (6), select (5), compiler (5), connection (5), package (5), myget (4), users (4), status (4), string (4), active (4), bindings (4), key (3), nuget (3), value (3), https (3), api (3), org (3), index (3), json (3), file (3), this (3), create (3), note (3), are (3), queries (3), instance (3), result (3), compile (3), can (3), with (3), only (3), user (3), dotnet (3), posts (3), date (3), github (2), about (2), join (2), stay (2), updated (2), configuration (2), packagesources (2), www (2), not (2), nightly (2), builds (2), don (2), use (2), execute (2), sqlresult (2), following (2), compilers (2), sqlservercompiler (2), object (2), way (2), started (2), table (2), need (2), needed (2), data (2), server (2), setup (2), source (2), queryfactory (2), above (2), support (2), install (2), project (2), installation (2), title (2), likes (2), lang (2), authorid (2), order (2), post (2), against (2), injection (2), attacks (2), technique (2), elegant (2), introduction (2), product (2), insert (2), update (2), delete (2), operations (2), developed, ahmadmuzavi, awesome, contributors, ahmad, moussawi, stackoverflow, one, email, per, month, tips, tricks, features, maybe, community, feedback, subscribe, 1000, developers, xml, version, encoding, utf, final, should, similar, found, next, csproj, hosted, feed, config, ever, tostring, warning, will, generate, sqlserver, list, simplest, get, passing, name, build, array, off, course, here, example, equivalent, respectively, top, output, system, sqlclient, namespace, sqlconnection, mydb, password, topsecret, register, ioc, container, first, getting, works, netstandard1, netfx451, want, manager, console, cli, run, commands, terminal, include, supported, both, frameworks, netstandard, net, null, desc, ienumerable, await, wherein, wherenotnull, orderbydesc, getasync, addition, protection, speeds, letting, engine, caches, reuses, same, plan, even, parameters, changed, uses, parameter, binding, protect, application, there, clean, strings, being, passed, written, language, all, love, check, code, builder, executor, helps, deal, predictable, firebird, oracle, mysql, postgresql, sqlite, please, upvote, development, now, hunt, logging, fetching, records, useful, methods, common, expression, union, except, intersect, having, group, limit, offset, playground, releases, documentation, home,
Text of the page (random words):
sqlkata sqlkata home documentation releases playground introduction compilers select from where string operations date operations limit offset join group order having union except intersect common table expression with useful methods insert update delete query execution installation setup your project fetching records logging insert update delete sqlkata is now on product hunt please upvote to support the product development sqlkata sql server sqlite postgresql mysql oracle firebird introduction an elegant query builder and executor helps you deal with sql queries in an elegant and predictable way written in c the language we all love you can check the source code on sqlkata on github it uses parameter binding technique to protect your application against sql injection attacks there is no need to clean strings being passed as bindings in addition to protection against sql injection attacks this technique speeds up your query execution by letting the sql engine caches and reuses the same query plan even if the parameters are changed ienumerable post posts await db query posts where likes 10 wherein lang new en fr wherenotnull authorid orderbydesc date select id title getasync post select id title from posts where likes p1 and lang in p2 p3 and authorid is not null order by date desc installation sqlkata is supported on both net fx and netstandard frameworks run the following commands from your terminal to include it in your project using dotnet cli dotnet add package sqlkata dotnet add package sqlkata execution or from the package manager console install package sqlkata install package sqlkata execution note the sqlkata execution is only needed if you want add the execution support note the sqlkata execution works only on netfx451 and above or netstandard1 3 and above getting started using sqlkata using sqlkata execution using system data sqlclient sql server connection namespace setup the connection and compiler var connection new sqlconnection data source mydb user id user password topsecret var compiler new sqlservercompiler var db new queryfactory connection compiler you can register the queryfactory in the ioc container var user db query users where id 1 where status active first sql output select top 1 from users where id p0 and status p1 where p0 p1 are equivalent to 1 active respectively compile only example if you don t need to execute your queries you can use sqlkata to build and compile your query to sql string with an array of bindings off course no connection instance needed here the simplest way to get started is to create a new instance of the query object by passing the table name in it using sqlkata using sqlkata compilers create an instance of sqlserver var compiler new sqlservercompiler var query new query users where id 1 where status active sqlresult result compiler compile query string sql result sql list object bindings result bindings 1 active it will generate the following sql string select from users where id p0 and status p1 warning don t ever use sqlresult tostring to execute your queries nightly builds nightly builds are hosted on myget add the myget sqlkata feed to your nuget config add key sqlkata value https www myget org f sqlkata api v3 index json note if this file is not found create it next to your csproj file the final file should be similar to this xml version 1 0 encoding utf 8 configuration packagesources add key nuget value https api nuget org v3 index json add key sqlkata value https www myget org f sqlkata api v3 index json packagesources configuration stay updated join 1000 developers to stay updated about sqlkata subscribe one email per month about tips tricks new features and maybe community feedback sqlkata on github sqlkata on stackoverflow sqlkata is developed by ahmad moussawi and awesome contributors ahmadmuzavi
|