예제 #1
0
        public IActionResult GetAccessory(string slug)
        {
            try
            {
                var obj = _bl.GetAccessory(slug);
                if (obj == null)
                {
                    return(NotFound());
                }

                return(Ok(new AccessoryViewModel(obj)));
            }
            catch (Exception ex)
            {
                _log.LogError("Exception: {0}", ex);
                return(StatusCode(500));
            }
        }