public Dictionary <InstallationModel, List <Statistic> > getStatisticPerYear(int customerid, DateTime date) { Dictionary <InstallationModel, List <Statistic> > stats = new Dictionary <InstallationModel, List <Statistic> >(); try { List <Statistic> tmp = new List <Statistic>(); foreach (var installation in irepo.GetByCustomerId(customerid)) { tmp = mrepo.getPerYear(installation, date); stats.Add(installation, tmp); } log.Info("Statistik für Kunden " + customerid + " wurde erstellt."); } catch (DalException exp) { log.Error("Statistik für Kunden " + customerid + " konnte nicht erstellt werden."); throw new BLException("Statistik für Kunden " + customerid + " konnte nicht erstellt werden.", exp); } return(stats); }