Ejemplo n.º 1
0
        // 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());
        }
Ejemplo n.º 2
0
 // GET: api/Deck
 public IEnumerable <Deck> Get()
 {
     return(repo.GetDecks());
 }