Пример #1
0
        public IActionResult Get(Guid id)
        {
            var advert = _queryMediator.Get(id);

            if (advert == null)
            {
                return(NotFound());
            }

            return(Ok(advert));
        }
Пример #2
0
        public IActionResult Get(Guid id)
        {
            var advert = _query.Get(id);

            if (advert == null || advert.Status != AdvertStatus.Posted)
            {
                return(NotFound());
            }

            return(Ok(advert));
        }