Ejemplo n.º 1
0
        public List <InterTableDAL> GetIntertables(int skip, int take)
        {
            List <InterTableDAL> rv = new List <InterTableDAL>();

            try
            {
                EnsureConnected();
                using (SqlCommand command = new SqlCommand("GetInterTable", Con))
                {
                    command.CommandType = System.Data.CommandType.StoredProcedure;
                    command.Parameters.AddWithValue("@skip", skip);
                    command.Parameters.AddWithValue("@take", take);

                    using (SqlDataReader reader = command.ExecuteReader())
                    {
                        InterTableMapper mapper = new InterTableMapper(reader);
                        while (reader.Read())
                        {
                            InterTableDAL c = mapper.ToInterTable(reader);
                            rv.Add(c);
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                Log(ex);
                throw;
            }
            return(rv);
        }
Ejemplo n.º 2
0
        public InterTableDAL ToInterTable(SqlDataReader r)
        {
            InterTableDAL rv = new InterTableDAL();

            rv.GeckoID = GetInt32OrZero(r, GeckoIDOrdinal);
            rv.MorphID = GetInt32OrZero(r, MorphIDOrdinal);
            return(rv);
        }