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); }
public async Task <IActionResult> GetByTitle(string title) { GetByTitleMagazineView getByTitle = await _magazineService.GetByTitle(title); return(Ok(getByTitle)); }