// GET: DeckTBs public ActionResult Index() { IEnumerable <DeckTB> deckList = new List <DeckTB>(); deckList = db.DeckTBs.ToList();; var repo = new DeckRepo(); if (Session["Id"] != null) { deckList = repo.GetDecks(Int32.Parse(Session["Id"].ToString())); return(View(deckList)); } else { return(View()); } //return View(db.DeckTBs.ToList()); }
// GET: api/Deck public IEnumerable <Deck> Get() { return(repo.GetDecks()); }