Пример #1
0
        public IHttpActionResult GetBannerHtmlById(int id)
        {
            try
            {
                if (id == 0)
                {
                    throw new ArgumentNullException("Banner Id is empty");
                }

                return(Ok(bannerService.GetBannerHtmlById(id)));
            }
            catch (Exception ex)
            {
                //Log the error
                return(InternalServerError(ex));
            }
        }