/// <summary> /// /// </summary> /// <returns></returns> public virtual async Task <IEnumerable <TEntity> > GetAllAsync() { using (var connection = DbConnectionFactory.CreateConnection()) { connection.Open(); var sql = SqlSelectGenerator.GetSelectAll(); return(await connection.QueryAsync <TEntity>(sql, null)); } }
/// <summary> /// /// </summary> /// <returns></returns> public virtual IEnumerable <TEntity> GetAll() { var sql = SqlSelectGenerator.GetSelectAll(); using (var connection = DbConnectionFactory.CreateConnection()) { connection.Open(); return(connection.Query <TEntity>(sql)); } }