Esempio n. 1
0
        public async Task AddAndSaveAsync(MoviesCreateDto model)
        {
            var movie = _mapper.Map <Movies>(model);

            _moviesRepository.Add(movie);
            await _moviesRepository.SaveChangesAsync();
        }
Esempio n. 2
0
        public async Task <IActionResult> CreateMovies(MoviesCreateDto moviesCreateDto)
        {
            await _moviesService.AddAndSaveAsync(moviesCreateDto);

            return(NoContent());
        }