示例#1
0
        public Estacion RetrieveEstacionPorNombre(string nombre)
        {
            var estacion = new Estacion {
                Nombre = nombre
            };

            return(_crudFactory.RetrieveByName <Estacion>(estacion.Nombre));
        }
示例#2
0
        public void CreateEstacionesPorLinea(string nomEstacion, string nomLinea)
        {
            try
            {
                EstacionCrudFactory _estacionCrudFactory = new EstacionCrudFactory();

                var linea = new Linea {
                    Nombre = nomLinea
                };
                linea = _crudFactory.RetrieveByName <Linea>(linea.Nombre);

                var estacion = new Estacion {
                    Nombre = nomEstacion
                };
                estacion = _estacionCrudFactory.RetrieveByName <Estacion>(estacion.Nombre);

                _crudFactory.CreateEstacionByLinea(estacion.Codigo, linea.Codigo);
            }
            catch (TRV_Exception ex)
            {
                throw ex;
            }
        }