Example #1
0
        public IHttpActionResult Get(int id)
        {
            var response = _brandManager.GetBrand(id);

            if (response == null)
            {
                return(InternalServerError());
            }
            return(Ok(response));
        }
        public IActionResult Get(int id)
        {
            var result = _brandManager.GetBrand(id);

            if (result.Success)
            {
                return(Ok(result));
            }
            return(BadRequest(result));
        }
Example #3
0
        public async Task <BrandDto> Get(long id)
        {
            Domain.Brand.Brand raw = await BrandManager.GetBrand(id);

            return(new BrandDto
            {
                Id = raw.Id,
                BrandImageId = raw.BrandImage?.Image?.Id,
                BrandImageUrl = raw.BrandImage?.Image?.Url,
                Description = raw.Description,
                Name = raw.Name
            });
        }