public IEnumerable <TEntity> GetListing(string statement, ICollection <QueryParameter> parameters) { IEnumerable <TEntity> entities = new List <TEntity>(); using (var command = this.CreateCommand()) { command.CommandText = statement; command.CreateParametersFromQuery(parameters); this.DisplayCommand(command); if (this._hydrator != null) { entities = _hydrator.HydrateEntities <TEntity>(command); } } return(entities); }
public IEnumerable <TEntity> GetList(string procedure, IDictionary <string, object> parameters) { IEnumerable <TEntity> entities = new List <TEntity>(); using (var command = this.CreateCommand()) { command.CommandText = procedure; command.CommandType = CommandType.StoredProcedure; command.CreateParametersFromDictionary(parameters); // command.DisplayQuery(); this.DisplayCommand(command); if (this._hydrator != null) { entities = _hydrator.HydrateEntities <TEntity>(command); } } return(entities); }