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); }
//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)); }
/// <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) { }
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?>(); }
public SelectContactReportStoredProcedure(IQueryProvider provider, PerSchemaSqlDbContext dbContext) : base(provider, dbContext) { }
public SelectMailingsStoredProcedure(IQueryProvider provider, PerSchemaSqlDbContext dbContext) : base(provider, dbContext) { }
public SelectPaymentMethodStoredProcedure(IQueryProvider provider, PerSchemaSqlDbContext dbContext) : base(provider, dbContext) { }