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. swift 3.0 正则表达式查找/替换字符

    1.什么是正则表达式 正则表达式,又称正规表示法.常规表示法(英语:Regular Expression,在代码中常简写为regex.regexp或RE),计算机科学的一个概念.正则表达式使用单个字符 ...

  2. POJ 1015

    #include<iostream> #include<algorithm> #define MAXN 201 #define count C_ount using names ...

  3. 机器学习实战(一)k-近邻算法

    转载请注明源出处:http://www.cnblogs.com/lighten/p/7593656.html 1.原理 本章介绍机器学习实战的第一个算法——k近邻算法(k Nearest Neighb ...

  4. WordPress上传文件类型限制解决办法

    文件类型不符合安全规则.试试别的文件. 这种错误是由于WordPress中做了文件上传格式的限制,这种限制可以在WordPress中的wp-include/functions.php的get_allo ...

  5. ambari 2.6.2 安装 hdp 2.6.5.0 遇到的问题

    1.hive-client 无法安装 一直报错(symlink target  already exists and it is not a symlink.),hive-client 已经存在且不是 ...

  6. centos6 free 和 centos 7的free 的差异与对比

    目录 一 centos6 free 常用参数和含义 centos6 free 命令示例 free 值讲解 计算公式 二 centos7 free 常用的参数 centos7 free 命令示例 计算公 ...

  7. elasticsearch版本不同,批量查询也不相同

    网上搜到批量查询可以通过TransportClient实现,但官方推荐使用RestHighLevelClient实现 注意: We plan on deprecating the TransportC ...

  8. 遇见CUBA CLI

    原文:Meet CLI for CUBA Platform 翻译:CUBA China CUBA-Platform 官网 : https://www.cuba-platform.com CUBA Ch ...

  9. 高云的jQuery源码分析笔记

    (function( window, undefined ) { // 构造jQuery对象 var jQuery = function( selector, context ) { return n ...

  10. 从数据库表中随机获取N条记录的SQL语句

    Oracle: select * from (select * from tableName order by dbms_random.value) where rownum < N MS SQ ...