예제 #1
0
        public List <Estacion> RetrieveEstacionesByLinea(string linea)
        {
            EstacionMapper _estacionMapper = new EstacionMapper();

            try
            {
                var lstResult = SqlDao.ExecuteQueryProcedure(_mapper.GetEstacionesRetriveByLineaStatement(linea));
                var lis       = new List <Estacion>();
                var i         = 0;

                if (lstResult.Count > 0)
                {
                    foreach (var dic in lstResult)
                    {
                        lis.Add((Estacion)Convert.ChangeType(_estacionMapper.BuildObject(lstResult[i]), typeof(Estacion)));
                        i++;
                    }
                }
                return(lis);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
예제 #2
0
 public EstacionCrudFactory()
 {
     _mapper = new EstacionMapper();
 }