public async Task <IHttpActionResult> GetProduct(Guid id) { var result = await _productServices.GetByIdAsync(id); if (result == null) { return(NotFound()); } var response = AutoMapper.Mapper.Map <ProductApiModel>(result); _linkGenerator.PopulateLinksOnBasicVerbs(response, Url, "product", id); return(Ok(response)); }