Exemple #1
0
        public async Task <IActionResult> AddCast([FromBody] NewCastDto dto)
        {
            var errors = GetErrorListFromModelState();

            if (errors.Any())
            {
                return(BadRequest(errors));
            }

            await _movieService.AddCastAsync(dto);

            return(Ok());
        }
Exemple #2
0
 public async Task AddCastAsync(NewCastDto dto)
 {
     var newCast = dto.DtoToEntity();
     await _castRepository.AddAsync(newCast);
 }