public async Task AddAndSaveAsync(MoviesCreateDto model) { var movie = _mapper.Map <Movies>(model); _moviesRepository.Add(movie); await _moviesRepository.SaveChangesAsync(); }
public async Task <IActionResult> CreateMovies(MoviesCreateDto moviesCreateDto) { await _moviesService.AddAndSaveAsync(moviesCreateDto); return(NoContent()); }