Esempio n. 1
0
        public void ShouldFindMovie()
        {
            var movieTask = Task.Run <Movie>(async() => await movieBL.SearchAsync("Test", unitOfWork));

            var movie = movieTask.Result;

            Assert.IsNotNull(movie);
        }
Esempio n. 2
0
        public async Task <IActionResult> PostMovie([FromBody] SearchMovieRequest request)
        {
            Movie movie = null;

            using (var uow = unitOfWorkFactory.CreateNew())
            {
                movie = await movieBL.SearchAsync(request.SearchText, uow);
            }

            return(Ok(movie));
        }