// GET: FlashCards public ActionResult Index() { var service = new FlashCardService(); var model = service.GetFlashCards(); return(View(model)); }
public ActionResult Create(FlashCardCreate model) { if (!ModelState.IsValid) { return(View(model)); } var service = new FlashCardService(); service.CreateFlashCard(model); return(RedirectToAction("Index")); }
private FlashCardService CreateFlashCardService() { var service = new FlashCardService(); return(service); }
public FlashCardsController(FlashCardService flashCardService) { _flashCardService = flashCardService; }