示例#1
0
        public IActionResult MyAds()
        {
            var ads = _ads.GetByUser(HttpContext.Session.GetUserEmail());

            //string useremail = HttpContext.Session.GetUserEmail();
            //List<Ad> ads = new List<Ad>();

            //var myads = _ads.GetAll().Where(e => useremail == _ads.Table.Email);
            //int id = myads.GetUserId();

            //foreach (var ad in myads)
            //{
            //   ads.Add(_ads.Get(id));
            //}

            return(View(ads));
        }
        public IActionResult MyAds()
        {
            var ads = _ads.GetByUser(HttpContext.Session.GetUserEmail());

            return(View(ads));
        }