protected override string CreateMasterQuery(SqlProxyParameterCollection parameters) { return(new QueryBuilder() .SelectAllFrom <EF_Codes>() .Where(EF_Codes.CodeType).IsEqualTo(parameters["@p1"]) .Query); }
protected override string CreateMasterQuery(SqlProxyParameterCollection dParam) { var qB = new QueryBuilder(); return(qB.SelectAllFrom <CustomerTable>(). Where(CustomerTable.ID).IsEqualTo(dParam["@p1"]). Query); }
protected override void CreateSlaveParam <T>(SqlProxyParameterCollection parameters) { if (typeof(T) == typeof(EF_CodeSegment)) { parameters.Add( new SqlProxyParameter("@p2", EF_CodeSegment.CodeType)); } }
protected override void CreateMasterParam(SqlProxyParameterCollection parameters) { parameters.Add( new SqlProxyParameter("@p1", EF_Counter.Year)); parameters.Add( new SqlProxyParameter("@p2", EF_Counter.Type)); }
protected override string CreateMasterQuery(SqlProxyParameterCollection parameters) { var qb = new QueryBuilder(); return(new QueryBuilder() .SelectAll <EF_Users>() .From <EF_Users>() .Where(EF_Users.Username).IsEqualTo(parameters["@p1"]) .Query); }
protected override string CreateSlaveQuery <T>(SqlProxyParameterCollection parameters) { if (typeof(T) == typeof(EF_CodeSegment)) { var qb = new QueryBuilder(). SelectAllFrom <EF_CodeSegment>(). Where(EF_CodeSegment.CodeType).IsEqualTo(parameters["@p1"]). OrderBy(EF_CodeSegment.Segment); return(qb.Query); } return(""); }
private void CreateConnection() { rdrDataSet = new DataSet("GridDataSet"); rdrFindSqlCommand = new SqlProxyCommand() { Connection = rdrConnection }; rdrBrowseSqlCommand = new SqlProxyCommand { Connection = rdrConnection }; rdrParameters = new SqlProxyParameterCollection(rdrBrowseSqlCommand); rdrBrowseSqlCommand.CommandText = DefineBrowseQuery(rdrBrowseSqlCommand, string.Empty); rdrDataAdapter = new SqlProxyDataAdapter(rdrBrowseSqlCommand); }
public SqlProxyCommand(ISqlProviderCommand command) { Command = command; Parameters = new SqlProxyParameterCollection(Command); }
protected override void CreateMasterParam(SqlProxyParameterCollection parameters) { parameters.Add( new SqlProxyParameter("@p1", EF_Users.Username)); }
protected virtual void CreateMasterParam(SqlProxyParameterCollection parameters) { }
protected virtual void CreateSlaveParam <T, S>(SqlProxyParameterCollection parameters) { }
protected abstract string CreateMasterQuery(SqlProxyParameterCollection parameters);
protected virtual string CreateSlaveQuery <T>(SqlProxyParameterCollection parameters) { return(string.Empty); }
public SqlProxyCommand(string cmdText, SqlProxyConnection connection) { dbConnection = connection; dbCommand = ProxyProviderLoader.CreateInstance <ISqlProviderCommand>("SqlProvider.SqlProviderCommand", cmdText, connection); Parameters = new SqlProxyParameterCollection(dbCommand); }
public SqlProxyCommand(IDbCommand command) { Command = ProxyProviderLoader.CreateInstance <ISqlProviderCommand>("SqlProvider.SqlProviderCommand", command); Parameters = new SqlProxyParameterCollection(Command); }
public virtual void CreateSlaveParam(string name, SqlProxyParameterCollection parameters) { }
protected override void CreateMasterParam(SqlProxyParameterCollection parameters) { parameters.Add( new SqlProxyParameter("@p1", EF_Codes.CodeType) ); }
protected override void CreateMasterParam(SqlProxyParameterCollection parameters) { parameters.Add( new SqlProxyParameter("@p1", CustomerTable.ID) ); }
public SqlProxyCommand(string cmdText) { Command = ProxyProviderLoader.CreateInstance <ISqlProviderCommand>("SqlProvider.SqlProviderCommand", cmdText); Parameters = new SqlProxyParameterCollection(Command); }
public SqlProxyCommand(string cmdText, SqlProxyConnection connection, SqlProxyTransaction transaction) { Command = ProxyProviderLoader.CreateInstance <ISqlProviderCommand>("SqlProvider.SqlProviderCommand", cmdText, connection.Connection, transaction.Transaction); Parameters = new SqlProxyParameterCollection(Command); }
public virtual string CreateSlaveQuery(string name, SqlProxyParameterCollection parameters) { return(string.Empty); }
public SqlProxyCommand() { dbCommand = ProxyProviderLoader.CreateInstance <ISqlProviderCommand>("SqlProvider.SqlProviderCommand"); Parameters = new SqlProxyParameterCollection(dbCommand); }