public async Task <IEnumerable <TrainingDTO> > GetTrainingsBeforeDateTimeAsync(int teamId, DateTime dateTime, int hours) { IEnumerable <Training> foundTrainings = await trainings.GetBeforeDateTimeAsync(teamId, dateTime, hours); return(foundTrainings.Select(training => new TrainingDTO { Id = training.Id, TeamId = training.TeamId, BeginTime = training.BeginTime })); }