Beispiel #1
0
        public IEnumerable <OrderModel> GetWeekOrders(DateTime date, string userId)
        {
            var orders     = new List <OrderModel>();
            var sundayDate = DateService.GetSundayOfWeek(date);

            for (int i = 1; i < 6; i++)
            {
                var dayDate = sundayDate.AddDays(i);
                AddMenuIfDontExistInThisDate(dayDate);
                var order = GetOrderByDate(dayDate, userId);
                orders.Add(order);
            }
            return(orders);
        }
Beispiel #2
0
        public IEnumerable <MenuModel> GetWeekMenu(DateTime date)
        {
            var menus      = new List <MenuModel>();
            var sundayDate = DateService.GetSundayOfWeek(date);

            for (int i = 1; i < 6; i++)
            {
                var dayDate = sundayDate.AddDays(i);
                AddMenuIfDontExistInThisDate(dayDate);
                var menu = GetMenuByDate(dayDate);
                menus.Add(menu);
            }
            return(menus);
        }