public async Task <IEnumerable <ProjectionDomainModel> > DeleteByAuditoriumIdMovieId(int auditoriumId, Guid movieId) { var projectionModelsByMovieId = _projectionsRepository.GetByAuditoriumIdMovieId(auditoriumId, movieId).ToList(); foreach (Projection projection in projectionModelsByMovieId) { var deletedReservations = await _reservationService.DeleteByProjectionId(projection.Id); if (deletedReservations == null) { return(null); } } var deletedProjections = await _projectionsRepository.DeleteByAuditoriumIdMovieId(auditoriumId, movieId); if (deletedProjections == null) { return(null); } _projectionsRepository.Save(); List <ProjectionDomainModel> domainModelList = new List <ProjectionDomainModel>(); foreach (Projection projection in deletedProjections) { ProjectionDomainModel domainModel = new ProjectionDomainModel { Id = projection.Id, AuditoriumId = projection.AuditoriumId, MovieId = projection.MovieId, ProjectionTime = projection.DateTime }; domainModelList.Add(domainModel); } return(domainModelList); }