// GET: PartModel
        public ActionResult Index()
        {
            var partModels = Uow.PartModel.GetAll();
            var brands     = Uow.Brand.GetAll();
            SubcategoryHomeViewModel vm = new SubcategoryHomeViewModel {
                Subcategory = partModels.ToList(), Category = brands.ToList()
            };

            return(View(vm));
        }
Beispiel #2
0
        public HttpResponseMessage Get()
        {
            var partModels = Uow.PartModel.GetAll();
            var brands     = Uow.Brand.GetAll();
            SubcategoryHomeViewModel vm = new SubcategoryHomeViewModel {
                Subcategory = partModels.ToList(), Category = brands.ToList()
            };

            return(Request.CreateResponse(HttpStatusCode.OK, vm));
        }