Exemplo n.º 1
0
        public T Get(long Id)
        {
            T model = null;

            if (Id > 0 &&
                _DBContext != null)
            {
                model = _DBContext.GetSimpleClient().GetById <T>(Id);
            }
            return(model);
        }
Exemplo n.º 2
0
        public MySqlSugarClient()
        {
            var connectionConfig = new ConnectionConfig
            {
                ConnectionString      = "server=.;uid=sa;pwd=Admin,123;database=RayPI",
                DbType                = DbType.SqlServer,
                IsAutoCloseConnection = true
            };

            Client       = new SqlSugarClient(connectionConfig);
            SimpleClient = Client.GetSimpleClient();
        }
Exemplo n.º 3
0
 public BaseService()
 {
     db = GetClient();
     this.sdb = db.GetSimpleClient();
 }
Exemplo n.º 4
0
 public BaseService()
 {
     db  = SqlSugarHelper.GetClient();
     sdb = db.GetSimpleClient();
 }