-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
77 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.ComponentModel; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace Core.Application.DTOs.Movies | ||
{ | ||
public class MoviePageResponseDTO | ||
{ | ||
public int Id { get; set; } | ||
public string WebPageTitle { get; set; } | ||
public string URI { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
Core.Application/Features/Movies/Queries/SearchMoviePages/SearchMoviePagesQuery.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
using Core.Application.DTOs.General; | ||
using Core.Application.DTOs.Movies; | ||
using Core.Application.Interface.Repositories; | ||
using MediatR; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace Core.Application.Features.Movies.Queries.SearchMoviePages | ||
{ | ||
public class SearchMoviePagesQuery : IRequest<GenericApiResponse<MoviePageResponseDTO>> | ||
{ | ||
public int MovieId { get; set; } | ||
} | ||
|
||
public class SearchMoviePagesQueryHandler : IRequestHandler<SearchMoviePagesQuery, GenericApiResponse<MoviePageResponseDTO>> | ||
{ | ||
private readonly IMovieRepository _movieRepository; | ||
private readonly IMovieWebRepository _movieWebRepository; | ||
|
||
public SearchMoviePagesQueryHandler(IMovieRepository movieRepository, IMovieWebRepository movieWebRepository) | ||
{ | ||
_movieRepository = movieRepository; | ||
_movieWebRepository = movieWebRepository; | ||
} | ||
|
||
public async Task<GenericApiResponse<MoviePageResponseDTO>> Handle(SearchMoviePagesQuery request, CancellationToken cancellationToken) | ||
{ | ||
var data = await _movieRepository.GetMovieWebPage(request.MovieId); | ||
throw new NotImplementedException(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters