// GET: Auction/Create
 public ActionResult Create()
 {
     var proxy = new AuctionServiceClient("BasicHttpBinding_IAuctionService");
     proxy.Open();
     ViewBag.CategoryId = new SelectList(proxy.GetAllCategories(), "Id", "Name");
     proxy.Close();
     return View();
 }
        public ActionResult Special(string Id)
        {
            var keyword = Request["keyword"];
            ViewBag.Type = Id;
            List<Auction> items;

            var proxy = new AuctionServiceClient("BasicHttpBinding_IAuctionService");
            proxy.Open();
            items = proxy.GetTopPriceAuctionsByCategory(Id, 0, 100).ToList();
            ViewData["groups"] = proxy.GetAllCategories().Select(e => e.Name).ToList();
            proxy.Close();
            return View(items);
        }
        // GET: Auction
        public ActionResult Index()
        {
            List<Auction> items;

            var proxy = new AuctionServiceClient("BasicHttpBinding_IAuctionService");
            proxy.Open();
            ApplicationDbContext db = new ApplicationDbContext();
            var email = db.Users.Where(e => e.UserName == User.Identity.Name).FirstOrDefault().Email;
            items = proxy.GetMyAuctions(email).ToList();
            ViewData["groups"] = proxy.GetAllCategories().Select(e => e.Name).ToList();
            proxy.Close();
            db.Dispose();
            return View(items);
        }