All Projects → jackletter → DBUtil

jackletter / DBUtil

Licence: other
最新版本请移步:https://gitee.com/jackletter/DBUtil

Programming Languages

C#
18002 projects

Projects that are alternatives of or similar to DBUtil

SharpPlugs
.Net Core 鋒利扩展
Stars: ✭ 26 (+8.33%)
Mutual labels:  netcore
statiq-starter-kontent-lumen
Lumen is a minimal, lightweight, and mobile-first starter for creating blogs using Statiq and Kontent by Kentico.
Stars: ✭ 22 (-8.33%)
Mutual labels:  netcore
Cometary
Roslyn extensions, with a touch of meta-programming.
Stars: ✭ 31 (+29.17%)
Mutual labels:  netcore
SuperSocketLite
SuperSocket 1.6 버전의 .NET Core 포팅
Stars: ✭ 48 (+100%)
Mutual labels:  netcore
Nuxt.tBug
🍓 一个Nuxt.js 的项目,收集前后端分离中出现的各种Bug,方便大众
Stars: ✭ 79 (+229.17%)
Mutual labels:  netcore
Kendo.DynamicLinqCore
KendoNET.DynamicLinq implements server paging, filtering, sorting, grouping, and aggregating to Kendo UI via Dynamic Linq for .Net Core App(1.x ~ 3.x).
Stars: ✭ 36 (+50%)
Mutual labels:  netcore
Platform Compat
Roslyn analyzer that finds usages of APIs that will throw PlatformNotSupportedException on certain platforms.
Stars: ✭ 250 (+941.67%)
Mutual labels:  netcore
Capstone.NET
.NET Core and .NET Framework binding for the Capstone Disassembly Framework
Stars: ✭ 108 (+350%)
Mutual labels:  netcore
fullcalendar-aspnet-core
Implementation of FullCalendar in ASP.NET Core
Stars: ✭ 30 (+25%)
Mutual labels:  netcore
Zilon Roguelike
Survival roguelike game with huge world generation.
Stars: ✭ 18 (-25%)
Mutual labels:  netcore
Norns
dotnet core aop static weaving on roslyn
Stars: ✭ 23 (-4.17%)
Mutual labels:  netcore
emud
emud是一个基于netcore + signalr + vue 开发的mud游戏框架
Stars: ✭ 44 (+83.33%)
Mutual labels:  netcore
letportal
Angular 9 .NET Core 3.1 open source web portal platform 2020 for building quickly application form, data grid , data list, chart, report, users management
Stars: ✭ 29 (+20.83%)
Mutual labels:  netcore
SharpAudio
Audio playback/capturing engine for C#
Stars: ✭ 139 (+479.17%)
Mutual labels:  netcore
XAF Security E4908
This repository contains examples for Role-based Access Control, Permission Management, and OData / Web / REST API Services for Entity Framework and XPO ORM
Stars: ✭ 47 (+95.83%)
Mutual labels:  netcore
server-benchmarks
🚀 Cross-platform transparent benchmarks for HTTP/2 Web Servers at 2020-2023
Stars: ✭ 78 (+225%)
Mutual labels:  netcore
aliyun-openapi-sdk-net-core
aliyun open api sdk for .net core 2.0
Stars: ✭ 17 (-29.17%)
Mutual labels:  netcore
MQTTnet
MQTTnet is a high performance .NET library for MQTT based communication. It provides a MQTT client and a MQTT server (broker). The implementation is based on the documentation from http://mqtt.org/.
Stars: ✭ 3,309 (+13687.5%)
Mutual labels:  netcore
dark-sky-core
A .NET Standard Library for using the Dark Sky API.
Stars: ✭ 55 (+129.17%)
Mutual labels:  netcore
NetCoreWithDocker
Tutorial with samples about how to setup .Net Core with Docker
Stars: ✭ 20 (-16.67%)
Mutual labels:  netcore

最新版本请移步:https://gitee.com/jackletter/DBUtil

DBUtil

.net 下常用的数据库访问工具,支持sqlserver、oracle、mysql、postgresql、sqlite、access 运行平台:net framework4.5

另外:.netcore版本: https://github.com/jackletter/DBUtil.Standard

使用说明

  1. 安装依赖:
Install-Package DBUtil
  1. 创建数据库操作对象
DBUtil.IDbAccess iDb = DBUtil.IDBFactory.CreateIDB("Data Source=.;Initial Catalog=JACKOA;User ID=sa;Password=xx;","SQLSERVER");
  1. 查询
String str=iDb.GetFirstColumnString("select Name from SysUser");
DataTable dt = iDb.GetDataTable("select * from test2");
DataSet ds = iDb.GetDataSet("select * from test2;select * from test2;"); 
  1. 分页查询
DBUtil.IDbAccess iDb = DBUtil.IDBFactory.CreateIDB(@"Data Source=localhost;Initial Catalog=imgserver2;User ID=root;Password=123456;", "MYSQL");
string selectSql = "select * from test2";
string orderSql = "order by id desc";
int pageSize = 10;
int pageIndex = 1;
string sqlFinal = iDb.GetSqlForPageSize(selectSql, orderSql, pageSize, pageIndex);
Console.WriteLine(sqlFinal);//select * from test2 order by id desc limit 0,10
  1. 参数化sql
DataTable dt = iDb.GetDataTable(string.Format("select * from test2 where name like {0}", iDb.paraPrefix + "name"), new IDbDataParameter[] {
      iDb.CreatePara("name","%小%")
 });
  1. ID生成
int id = iDb.IDSNOManager.NewID(iDb, "test", "id");
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].