Esempio n. 1
0
        public async Task <ActionResult <IEnumerable <datamodels.Tiendas> > > GetTiendas()
        {
            var aux = new Solution.BS.Tiendas(_context).GetAll();

            var mapaux = _mapper.Map <IEnumerable <data.Tiendas>, IEnumerable <datamodels.Tiendas> >(aux).ToList();

            return(mapaux);
        }
Esempio n. 2
0
        public async Task <ActionResult <datamodels.Tiendas> > GetTiendas(int id)
        {
            var tiendas = new Solution.BS.Tiendas(_context).GetOneById(id);

            if (tiendas == null)
            {
                return(NotFound());
            }

            var mapaux = _mapper.Map <data.Tiendas, datamodels.Tiendas>(tiendas);

            return(mapaux);
        }