// GET: Phrase
 public ActionResult Index()
 {
     PhrasesListViewModel phListVM = new PhrasesListViewModel();
     PhraseHelper helper = new PhraseHelper();
     phListVM.Phrases = helper.GetPhrases();
     return View("ProblematicPhrases", phListVM);
 }
        public ActionResult Delete(int pID)
        {
            PhraseHelper helper = new PhraseHelper();
            helper.DeletePhraseByID(pID);
            
            Log.Logger = logger;
            Log.Information("Deleted phrase");

            PhrasesListViewModel phListVM = new PhrasesListViewModel();
            phListVM.Phrases = helper.GetPhrases();
            return View("ProblematicPhrases", phListVM);
        }
        public ActionResult Update(string phrase, int pID)
        {
            PhraseHelper helper = new PhraseHelper();
            Phrase p = new Phrase
            {
                phrase = phrase,
                PhraseID = pID
            };
            helper.UpdatePhrase(p);

            //ILogger logger = new LoggerConfiguration().WriteTo.File("c:\\logs\\logfile2.txt").CreateLogger();
            Log.Logger = logger;
            Log.Information("Updated phrase {phrase}", phrase);

            PhrasesListViewModel phListVM = new PhrasesListViewModel();            
            phListVM.Phrases = helper.GetPhrases();
            return View("ProblematicPhrases", phListVM);
        }