Example #1
0
        // GET: FlashCards
        public ActionResult Index()
        {
            var service = new FlashCardService();
            var model   = service.GetFlashCards();

            return(View(model));
        }
Example #2
0
        public ActionResult Create(FlashCardCreate model)
        {
            if (!ModelState.IsValid)
            {
                return(View(model));
            }


            var service = new FlashCardService();

            service.CreateFlashCard(model);

            return(RedirectToAction("Index"));
        }
Example #3
0
        private FlashCardService CreateFlashCardService()
        {
            var service = new FlashCardService();

            return(service);
        }
Example #4
0
 public FlashCardsController(FlashCardService flashCardService)
 {
     _flashCardService = flashCardService;
 }