Example #1
0
        public IEnumerable <category> Get()
        {
            // JsonResult<IEnumerable<category>> jsonData = Json(bllService.GetCategories());

            return(bllService.GetCategories().Select(c => new category {
                categoryID = c.categoryID, categoryName = c.categoryName
            }));
        }
        public void GetCategoryTest()
        {
            userService.GetAllCategories().Returns(category);

            IEnumerable <category> result = bService.GetCategories();

            Assert.AreEqual(2, result.Count());
        }
 public IEnumerable <category> Get()
 {
     return(bllService.GetCategories());
 }
 public IEnumerable <category> Get()
 {
     return(bllService.GetCategories().Select(c => new category {
         categoryID = c.categoryID, categoryName = c.categoryName
     }));
 }