Пример #1
0
        public InsertSettingStoredProcedure(IQueryProvider provider, PerSchemaSqlDbContext dbContext) : base(provider, dbContext)
        {
            SetParameter
            (
                paramName: "@SettingID",
                paramValue: default(short),
                sqlDbType: SqlDbType.SmallInt,
                isNullable: false,
                direction: ParameterDirection.Output
            );

            ParentID = default(short);
        }
Пример #2
0
        //public TQuery CreateQueryToSharedSchema<TQuery>() where TQuery : BaseQuery
        //{
        //    return CreateQuery<TQuery>(SharedSchema);
        //}


        public BaseQuery CreateQuery(Type queryType, string schema)
        {
            // schema.Equals(SharedSchema) ? BaseConnectionString : SharedConnectionString is a hack this should be done in a better way
            // var perSchemaSqlDbContext = new PerSchemaSqlDbContext(schema.Equals(SharedSchema) ? SharedConnectionString : BaseConnectionString, schema);
            string conStr = ConfigurationManager.AppSettings["connStr"];
            var    perSchemaSqlDbContext = new PerSchemaSqlDbContext(conStr, schema);

            ConstructorArgument[] ctorArgs = new[] {
                new ConstructorArgument("dbContext", perSchemaSqlDbContext),
                new ConstructorArgument("provider", this)
            };

            return((BaseQuery)_injectKernel.Get(queryType, ctorArgs));
        }
Пример #3
0
        /// <summary>
        /// Create a Query object with Schema specified
        /// </summary>
        /// <typeparam name="TQuery"></typeparam>
        /// <param name="schema"></param>
        /// <returns></returns>
        public TQuery CreateQuery <TQuery>(string schema) where TQuery : BaseQuery
        {
            // create the DB context per current schema
            // var perSchemaSqlDbContext = new PerSchemaSqlDbContext(schema.Equals(SharedSchema) ? SharedConnectionString : BaseConnectionString, schema);
            string conStr = ConfigurationManager.AppSettings["connStr"];
            var    perSchemaSqlDbContext = new PerSchemaSqlDbContext(conStr, schema);

            ConstructorArgument[] ctorArgs = new[] {
                new ConstructorArgument("dbContext", perSchemaSqlDbContext),
                new ConstructorArgument("provider", this)
            };

            // create a query with injected DB context
            return(_injectKernel.Get <TQuery>(ctorArgs));
        }
 public SelectTransactionsReportStoredProcedure(IQueryProvider provider, PerSchemaSqlDbContext dbContext) : base(provider, dbContext)
 {
     CommandTimeout = Convert.ToInt32(System.Configuration.ConfigurationManager.AppSettings["CustomSqlTimeout"]);
 }
 public SelectDepartmentsStoredProcedure(IQueryProvider provider, PerSchemaSqlDbContext dbContext) : base(provider, dbContext)
 {
 }
Пример #6
0
 public SelectLetterByIdStoredProcedure(IQueryProvider provider, PerSchemaSqlDbContext dbContext)
     : base(provider, dbContext)
 {
 }
 public SelectBillDetailsStoredProcedure(IQueryProvider provider, PerSchemaSqlDbContext dbContext)
     : base(provider, dbContext)
 {
     CommandText = "dbo.SelectBillForInvoice";
 }
 public SelectTransactionCategoryTreeStoredProcedure(IQueryProvider provider, PerSchemaSqlDbContext dbContext) : base(provider, dbContext)
 {
     SubCategoryIds = ArrayUtils.Empty <int?>();
 }
Пример #9
0
 public SelectContactReportStoredProcedure(IQueryProvider provider, PerSchemaSqlDbContext dbContext)
     : base(provider, dbContext)
 {
 }
Пример #10
0
 public SelectMailingsStoredProcedure(IQueryProvider provider, PerSchemaSqlDbContext dbContext) : base(provider, dbContext)
 {
 }
Пример #11
0
 public SelectPaymentMethodStoredProcedure(IQueryProvider provider, PerSchemaSqlDbContext dbContext) : base(provider, dbContext)
 {
 }