/// <summary> /// Gets all entities from the database. /// </summary> public IEnumerable <TEntity> Get() { var query = _queryGenerator.SelectAll(Table, SelectFields, Key); IEnumerable <TEntity> result; var connection = GetConnection(); try { result = connection.Query <TEntity>(query); } finally { if (!_useProvidedConnection) { connection.Dispose(); } } return(result); }