Example #1
0
 public SqlSugarClient(ConnectionConfig config)
 {
     Check.Exception(config == null, "ConnectionConfig config is null");
     InitContext(config);
 }
Example #2
0
        public static ISugarQueryable <T, T2, T3, T4, T5, T6, T7> GetQueryable <T, T2, T3, T4, T5, T6, T7>(ConnectionConfig currentConnectionConfig)
        {
            string className = "Queryable";

            className = GetClassName(currentConnectionConfig.DbType.ToString(), className);
            ISugarQueryable <T, T2, T3, T4, T5, T6, T7> result = CreateInstance <T, T2, T3, T4, T5, T6, T7, ISugarQueryable <T, T2, T3, T4, T5, T6, T7> >(className);

            return(result);
        }
Example #3
0
        public static ICodeFirst GetCodeFirst(ConnectionConfig currentConnectionConfig)
        {
            ICodeFirst result = CreateInstance <ICodeFirst>(GetClassName(currentConnectionConfig.DbType.ToString(), "CodeFirst"));

            return(result);
        }
Example #4
0
        public static IDbMaintenance GetDbMaintenance(ConnectionConfig currentConnectionConfig)
        {
            IDbMaintenance result = CreateInstance <IDbMaintenance>(GetClassName(currentConnectionConfig.DbType.ToString(), "DbMaintenance"));

            return(result);
        }
Example #5
0
        public static DeleteBuilder GetDeleteBuilder(ConnectionConfig currentConnectionConfig)
        {
            DeleteBuilder result = CreateInstance <DeleteBuilder>(GetClassName(currentConnectionConfig.DbType.ToString(), "DeleteBuilder"));

            return(result);
        }
Example #6
0
        public static InsertBuilder GetInsertBuilder(ConnectionConfig currentConnectionConfig)
        {
            InsertBuilder result = CreateInstance <InsertBuilder>(GetClassName(currentConnectionConfig.DbType.ToString(), "InsertBuilder"));

            return(result);
        }