public List <T> GetQueryResults <T>(string sql, mapper <T> mapper) { Connect(); OracleDataReader rs = null; List <T> L = new List <T>(); try { rs = ExecuteQuery(sql); while (rs.Read()) { L.Add(mapper(rs)); } } catch (Exception ex) { System.Diagnostics.Debug.WriteLine(sql); throw ex; } finally { if (rs != null) { rs.Close(); } Close(); } return(L); }
public T GetQueryResult <T>(string sql, mapper <T> A) { List <T> L = GetQueryResults <T>(sql, A); if (L.Count == 0) { return(default(T)); } return(L[0]); }
new MapperConfigurator(mapper as Mapper ?? throw new InvalidOperationException());
await query .GetDataQuery(mapper, filter, queryFunc, includeProperties) .ToListAsync
return(Create(mapper, info, NodeKind.UniqueConstraint));
return(Create(mapper, info, NodeKind.CustomValidator));
result.IsOk ? Ok(mapper(result.Value.fst, result.Value.snd)) : Error <TResult>(result.Error);