Exemple #1
0
        public async Task <ActionResult <PeliculaDTO> > Create(PeliculaDTO model)
        {
            var peliculaModel = _mapper.Map <Pelicula>(model);

            var isSuccess = _repo.Create(peliculaModel);

            if (!isSuccess)
            {
                return(BadRequest());
            }

            return(CreatedAtAction(nameof(GetDetails), new { id = peliculaModel.PeliculaID }, peliculaModel));
        }
 public Pelicula Create(Pelicula Pelicula)
 {
     return(IPeliculaRepository.Create(Pelicula));
 }
Exemple #3
0
        public async Task Create(Pelicula pelicula)
        {
            logger.LogInformation($"Nueva pelicula en cartelera");

            await peliculaRepository.Create(pelicula);
        }
 public async Task <Pelicula> Create(Pelicula pelicula)
 {
     return(await _peliculaRepository.Create(pelicula));
 }