private async Task WriteCrewsToDbAsync(IEnumerable <CrewDto> crews) { foreach (var crew in crews) { await _crewsService.AddAsync(crew); } }
public async Task <IActionResult> Post([FromBody] CrewDto entity) { var result = await _crewsSrvice.AddAsync(entity); if (result == null) { return(NotFound()); } return(Ok(result)); }