private async Task WriteCrewsToDbAsync(IEnumerable <CrewDto> crews)
 {
     foreach (var crew in crews)
     {
         await _crewsService.AddAsync(crew);
     }
 }
Beispiel #2
0
        public async Task <IActionResult> Post([FromBody] CrewDto entity)
        {
            var result = await _crewsSrvice.AddAsync(entity);

            if (result == null)
            {
                return(NotFound());
            }

            return(Ok(result));
        }