Ejemplo n.º 1
0
        public IHttpActionResult GetRetailer(int id)
        {
            Retailer retailerObj = null;

            try
            {
                retailerObj = dataRepository.Get(id);
                if (retailerObj == null)
                {
                    return(NotFound());
                }
            }

            catch (Exception ex)
            {
                throw ex;
            }
            return(Ok(retailerObj));
        }
Ejemplo n.º 2
0
        public async Task <Retailer> Get(int id)
        {
            var retailerDbo = await _retailerRepository.Get(id);

            return(_mapper.Map <Retailer>(retailerDbo));
        }