public decimal GetStatisticsByTime(int year) { decimal sum = 0; var guests = _guestService.GetByTime(year); for (int i = 0; i < guests.Result.Count(); i++) { sum += guests.Result.ElementAtOrDefault(i).Price; } return(sum); }