예제 #1
0
        /// <summary>
        /// Partial Navbarda kullanılıyor. Dikkat edin.
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public ActionResult UrunleriGoster(Guid id)
        {
            var urunler = _us.GetProducts().Data;

            var data = (from d in urunler
                        where d.KategoriId == id
                        select d);
            List <UrunViewModel> urunViewModels = new List <UrunViewModel>();

            foreach (var item in data)
            {
                var viewModel = new UrunViewModel()
                {
                    Urun = item
                };
                urunViewModels.Add(viewModel);
            }
            return(View(urunViewModels));
        }