Example #1
0
        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);
        }
Example #2
0
        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]);
        }
Example #3
0
 new MapperConfigurator(mapper as Mapper ?? throw new InvalidOperationException());
Example #4
0
 await query
 .GetDataQuery(mapper, filter, queryFunc, includeProperties)
 .ToListAsync
Example #5
0
 return(Create(mapper, info, NodeKind.UniqueConstraint));
Example #6
0
 return(Create(mapper, info, NodeKind.CustomValidator));
Example #7
0
 result.IsOk ? Ok(mapper(result.Value.fst, result.Value.snd)) : Error <TResult>(result.Error);