Пример #1
0
        public async Task <GetByTitleMagazineView> GetByTitle(string title)
        {
            Magazine magazine = await _magazineRepository.GetByTitle(title);

            GetByTitleMagazineView result = new GetByTitleMagazineView();

            result.Id    = magazine.Id;
            result.Title = magazine.Title;
            result.Price = magazine.Price;
            return(result);
        }
Пример #2
0
        public async Task <IActionResult> GetByTitle(string title)
        {
            GetByTitleMagazineView getByTitle = await _magazineService.GetByTitle(title);

            return(Ok(getByTitle));
        }