AppSession.cs 877 Bytes
using HHECS.Bll;
using HHECS.Model;
using HHECS.Model.Entities;
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;
using System.Windows;

namespace HHECS
{
    /// <summary>
    /// 全局通用处理,不用于各个客户端个性化参数引用,各个客户端自行读取并引用配置文件
    /// </summary>
    public static class AppSession
    {
        static AppSession()
        {
            //默认是支持sqlserver,这里更改为mysql
            Dapper.SimpleCRUD.SetDialect(Dapper.SimpleCRUD.Dialect.MySQL);
        }

        public static string ConnectionString { get; set; } = ConfigurationManager.AppSettings["connectStr"];

        public static LJJBll Bll { get; set; } = new DefaultBll(ConnectionString);

       

    }
}