示例#1
0
        public async Task <IActionResult> GetAsync(QueryMovieByIdRequest id)
        {
            var movie = await mediator.Send(id)
                        .ConfigureAwait(false);

            return(movie is null || string.IsNullOrWhiteSpace(movie.Id)
                 ? NotFound()
                 : (IActionResult)Ok(movie));
        }
示例#2
0
        public void Should_FailModelRequest()
        {
            var request = new QueryMovieByIdRequest("0317705");

            Assert.True(ValidateModel(request).Any());
        }