using SqlSugar;
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace WCS.DAL.Db
{
    public static class DbHelp
    {
        /// <summary>
        /// 业务数据库
        /// </summary>
        public static SqlSugarScope db = new SqlSugarScope(new ConnectionConfig()
        {
            ConnectionString = $"Data Source={DbPath.DataDbPath};",
            DbType = DbType.Sqlite,//[Sqlite]安装[System.Data.SQLite];
            IsAutoCloseConnection = true
        }, db =>
        {
            db.Aop.OnError = ex =>
            {
            };
        });
        /// <summary>
        /// 日志数据库
        /// </summary>
        public static SqlSugarScope dbLog = new SqlSugarScope(new ConnectionConfig()
        {
            ConnectionString = $"Data Source={DbPath.LogDbPath};",
            DbType = DbType.Sqlite,//[Sqlite]安装[System.Data.SQLite];
            IsAutoCloseConnection = true
        }, db =>
        {
            db.Aop.OnError = ex =>
            {
            };
        });
    }
}
