public async Task <IActionResult> AddCast([FromBody] NewCastDto dto) { var errors = GetErrorListFromModelState(); if (errors.Any()) { return(BadRequest(errors)); } await _movieService.AddCastAsync(dto); return(Ok()); }
public async Task AddCastAsync(NewCastDto dto) { var newCast = dto.DtoToEntity(); await _castRepository.AddAsync(newCast); }