Exemplo n.º 1
0
 protected static string GetDuplicatedMovieError(MovieUniquenessCheckResult checkResult, Uri movieUri)
 {
     return(checkResult switch
     {
         MovieUniquenessCheckResult.ExistsInMoviesToGet => $"Movie {movieUri} already exists among movies to get",
         MovieUniquenessCheckResult.ExistsInMoviesToSee => $"Movie {movieUri} already exists among movies to see",
         _ => throw new InvalidOperationException($"Unexpected value of movie check result: {checkResult}"),
     });
Exemplo n.º 2
0
 private void FillDuplicatedMovieError(MovieUniquenessCheckResult checkResult, Uri movieUri)
 {
     TempData[TempDataErrorMessage] = GetDuplicatedMovieError(checkResult, movieUri);
 }