public JsonNetResult LoadUsageDetails(int year, int month)
        {
            var results = new List<UsageDetailModel>();

            var equipment = _repositoryFactory.EquipmentRepository.Queryable.Where(a => a.Operator == EquipmentOperators.User && a.IsReservable);
            foreach(var eq in equipment)
            {
                var details = new UsageDetailModel();
                details.EquipmentName = eq.Name;

                foreach (var res in eq.EquipmentReservations.Where(a => a.Start.Year == year && a.Start.Month == month))
                {
                    details.Reservations.Add(new ReservationDetailModel() {Start = res.Start.ToString(), End = res.End.ToString(), UserId = res.User.Id, UserName = res.User.FullName});
                }

                results.Add(details);
            }

            return new JsonNetResult(results);
        }
        public JsonNetResult LoadUsageDetails(int year, int month)
        {
            var results = new List <UsageDetailModel>();

            var equipment = _repositoryFactory.EquipmentRepository.Queryable.Where(a => a.Operator == EquipmentOperators.User && a.IsReservable);

            foreach (var eq in equipment)
            {
                var details = new UsageDetailModel();
                details.EquipmentName = eq.Name;

                foreach (var res in eq.EquipmentReservations.Where(a => a.Start.Year == year && a.Start.Month == month))
                {
                    details.Reservations.Add(new ReservationDetailModel()
                    {
                        Start = res.Start.ToString(), End = res.End.ToString(), UserId = res.User.Id, UserName = res.User.FullName
                    });
                }

                results.Add(details);
            }

            return(new JsonNetResult(results));
        }