Пример #1
0
        public IHttpActionResult GetBillsByCategory(int categoryId)
        {
            //CategoryModel category = db.CategoriesRepository.GetByID(categoryId);
            //if (category == null)
            //{
            //    return NotFound();
            //}

            //List<OfferModel> offers = category.offerModels.ToList();
            //List<BillModel> bills = new List<BillModel>();

            //foreach (var offer in offers)
            //{
            //    bills.AddRange(offer.billModels);
            //}

            //return Ok(bills);
            return(Ok(billService.GetBillsByCategory(categoryId)));
        }
Пример #2
0
 public IEnumerable <BillModel> GetBillsByCategory(int categoryId)
 {
     return(billsService.GetBillsByCategory(categoryId));
 }