using SqlSugar;
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Web; namespace Web.Code.DAL
{
public static class SqlSugarClientHelper
{
public static string ConnectionString = ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString; public static SqlSugarClient SqlDBConnection
{
get => new SqlSugarClient(new ConnectionConfig() {
ConnectionString = ConnectionString,//必填, 数据库连接字符串
DbType = SqlSugar.DbType.SqlServer, //必填, 数据库类型
IsAutoCloseConnection = true, //默认false, 不自动关闭数据库连接。设置为true无需使用using或者Close操作,自动释放。
InitKeyType = InitKeyType.SystemTable //默认SystemTable, 字段信息读取, 如:该属性是不是主键,是不是标识列等等信息 });
}
}
}

SqlSugarClientHelper的更多相关文章

  1. asp:FileUpload 上次图片

    <asp:FileUpload ID="FileUpload附件" runat="server" Width="200px" /> ...

随机推荐

  1. java语言编程入门

    1 概述 1.1 计算机 计算机包括硬件和软件两部分.硬件包括计算机中可以看得见的物理部分.软件提供看不见的指令.这些指令控制硬件并且使得硬件完成特定的任务. 1.2 程序设计 定义:创建(或开发软件 ...

  2. Ethereum White Paper

    https://github.com/ethereum/wiki/wiki/White-Paper White Paper EditNew Page James Ray edited this pag ...

  3. Newtonsoft.Json 序列化 排除指定字段或只序列化指定字段

    using Newtonsoft.Json; using Newtonsoft.Json.Serialization; using System; using System.Collections.G ...

  4. Centos6.7安装Pycharm及升级JDK

    首先到pycharm官网下载pycharm压缩包 wget https://www.jetbrains.com/pycharm/download/download-thanks.html?platfo ...

  5. MVC的默认约定

    MVC项目中有很多默认约定,一种是对项目目录分配的约定,比如默认情况下需要将Javascript文件放置在Script文件夹中,但这并不妨碍你将这个文件夹重新命名,也可以将整个文件夹放置到任何想要放置 ...

  6. 拦截并记录数据库操作-Logging and Intercepting Database Operations

    原文:http://msdn.microsoft.com/zh-cn/data/dn469464 Logging and Intercepting Database Operations Starti ...

  7. Javac之glb与lub

    5.1.10. Capture Conversion Let G name a generic type declaration (§8.1.2, §9.1.2) with n type parame ...

  8. c# static用法

    有时候写程序时常常遇到这样的情况:   1.定义了变量和方法不知道什么时候该加上static修饰符. 2.static变量和方法与非static变量和方法有什么区别? 3.在一个类的静态方法里为什么不 ...

  9. epoll—IO多路复用

    1.在socket.listen()后创一个epoll对象   epoll = select.epoll() 2.将server_socket注册到epoll中        epoll.regist ...

  10. freepbx对接gms网关

    前面的文章阿里云使用镜像安装freepbx , 安装freepbx后创建sip分机 ,freepbx的SIP通话客户端X-lite Yate eyeBeam Linphone我们已经成功的创建好了分机 ...