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)); }
public async Task <Retailer> Get(int id) { var retailerDbo = await _retailerRepository.Get(id); return(_mapper.Map <Retailer>(retailerDbo)); }