Exemple #1
0
        public DeleteUser(IAdoQueryRunner queryRunner, IQueryBuilder queryBuilder)
        {
            _queryRunner = queryRunner;

            _deleteSql = queryBuilder
                         .DeleteFrom("tb_Users")
                         .Where("UserID = @UserID");
        }
Exemple #2
0
 public SchemaUpdater(
     IAdoQueryRunner queryRunner,
     ISchemaEnumerator schemaEnumerator)
 {
     _queryRunner         = queryRunner;
     _schemaEnumerator    = schemaEnumerator;
     _updatedRepositories = new SortedList <string, string>(StringComparer.OrdinalIgnoreCase);
 }
Exemple #3
0
        public GetUsers(
            IAdoQueryRunner queryRunner,
            IDataReaderFactory dataReaderFactory,
            IQueryBuilder queryBuilder)
        {
            _queryRunner       = queryRunner;
            _dataReaderFactory = dataReaderFactory;

            _selectSql = queryBuilder
                         .Select("UserID", "FirstName", "LastName", "DateOfBirth")
                         .From("tb_Users");
        }
Exemple #4
0
        public InsertUser(
            IAdoQueryRunner queryRunner,
            IDataReaderFactory dataReaderFactory,
            IParameterAccessor parameterAccessor,
            IQueryBuilder queryBuilder)
        {
            _queryRunner       = queryRunner;
            _dataReaderFactory = dataReaderFactory;
            _parameterAccessor = parameterAccessor;

            _insertSql = queryBuilder
                         .InsertInto("tb_users", "FirstName", "LastName", "DateOfBirth")
                         .Values("@FirstName", "@LastName", "@DateOfBirth");

            _selectSql = queryBuilder
                         .Select("UserID", "FirstName", "LastName", "DateOfBirth")
                         .From("tb_Users")
                         .Where("FirstName = @FirstName")
                         .And("LastName = @LastName");
        }