Пример #1
0
        public Articulo Get(int id)
        {
            Articulo item = repository.Get(id);

            if (item == null)
            {
                throw new HttpResponseException(HttpStatusCode.NotFound);
            }
            return(item);
        }
Пример #2
0
        public ArticuloDTO ObtenerPorID(object id)
        {
            var result = articuloRepository.Get(id);
            var dto    = mapper.Map <ArticuloDTO>(result);

            //var adapter = TypeAdapterFactory.CreateAdapter();

            //var dto = adapter.Adapt<Articulo, ArticuloDTO>(result);

            return(dto);
        }